Commit 6444f888 authored by Benjamin Sonntag's avatar Benjamin Sonntag

[doc] adding lots of dependencies and explanations into the README +...

[doc] adding lots of dependencies and explanations into the README + translation of routes groups into english
parent 57028ef1
Pipeline #1963 passed with stages
in 1 minute and 46 seconds
# LQDN soutien
## Installation
This is a php application based on Fat-Free-Framework and a MySQL database that handles donations and presents offered to donors to La Quadrature du Net
It's used as our primary donation platform, and uses our bank's payment system (cheaper) to get one-time or recurring payments recorded into the donation platform.
## Installation (quick)
In order to install this project, run `make doctor` to check that everything is fine.
......@@ -19,3 +23,52 @@ To access to the admin (`/admin`) use `admin`/`password`
## Contributing
Before submitting a PR, makes sure tests are OK: `make test`
# Detailed dependencies, installation ...
## Dependencies
This software depends on a few software :
* *composer* (to install php dependencies) see https://getcomposer.org/
* a *mysql client* (to inject the database schema)
* a *mysql server* (no need for it to be local)
* *pdftk* to generate pi-plomes (pdf with pi's decimals offered to our donors)
* *texlive-latex-base* for the `pdflatex` binary for the piplomes (only required in production or for people debugging the piplomes code)
and for developers you may also need :
* xgettext to manage translations, use:
** `make messages.pot` to update PO files from source code.
** `make translations` to compile MO files from PO files when translations are ready.
This software uses:
* PHP5.6 currently (migration to PHP7.x is in the pipe)
* *phinx* to inject database schema and initial data / accounts into MySQL see https://phinx.org/
* *php-cs-fixer* to check php code for errors and fix coding standard issues, see https://github.com/FriendsOfPHP/PHP-CS-Fixer
* *doctrine/dbal* as ORM see https://github.com/doctrine/dbal
* *f3 framework* as main view / controller framework. see https://fatfreeframework.com/
Look at `app/` folder for most Controllers, and `app/routes.ini` for the application routes (the URLs)
# Production deployment (not finished)
* `app/env` must contains the proper values : database connection, bank visa payment codes, and ENV=production at the bottom.
* point your Nginx or Apache with PHP5.6 to the `www/` folder, and either allow Rewrite Rules (a2enmod rewrite) or point every URL not being a file to index.php (see below for an nginx sample)
* use AND FORCE https usage, it's 2018, people ;)
Nginx configuration sample:
```
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php5.sock;
}
location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
```
[routes]
; Site principal
; Main website
GET|POST @home:/=Campaign->show
GET @what:/what=Campaign->what
GET @who:/who=Campaign->who
......@@ -9,10 +9,10 @@ GET @merci:/merci=Campaign->merci
GET @material:/material=Campaign->material
POST @donate:/donate=Campaign->donate
; Page de retour de la banque
; Callback called by the bank when a payment is made
POST @cb:/cb=Bank->cb
; Pages d'administration personnelle
; Personal account pages
GET|POST @perso:/perso=Perso->show
POST|GET @login:/login=Perso->login
GET|POST @logout:/perso/logout=Perso->logout
......@@ -26,7 +26,7 @@ GET @recu:/receipt/@id=Perso->receipt
GET /cron/@action=Cron->@action
GET /cron/piplome/@id=Cron->piplome
; Pages d'administration
; Administrators pages
GET|POST @admin:/admin=Admin->show
GET @add_support:/admin/support/add=Admin->support
GET @edit_support:/admin/support/edit/@id=Admin->support
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment