From 102180b7eb701ccdafd477e6434580621ffefc44 Mon Sep 17 00:00:00 2001 From: Marco Pisco Date: Wed, 8 Apr 2026 10:48:12 +0100 Subject: [PATCH 1/2] =?UTF-8?q?docs(readme):=20Atualizar=20"instala=C3=A7?= =?UTF-8?q?=C3=A3o=20o=20b=C3=A1sico"=20para=20ser=20apenas=20depend=C3=AA?= =?UTF-8?q?ncias.=20Simplificar=20o=20que=20deve=20ser=20simplificado.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d95937..a0bfb5f 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,13 @@ Plataforma Digital para a Reserva de Salas e Respetivos Materiais. PAP (Prova de Aptidão Profissional) - Marco Pisco - Curso de Técnico de Informática - Sistemas 12ºAno -## Instalação (o básico) +## Dependências -- Necessário um servidor com PHP e uma DB MariaDB +- PHP 8.4 +- Servidor Web (recomendo o Caddy) +- MariaDB ou MySQL (oficialmente recomendo o MariaDB) - Composer (para o Windows, descarregar [esta versão](https://getcomposer.org/Composer-Setup.exe)) - Com o composer, fazer `composer install` através de um terminal, para instalar as dependências. -- Montar o utilizador usando as instruções [na wiki](https://github.com/marpisco/ClassLink/wiki/Configura%C3%A7%C3%A3o-MYSQL) (brevemente haverá mais documentação na Wiki) Informações específicas (e mais bem explicadas) estarão no Manual do Técnico. From e0ab65a3f940b8d6172e82b76de76ffc9b3ae935 Mon Sep 17 00:00:00 2001 From: Marco Pisco Date: Wed, 8 Apr 2026 10:52:43 +0100 Subject: [PATCH 2/2] feat(config sample): update the sample configuration file remove english comments and put portuguese comments only. make the comments more clear. add a little bit of more information regarding the stuff that is in the configuration add reference to the future configuration that will be created in the docs file. --- src/config.sample.php | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/config.sample.php b/src/config.sample.php index 1e116c3..f5acd4b 100644 --- a/src/config.sample.php +++ b/src/config.sample.php @@ -1,16 +1,30 @@ 'mysql', // Apenas há suporte a MYSQL (mysql = mariadb) por enquanto + 'servidor' => 'localhost', + 'user' => 'reservasalas', + 'password' => 'salaspass', + 'db' => 'reservasalas', + 'porta' => 3306 + ); + + // Configuração do servidor de email $mail = array( 'ativado' => true, 'servidor' => 'smtp.gmail.com', 'porta' => 465, 'autenticacao' => true, - // caso a autenticação seja por starttls, usar PHPMailer::ENCRYPTION_STARTTLS - // caso a autenticação seja por ssl, usar PHPMailer::ENCRYPTION_SMTPS - // caso não seja necessário autenticação, por false na opção autenticacao, e não importar-se para os outros + // Tipo de Segurança: Explicação: + /// caso a autenticação seja por starttls, usar PHPMailer::ENCRYPTION_STARTTLS + /// caso a autenticação seja por ssl, usar PHPMailer::ENCRYPTION_SMTPS + /// caso não seja necessário autenticação, por false na opção autenticacao, e não importar-se para os outros 'tipodeseguranca' => 'PHPMailer::ENCRYPTION_STARTTLS ou PHPMailer::ENCRYPTION_SMTPS', 'username' => '', 'fromname' => 'Reserva de Salas', @@ -18,25 +32,13 @@ 'password' => '' ); - // Database configuration (MySQL/MariaDB) - // SECURITY: Use strong passwords and restrict database user permissions - $db = array( - 'tipo' => 'mysql', - 'servidor' => 'localhost', - 'user' => 'reservasalas', - 'password' => 'salaspass', // CHANGE THIS to a strong password - 'db' => 'reservasalas', - 'porta' => 3306 - ); - - // OAuth 2.0 configuration - // SECURITY: Keep clientId and clientSecret confidential + // Configuração do Fornecedor de Autenticação (OAuth 2.0) $provider = new GenericProvider([ 'urlAuthorize' => 'https://authentik.devenv.marcopisco.com/application/o/authorize/', 'urlAccessToken' => 'https://authentik.devenv.marcopisco.com/application/o/token/', 'urlResourceOwnerDetails' => 'https://authentik.devenv.marcopisco.com/application/o/userinfo/', - 'clientId' => 'clientid', // CHANGE THIS - 'clientSecret' => 'clientsecret', // CHANGE THIS and keep it secret + 'clientId' => 'clientid', + 'clientSecret' => 'clientsecret', 'redirectUri' => 'https://' . $_SERVER['HTTP_HOST'] . '/login' ]); ?> \ No newline at end of file