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
This commit is contained in:
Théophile Gervreau-Mercier
2026-02-06 11:33:20 +01:00
parent d2b3c6ca67
commit e789c286de
24 changed files with 2365 additions and 1125 deletions

View File

@@ -65,6 +65,7 @@ deploy:
@echo ""
@echo "Deploying public site..."
rsync -vur --progress \
--chown="root:posterg" \
--exclude 'vendor' \
--exclude 'tests' \
--exclude 'test.db' \
@@ -72,8 +73,8 @@ deploy:
--exclude 'cache' \
--exclude '*.md' \
--exclude '.git*' \
--exclude '.jj' \
--exclude '.DS_Store' \
--exclude 'admin' \
--exclude 'database' \
--exclude 'nginx' \
--exclude 'docs' \
@@ -82,17 +83,6 @@ deploy:
--exclude 'setup-dev.sh' \
./ posterg:/var/www/html/
@echo ""
@echo "Deploying admin panel..."
rsync -vur --progress \
--exclude 'test.db' \
--exclude '*.db' \
--exclude 'cache' \
--exclude '*.md' \
./admin/ posterg:/var/www/html/admin/
@echo ""
@echo "Deploying shared libraries..."
rsync -vur --progress --exclude 'test.db' ./lib/ posterg:/var/www/html/lib/
@echo ""
@echo "Fixing permissions..."
ssh posterg "chgrp -R posterg /var/www/html/inc /var/www/html/lib && \
chmod 755 /var/www/html/inc && chmod 644 /var/www/html/inc/* && \
@@ -105,6 +95,15 @@ deploy:
@echo " • Public: https://posterg.erg.be/"
@echo " • Admin: https://posterg.erg.be/admin/"
[group('deploy')]
test-deploy:
@echo "⚠️ Deploying test database (will overwrite remote test.db)"
@echo "Creating database directory if needed..."
ssh posterg "mkdir -p /var/www/html/database"
rsync -vur --progress ./database/test.db posterg:/var/www/html/database/test.db
@echo "Setting correct permissions..."
ssh posterg "chgrp posterg /var/www/html/database /var/www/html/database/test.db && chmod 775 /var/www/html/database && chmod 660 /var/www/html/database/test.db"
@echo "✅ Test database deployed and configured"
# ============================================================================
# Testing
# ============================================================================