mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
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>
54 lines
1.6 KiB
Makefile
54 lines
1.6 KiB
Makefile
# Justfile for Post-ERG front-backend website
|
|
|
|
# Default recipe - show available commands
|
|
default:
|
|
@just --list
|
|
|
|
# Start PHP development server
|
|
serve:
|
|
@echo "Starting PHP development server on http://localhost:8000"
|
|
@echo "Using database: ../formulaire/test.db"
|
|
@echo "Press Ctrl+C to stop"
|
|
@php -S 127.0.0.1:8000
|
|
|
|
# Test database connection
|
|
test:
|
|
@echo "Testing database connection..."
|
|
@php test_db.php
|
|
|
|
# Show database statistics
|
|
stats:
|
|
@echo "=== Database Statistics ==="
|
|
@sqlite3 ../formulaire/test.db "SELECT COUNT(*) || ' total theses' FROM theses;"
|
|
@sqlite3 ../formulaire/test.db "SELECT COUNT(*) || ' published theses' FROM theses WHERE is_published = 1;"
|
|
@sqlite3 ../formulaire/test.db "SELECT COUNT(*) || ' authors' FROM authors;"
|
|
@sqlite3 ../formulaire/test.db "SELECT COUNT(*) || ' keywords' FROM keywords;"
|
|
|
|
# Show recent published theses
|
|
recent:
|
|
@echo "=== Recent Published Theses ==="
|
|
@sqlite3 -column -header ../formulaire/test.db "SELECT id, title, year, authors FROM v_theses_public ORDER BY year DESC, title LIMIT 10;"
|
|
|
|
# Query database interactively
|
|
query:
|
|
@sqlite3 ../formulaire/test.db
|
|
|
|
# Show specific thesis details
|
|
show id:
|
|
@sqlite3 -column -header ../formulaire/test.db "SELECT * FROM v_theses_full WHERE id = {{id}};"
|
|
|
|
# Check PHP syntax for all PHP files
|
|
check:
|
|
@echo "Checking PHP syntax..."
|
|
@php -l Database.php
|
|
@php -l index.php
|
|
@php -l memoire.php
|
|
@php -l apropos.php
|
|
@php -l contact.php
|
|
@php -l licences.php
|
|
@echo "✓ All files have valid syntax"
|
|
|
|
# View error log
|
|
logs:
|
|
@if [ -f error.log ]; then tail -n 50 error.log; else echo "No error log found"; fi
|