mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
refactor: reorganize to standard PHP structure
- Moved /lib → /src (PHP source code)
- Moved /includes → /public/includes (main site templates)
- Admin section remains self-contained in /public/admin with its own /inc
- Updated all require/include paths across codebase
- Updated config/bootstrap.php, justfile, tests, docs
- All tests passing ✅
Structure now follows PHP best practices:
/config - Configuration files
/database - SQLite database + schema
/docs - Documentation (intact)
/nginx - Server config (intact)
/public - Web-accessible files (entry point)
/admin - Self-contained admin interface
/assets - CSS, fonts, icons
/includes - Main site templates (header/footer)
/scripts - Deployment scripts (intact)
/src - PHP source classes (Database, AdminAuth, RateLimit)
/tests - Test suites
This commit is contained in:
6
justfile
6
justfile
@@ -160,7 +160,7 @@ syntax:
|
||||
@echo "======================"
|
||||
@find . -maxdepth 1 -name "*.php" -not -path "./vendor/*" -exec php -l {} \; | grep -v "No syntax errors"
|
||||
@find admin/ -name "*.php" -exec php -l {} \; 2>/dev/null | grep -v "No syntax errors" || true
|
||||
@find lib/ -name "*.php" -exec php -l {} \; | grep -v "No syntax errors"
|
||||
@find src/ -name "*.php" -exec php -l {} \; | grep -v "No syntax errors"
|
||||
@echo "✅ All PHP files have valid syntax"
|
||||
|
||||
# ============================================================================
|
||||
@@ -315,7 +315,7 @@ clean:
|
||||
@echo "🧹 Cleaning up development files..."
|
||||
@rm -f error.log
|
||||
@rm -f admin/error.log
|
||||
@rm -rf lib/cache/rate_limit/*
|
||||
@rm -rf src/cache/rate_limit/*
|
||||
@rm -f /tmp/posterg-*.log
|
||||
@rm -f /tmp/posterg-*.pid
|
||||
@echo "✓ Cleanup complete"
|
||||
@@ -326,7 +326,7 @@ setup-dirs:
|
||||
@mkdir -p admin/data/theses
|
||||
@mkdir -p admin/data/covers
|
||||
@mkdir -p admin/data/yaml
|
||||
@mkdir -p lib/cache/rate_limit
|
||||
@mkdir -p src/cache/rate_limit
|
||||
@touch admin/data/theses/.gitkeep
|
||||
@touch admin/data/covers/.gitkeep
|
||||
@echo "✓ Directories created"
|
||||
|
||||
Reference in New Issue
Block a user