Coder Social home page Coder Social logo

tombola_digital's Introduction

Tômbola Digital

Apoiar o comércio local

Plataforma para gestão de uma tômbola digital.

Configurações Servidor

PHP version 7.3 or higher is required, with the following extensions installed:

  • intl
  • libcurl if you plan to use the HTTP\CURLRequest library

Additionally, make sure that the following extensions are enabled in your PHP:

  • json (enabled by default - don't turn it off)
  • mbstring
  • mysqlnd
  • xml (enabled by default - don't turn it off)

Algumas definições:

  • fotos dos comerciantes aderentes ficam em public/images/aderentes/ com o nome do ficheiro a corresponder ao id_comerciante da tabela da b.d.

  • o endpoint do portal é definido no ficheiro app/Config/app.php

    public $baseURL = 'https://<servidor>'; (p.e. public $baseURL = 'https://tombola.cm-mealhada.pt/';)
    
  • a sub-pasta onde está todo o projeto é definida em public/.htaccess

    RewriteBase /tombola_digital/
    
  • logs da aplicação em writable/logs

  • logs de atividade na plataforma (login, logout, registos de códigos...) na base de dados tabela logger ou no backoffice no endpoint /admin/logs

  • credenciais de administração (a entrada é feita também no menu "clientes")

    email: [email protected]
    password: 12345678
    
  • definições apache2 /etc/apache2/sites-enabled/000-default.conf

    <Directory "<server_dir>/tombola_digital/public">
        AllowOverride all
        Require all granted
     </Directory>
    
  • definições para ligação à base de dados em app/Config/Database.php

       'hostname' => 'localhost',
       'username' => 'dbuser',
       'password' => 'dbpass',
       'database' => 'tombola_digital',
    
  • definições para envio de emails (recuperação de conta, registo e ativação de conta) em app/Config/Email.php

    public $SMTPHost = "smtp.host.pt";
    public $SMTPUser = "[email protected]";
    public $SMTPPass = "password";
    public $SMTPPort = 587;
    
    public $adminEmail = '[email protected]'; // Admin Email, [email protected]
    
  • definições para envio de emails (pedidos de adesão de comerciantes, ou contato geral) em system/Email/Email.php -config igual ao anterior...

  • bloqueio de tentativa de login automático

    • após 3 tentativas erradas de um utilizador o sistema bloqueia a entrada

    • necessário limpar os registos desse login na tabela login_attempts da base de dados

  • chaves API

    public $apikey = "<your_api_key>";
    <script src="https://maps.googleapis.com/maps/api/js?key=<maps-api-key>&callback=initMap&v=weekly" defer></script>
    
    - $recaptcha_secret_key = "<recaptcha_secret_key>";
    
    • OAUTH2 em Ion-Auth/Controllers/Auth.php
      • google
       //https://forum.codeigniter.com/showthread.php?tid=82429
       //https://www.youtube.com/watch?v=a5puLR051Is
       //google client code
       //google oauth2
       $this->googleClient = new \Google\Client();
       $this->googleClient->setClientId("<client-id>.apps.googleusercontent.com");
       $this->googleClient->setClientSecret("<client-secret>");
      
      • facebook
       $this->facebookClient = new \League\OAuth2\Client\Provider\Facebook([
             'clientId'          => '<client-id>',
             'clientSecret'      => '<client-secret>',
             'redirectUri'       => base_url('auth/login_facebook'),
             'graphApiVersion'   => 'v15.0',
         ]);
      

tombola_digital's People

Contributors

vitorcricas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.