mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
docs: verify and refactor documentation to match current codebase
This commit is contained in:
@@ -6,36 +6,26 @@ Répertoire des travaux de fin d'études de l'[ERG](https://erg.be) (École de R
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 8.4
|
||||
- SQLite3 (`php8.4-sqlite3`)
|
||||
- PHP ≥ 8.4 (with `ext-json`, `ext-openssl`, `ext-pdo`, `ext-sqlite3`)
|
||||
- Composer
|
||||
- Node.js / npm
|
||||
- nginx (production)
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
### MacOS
|
||||
|
||||
Logiciels:
|
||||
|
||||
- un IDE pour éditer → VSCode
|
||||
- git (ou une interface graphique) pour partager les modifications → git-gui (officiel) ou Github Desktop
|
||||
- un server web avec PHP pour visualiser le project dans le navigateur → MAMP
|
||||
|
||||
|
||||
### Workflow
|
||||
|
||||
0. Faire un changement dans ton IDE
|
||||
1. Démarrer le site via MAMP, en sélectionnant le dossier `public`
|
||||
2. Vérifier que ça marche sur le site en local, depuis ton navigateur
|
||||
3. Une fois qu'un changement spécifique est fait, `commit` les changements sur les fichiers qui sont relatif à ce changement
|
||||
4. Vérifier que vous avez syncroniser avec le `remote` → `pull` + `rebase` ! pas merge
|
||||
5. `push` les changements vers le remote
|
||||
|
||||
|
||||
```bash
|
||||
just serve # http://localhost:8000 (public) and /admin/
|
||||
# one-time
|
||||
composer install
|
||||
npm ci
|
||||
|
||||
# run the dev server (builds assets, applies migrations, opens a browser)
|
||||
just dev # http://127.0.0.1:8000 (public) and /admin/
|
||||
just stop # stop it
|
||||
```
|
||||
|
||||
Live CSS/JS rebuilds happen automatically via a chokidar watcher while `just dev` runs.
|
||||
See [`docs/development.md`](docs/development.md) for the full workflow.
|
||||
|
||||
## Deployment
|
||||
|
||||
Files are pushed to the server with rsync — there is no repo on the remote.
|
||||
@@ -68,8 +58,11 @@ just deploy-nginx
|
||||
## Security notes
|
||||
|
||||
- Admin panel protected by PHP session (`AdminAuth`) — password-only, no username
|
||||
- Uploads stored outside webroot, served via controlled `media.php`
|
||||
- Rate limiting on public search (`src/RateLimit.php`)
|
||||
- Uploads stored outside webroot, served via controlled `/media` (`MediaController`)
|
||||
- Rate limiting on public search (`app/src/RateLimit.php`)
|
||||
- See `nginx/docs/SECURITY_HEADERS.md` for security headers reference
|
||||
|
||||
## More docs
|
||||
|
||||
See [`docs/README.md`](docs/README.md) for the full documentation index.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user