How alextselegidis/easyappointments works
Project Type and Purpose
• The README makes it clear that Easy!Appointments is a self-hosted appointment scheduler. It allows customers to book appointments and supports external services such as Google Calendar, email notifications, and LDAP integration.
• The project is a full-stack application built in PHP using CodeIgniter (as evidenced by the “system” and “application” folders which follow the CodeIgniter structure). It leverages an MVC pattern for its interaction logic.
Analyzing the File Structure
• Major directories such as “application” (which holds controllers, models, views, configuration, helpers, and language files) indicate the core business logic in MVC format.
• “assets” holds the client-side elements: CSS stylesheets (including themes), JavaScript (both custom code and utility libraries), and images. This separates the web interface’s presentation layer clearly from the backend.
• “system” includes the CodeIgniter core libraries, showing that much of the web framework functionality is handled here.
• “libraries” and “migrations” under “application” demonstrate custom extensions (e.g., integration with Google or LDAP) and database versioning.
• The presence of Docker and configuration files (docker-compose.yml, nginx configs, PHP-FPM) highlights that containerized deployment is supported.
Key Components
• Client / Browser – represents the user’s browser accessing the application.
• Web Server – Apache or Nginx handling HTTP requests. Note that there is also a Dockerized PHP-FPM container for PHP execution.
• Frontend – assets (HTML, CSS, JavaScript) and view templates located in application/views and assets.
• Application Layer (Backend – MVC)
▪ Controllers – located under application/controllers (plus API controllers under application/controllers/api/v1).
▪ Models – data access and business logic in application/models.
▪ Views – the presentation layer in application/views (with separate layouts and components).
▪ Core libraries – custom PHP libraries under application/libraries, and extended core functionality under application/core.
• Database – a MySQL (or similar) database accessed via CodeIgniter’s DB abstraction; configuration is in application/config/database.php.
• External Services
▪ Google Calendar – through libraries like Google_sync.php.
▪ Email Notification – via EA_Email and email configurations.
▪ LDAP and third-party integrations – seen in controllers and libraries (e.g., Ldap_client.php).
▪ Other integrations such as Matomo analytics, CalDAV sync, and webhooks.
• Deployment Environment – represent Docker containers where applicable (for PHP-FPM, Nginx) as well as configuration files guiding deployment.
Relationship and Data Flow
• The web server (Apache/Nginx, potentially running inside Docker containers) passes the request to the PHP runtime which then loads CodeIgniter core from the “system” folder.
• CodeIgniter routes the request to the appropriate Controller in the “application/controllers” folder. These controllers then interact with Models (business logic/data access within “application/models”) and eventually load Views (located in “application/views”) to be sent as HTTP responses.
• The Controllers and Models use helpers, libraries, and migrations – making clear how configuration files in “application/config” and custom classes in “application/libraries” (for example, for Google, LDAP or calendar sync) contribute to the business logic.
• Data storage is managed via a database (configured through application/config/database.php) – illustrate the read/write flows from the application to the database.
• External service integrations (such as Google Calendar sync, email notifications, etc.) are initiated by controllers or libraries, so include directional lines showing outbound communication to these services.
Architectural Patterns and Technologies
• MVC Pattern – separation of controllers, models, and views.
• REST API Support – the “api/v1” controllers indicate a RESTful interaction (these should be highlighted as separate API endpoints).
• Containerization – Docker configuration for isolating the web server and PHP environments.
• Use of CodeIgniter framework – core system provided under “system” and custom modifications in “application/core”.
• Frontend frameworks and themes – assets include multiple SCSS/CSS themes to tailor the UI.