Commit Graph

336 Commits

Author SHA1 Message Date
Théophile Gervreau-Mercier
4bbbc58e24 Fix admin CSS not loading and quirks mode issues
Fixed multiple issues in admin panel:

1. CSS path: modern-normalize.css → modern-normalize.min.css
   (File is actually named .min.css)

2. Icon path: assets/icon.svg → /assets/admin_favicon.svg
   (Was relative, now absolute; correct filename)

3. Navigation: /admin/list.php → /admin/
   (list.php was renamed to index.php)

4. Short PHP tags: <? → <?php
   (Better compatibility, some servers don't enable short_open_tag)

5. Quirks mode warning was due to CSS not loading, not DOCTYPE
   (DOCTYPE was already present)

Files modified:
- public/admin/inc/head.php (main fixes)
- public/admin/index.php (short tags)
- public/admin/add.php (short tags)
- public/admin/import.php (short tags)

Need to redeploy for production: just deploy
2026-02-06 13:26:24 +01:00
Théophile Gervreau-Mercier
e789c286de Refactor admin panel and add migration documentation
- Add comprehensive migration guides (DEPLOYMENT_MIGRATION.md, DIRECTORY_STRUCTURE.md, MIGRATION_CHECKLIST.md)
- Refactor admin panel: split add.php, create reusable header/footer
- Update styles: admin.css, common.css, main.css
- Improve public pages: index.php, memoire.php
- Reorganize database documentation into database/docs/
- Update .gitignore and justfile

This prepares for migration to public/ directory structure
2026-02-06 12:14:21 +01:00
Théophile Gervreau-Mercier
d2b3c6ca67 Major refactor
- update the structure to have monolithic setup
- updated deployments
- added live-reloading for devops
2026-02-05 20:16:19 +01:00
Théophile Gervreau-Mercier
f23fbb481b Nginx config, working deploy, basic theme, repo cleanup 2026-02-05 17:37:07 +01:00
Théophile Gervreau-Mercier
2cb5436647 Added Claude assessements 2026-02-02 18:56:12 +01:00
Théophile Gervreau-Mercier
467aced734 Restructure repository and implement secure search feature
Phase 1: Consolidate shared infrastructure
- Create shared/ directory for common code
- Consolidate Database.php from front-backend and formulaire into unified shared/Database.php
  - Smart path detection for test.db vs posterg.db
  - Secure search with wildcard escaping and input validation
  - Support both singleton and direct instantiation patterns
  - Full CRUD methods for admin functionality
- Move RateLimit.php to shared/ (30 requests/min)
- Update all require paths across apps to use shared/

Phase 2: Reorganize directory structure
- Rename front-backend/ → apps/public/
- Rename formulaire/ → apps/admin/
- Rename db/ → database/
- Update all file paths for new structure
- Create root .gitignore excluding databases, cache, logs

Implement secure search feature
- Add apps/public/search.php with full-text search across theses
- Search filters: query, year, orientation, AP program, keywords
- Security features:
  - SQL injection prevention (prepared statements)
  - Wildcard injection prevention (escape % and _)
  - Input validation (max 200 chars, year range 1900-2100)
  - Rate limiting (30 req/min per IP)
  - Pagination limited to 100 results/page
  - XSS protection (htmlspecialchars on output)

Add comprehensive test suite
- Create apps/public/tests/ with proper structure
  - tests/Integration/SearchTest.php - 12 search scenarios
  - tests/Security/SecurityTest.php - vulnerability testing
  - tests/Unit/RateLimitTest.php - rate limit behavior
- Create database/fixtures/CreateTestDatabase.php
- Add apps/public/run-tests.php test runner
- All tests passing (4/4 suites)

Update deployment configuration
- Rename justfile 'sync' recipe to 'deploy'
- Create deploy group with separate deploy-public and deploy-admin
- Add test-deploy recipe for test database
- Exclude *.db, tests/, cache/, *.md from production deploy
- Deploy shared/ to both public and admin locations

Stats: +4482 insertions, -654 deletions across 72 files
2026-02-02 18:53:58 +01:00
Théophile Gervreau-Mercier
95f52d549e Add comprehensive thesis management system with database migration
This commit introduces a complete thesis management interface and migrates
the system from YAML-based storage to SQLite:

Core Changes:
- Add Database.php helper class with PDO connection and entity management
- Add list.php for viewing all theses with filtering and sorting
- Add edit.php for modifying existing thesis records
- Add import.php for migrating legacy YAML data to SQLite
- Add justfile with development tasks (serve, init-test-db, etc.)

Documentation:
- Add MIGRATION.md with complete migration guide and architecture docs
- Update README.md with database setup and Just recipe instructions
- Update .gitignore to exclude test databases and error logs

Modified Forms:
- Enhanced formulaire.php with transaction-based SQLite processing
- Updated index.php with database-driven form options
- Improved thanks.php to read from database views

The new architecture provides:
- Normalized database schema (19 tables, 2 views)
- Transaction safety and referential integrity
- CRUD operations for thesis management
- Filtering by year, orientation, AP program, publication status
- Secure file handling with metadata tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 10:08:50 +01:00
Théophile Gervreau-Mercier
99ccd60f90 Add SQLite database schema and documentation
Added complete database schema for Post-ERG thesis archive:
- schema.sql with full relational database structure
- README.md with schema documentation and usage examples
- SETUP.md with comprehensive setup and maintenance guide
- posterg_fiche-technique.md with technical specifications
- Database_TFE_test.csv and .ods with example data

Database features:
- Normalized relational schema (3NF)
- Support for multiple authors, supervisors, languages, formats, keywords
- Publication workflow (submission → defense → jury review → publication)
- Access control (Libre/Interne/Interdit)
- File attachments tracking
- Predefined reference tables for orientations, AP programs, finalities
- Views for simplified querying
- Automatic timestamps and cascade deletes
2026-01-27 15:37:55 +01:00
Théophile Gervreau-Mercier
0d3fc3ab9a Added justfile recipe file and the .gitignore 2026-01-27 14:58:00 +01:00
Théophile Gervreau-Mercier
14c82cfeed Mise à jours et création de READMEs dédier. 2026-01-26 15:58:24 +01:00
Théophile Gervreau-Mercier
2d343eee06 Organize into monorepo structure with resolved conflicts 2026-01-26 15:45:03 +01:00
Théophile Gervreau-Mercier
37ec8aa5c1 Prepare formulaire branch for merge 2026-01-26 15:45:03 +01:00
Théophile Gervreau-Mercier
0697753dd3 Move formulaire files to formulaire/ 2026-01-26 15:24:01 +01:00
Pontoporeia
567f4aaafb cleanup 2024-04-18 18:18:56 +02:00
Pontoporeia
19e9dc805b ajustement .gitignore 2023-05-12 12:05:56 +02:00
Pontoporeia
787f62a9e2 suppression du contenus de vendor et le fichier compose.lock 2023-05-12 10:38:54 +02:00
Pontoporeia
aa5d3a1610 nettoyage .gitignore 2023-05-12 10:37:02 +02:00
Pontoporeia
d0fb81d9b2 update des codeblock en shell pour le syntax highlighting 2023-05-12 10:26:25 +02:00
Pontoporeia
b7109290e0 ajout d'un contenus du README.md 2023-05-12 10:25:13 +02:00
Pontoporeia
393fabb345 maj du .gitignore 2023-05-12 10:06:13 +02:00
Pontoporeia
6f63b2efa3 ajout du .gitignore 2023-05-12 09:39:54 +02:00
Pontoporeia
3ee32e17fa update du projet, xml collection enlevé et méthode fait maison ajouter 2023-05-12 09:38:08 +02:00
Pontoporeia
9414966b24 ajustement formulaire 2023-05-12 09:31:41 +02:00
Pontoporeia
4a1e4b696e rewrite v1.0 2023-05-02 20:17:58 +02:00
Pontoporeia
763ad7d722 rewrite v0.8 2023-05-02 12:15:28 +02:00
Pontoporeia
9bf4593ae5 rebuild v0.5 2023-05-02 11:59:29 +02:00
Pontoporeia
ead6bc6d8e rebuild v0.1 2023-05-02 11:36:50 +02:00
Pontoporeia
f3dcfbf6ff Initial commit 2023-05-02 09:26:29 +00:00
Olivia Marly
85a81079c1 Merge branch 'master' of codeberg.org:memoireERG/posterg 2022-12-14 18:47:45 +01:00
Olivia Marly
7e6872126c creation formulaire + typo + style.css 2022-12-14 18:47:03 +01:00
Pontoporeia
50d51d4d04 changement des pages dans custom en xml 2022-12-14 18:07:05 +01:00
Pontoporeia
63de7d525f changement des pages de base et test sur le css 2022-12-14 15:08:53 +01:00
Pontoporeia
76fc408a9a changment de nom 2022-12-14 14:55:44 +01:00
Pontoporeia
6cdc65a63b ajout de la description du projet 2022-12-10 16:09:05 +01:00
Pontoporeia
75885b2074 changed README 2022-12-10 14:34:09 +01:00
Pontoporeia
ba6ee35e31 push initial du projet par Stéphane 2022-12-10 14:32:31 +01:00