How elie-e/zener works
Main Components
A. Client Layer
• Web Browser
• AJAX Requests Handler
• Frontend Views (organized in views/ directory)
B. Web Server Layer (Apache)
• Entry Point (public/index.php)
• .htaccess Configuration
C. Application Layer
• Controllers (AuthController, QuoteController, etc.)
• Models (User, Quote, Comment, Like)
• Database Abstraction Layer (Database.php)
D. Data Layer
• MySQL Database
• Tables (Users, Quotes, Comments, Likes)
E. Docker Infrastructure
• PHP Container
• MySQL Container
┌─ Client Layer ─────────────────────┐
• Web Browser / AJAX Requests │
• ┬───────────────────┘
• ↓
┌─ Web Server Layer ─────────────────┐
• Apache (.htaccess routing) │
• Entry Point (public/index.php) │
• ┬───────────────────┘
• ↓
┌─ Application Layer ────────────────┐
• ┌─ Controllers ─┐ ┌─ Models ─────┐ │
• Auth │ │ - User │ │
• Quote │ │ - Quote │ │
• Comment │ │ - Comment │ │
• Like │ │ - Like │ │
• ┘ └─────────────┘ │
• ┌─ Database Abstraction Layer ───┐ │
• Database.php (PDO, Singleton) │ │
• ┘ │
• ┬───────────────────┘
• ↓
┌─ Data Layer ──────────────────────┐
• MySQL Database │
• Users Table │
• Quotes Table │
• Comments Table │
• Likes Table │
• ┘
Additional Elements
A. Security Layer (cross-cutting):
• Password Hashing
• SQL Injection Protection
• XSS Protection
• CSRF Protection
B. Docker Infrastructure:
• Container relationships
• Network configuration
• Volume mounts
Key Interactions to Highlight
• User Authentication Flow
• Quote Creation/Retrieval Flow
• Comment Threading System
• Like Toggle Mechanism
• Database Connection Pool
Important Notes
• Stateless nature of the application
• Security measures at each layer
• Docker container boundaries
• Notes for important design patterns (e.g., Singleton for Database)
Technical Specifications to Note
• PHP 8.2 runtime
• MySQL database
• Apache web server
• Docker containerization
• PDO database abstraction
• Tailwind CSS for frontend