# ekeshwar247/evento- architecture

> Architecture diagram of the GitHub repository ekeshwar247/evento-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ekeshwar247/evento-
- Repository: https://github.com/ekeshwar247/evento-

## Overview

1. **Overall shape**
This is a classic PHP/MySQL monolith for event operations. The codebase is split into a public-facing visitor site and a protected admin/staff portal, both backed by the same MySQL database and sharing some common layout/assets.

2. **Runtime and persistence**
The application runs on a local PHP web server stack such as XAMPP. The schema and seed data live in `database/event_db.sql`, which is the central persistence boundary for events, venues, users, registrations, and booking inquiries.

3. **Public visitor subsystem**
The root-level pages (`index.php`, `home.php`, `venue.php`, `about.php`, `view_event.php`, `view_art.php`, `registration.php`, `booking.php`) form the visitor-facing side. This area exposes upcoming events, venue listings, about content, event detail pages, audience registration, and venue booking inquiries.

4. **Admin/staff subsystem**
Everything under `admin/` is the management portal. Key screens include `events.php`, `venue.php`, `booking.php`, `audience.php`, `users.php`, `site_settings.php`, plus reporting pages like `audience_report.php` and `venue_report.php`. These pages are used to create, edit, review, and publish operational data.

5. **Authentication and access boundary**
`admin/login.php` and the related admin session flow define the security boundary between public access and management access. The readme indicates multiple admin/staff accounts, so the portal supports role-based operational access even if the roles are implemented simply.

6. **Core domain entities**
The architecture centers on a few primary records: events, venues, users/admins, audience registrations, and venue booking requests. The reports reinforce these relationships: audience is grouped by event, and venue usage is grouped by venue and month.

7. **Business logic layer**
`admin/admin_class.php` appears to be the main server-side service layer for CRUD and workflow operations. It likely encapsulates database operations for events, venues, users, registrations, bookings, settings, and report generation, while `admin/ajax.php` handles asynchronous admin actions.

8. **Shared presentation layer**
The repository uses shared PHP includes like `head.php`, `header.php`, and `footer.php` for the public site, and `admin/header.php`, `admin/navbar.php`, and `admin/topbar.php` for the back office. This indicates a templated page composition model rather than a framework with a formal MVC structure.

9. **Media and file storage**
Uploaded images are stored on disk under `admin/assets/uploads/`, separated by entity type such as `event_*` and `venue_*`. That means the system has two stateful stores: the database for metadata and the filesystem for banners/photos/documents.

10. **Client-side behavior**
The UI depends on bundled static libraries in `admin/assets/`, especially DataTables for searchable/sortable admin lists and Font Awesome for icons. The root `js/scripts.js` and admin JS assets likely provide form interactions, table behavior, and AJAX-driven updates.

11. **Operational flow**
The main data flow is: staff/admin enters or edits venues and events in the admin portal, the public site reads and displays approved/published content, visitors submit registrations or booking inquiries, and staff then reviews those submissions in the admin queues. Reports are derived from the same stored records for printing and operational review.

12. **Architectural boundary summary**
In diagram terms, the important boundaries are: public visitor UI, authenticated admin UI, shared PHP include/layout layer, PHP business logic layer, MySQL database, and filesystem-based uploads. There are no signs of external APIs or background workers; the system is self-contained around server-rendered pages and database-backed CRUD.

Main entry points: [`admin/header.php`](https://github.com/ekeshwar247/evento-/blob/main/admin/header.php) (Admin layout), [`admin/admin_class.php`](https://github.com/ekeshwar247/evento-/blob/main/admin/admin_class.php) (Admin logic), [`database/event_db.sql`](https://github.com/ekeshwar247/evento-/blob/main/database/event_db.sql) (MySQL schema), [`header.php`](https://github.com/ekeshwar247/evento-/blob/main/header.php) (Shared layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_index_php["Landing<br/>public page<br/>[index.php]"]
  node_home_php["Home<br/>public page<br/>[home.php]"]
  node_venue_php["Venues<br/>public page<br/>[venue.php]"]
  node_event_detail["Event detail<br/>public page<br/>[view_event.php]"]
  node_registration_php["Registration<br/>public form<br/>[registration.php]"]
  node_booking_php["Booking<br/>public form<br/>[booking.php]"]
  node_public_layout["Shared layout<br/>includes<br/>[header.php]"]
end

subgraph group_admin["Admin portal"]
  node_admin_login["Admin login<br/>auth page<br/>[login.php]"]
  node_admin_home["Dashboard<br/>admin page<br/>[home.php]"]
  node_admin_events["Events<br/>admin module<br/>[events.php]"]
  node_admin_venues["Venues<br/>admin module<br/>[venue.php]"]
  node_admin_bookings["Bookings<br/>admin module<br/>[booking.php]"]
  node_admin_audience["Audience<br/>admin module<br/>[audience.php]"]
  node_admin_users["Users<br/>admin module<br/>[users.php]"]
  node_admin_reports["Reports"]
  node_admin_settings["Settings<br/>admin module<br/>[site_settings.php]"]
  node_admin_services["Admin logic<br/>php service layer<br/>[admin_class.php]"]
  node_admin_layout["Admin layout<br/>includes<br/>[header.php]"]
end

subgraph group_data["State"]
  node_db_sql[("MySQL schema<br/>database schema<br/>[event_db.sql]")]
  node_uploads[("Uploads<br/>filesystem store")]
end

subgraph group_assets["Assets"]
  node_ui_assets["UI assets<br/>static assets<br/>[scripts.js]"]
end

node_index_php -->|"uses"| node_public_layout
node_home_php -->|"uses"| node_public_layout
node_venue_php -->|"uses"| node_public_layout
node_event_detail -->|"uses"| node_public_layout
node_registration_php -->|"uses"| node_public_layout
node_booking_php -->|"uses"| node_public_layout
node_admin_login -->|"uses"| node_admin_layout
node_admin_home -->|"uses"| node_admin_layout
node_admin_events -->|"uses"| node_admin_layout
node_admin_venues -->|"uses"| node_admin_layout
node_admin_bookings -->|"uses"| node_admin_layout
node_admin_audience -->|"uses"| node_admin_layout
node_admin_users -->|"uses"| node_admin_layout
node_admin_reports -->|"uses"| node_admin_layout
node_admin_settings -->|"uses"| node_admin_layout
node_admin_home -->|"calls"| node_admin_services
node_admin_events -->|"calls"| node_admin_services
node_admin_venues -->|"calls"| node_admin_services
node_admin_bookings -->|"calls"| node_admin_services
node_admin_audience -->|"calls"| node_admin_services
node_admin_users -->|"calls"| node_admin_services
node_admin_reports -->|"calls"| node_admin_services
node_admin_settings -->|"calls"| node_admin_services
node_admin_login -->|"auth"| node_db_sql
node_public_layout -->|"loads"| node_ui_assets
node_admin_layout -->|"loads"| node_ui_assets
node_admin_services -->|"reads/writes"| node_db_sql
node_admin_events -->|"stores media"| node_uploads
node_admin_venues -->|"stores media"| node_uploads
node_home_php -->|"reads"| node_db_sql
node_venue_php -->|"reads"| node_db_sql
node_event_detail -->|"reads"| node_db_sql
node_registration_php -->|"writes"| node_db_sql
node_booking_php -->|"writes"| node_db_sql
node_admin_reports -->|"reads"| node_db_sql

click node_index_php "https://github.com/ekeshwar247/evento-/blob/main/index.php"
click node_home_php "https://github.com/ekeshwar247/evento-/blob/main/home.php"
click node_venue_php "https://github.com/ekeshwar247/evento-/blob/main/venue.php"
click node_event_detail "https://github.com/ekeshwar247/evento-/blob/main/view_event.php"
click node_registration_php "https://github.com/ekeshwar247/evento-/blob/main/registration.php"
click node_booking_php "https://github.com/ekeshwar247/evento-/blob/main/booking.php"
click node_public_layout "https://github.com/ekeshwar247/evento-/blob/main/header.php"
click node_admin_login "https://github.com/ekeshwar247/evento-/blob/main/admin/login.php"
click node_admin_home "https://github.com/ekeshwar247/evento-/blob/main/admin/home.php"
click node_admin_events "https://github.com/ekeshwar247/evento-/blob/main/admin/events.php"
click node_admin_venues "https://github.com/ekeshwar247/evento-/blob/main/admin/venue.php"
click node_admin_bookings "https://github.com/ekeshwar247/evento-/blob/main/admin/booking.php"
click node_admin_audience "https://github.com/ekeshwar247/evento-/blob/main/admin/audience.php"
click node_admin_users "https://github.com/ekeshwar247/evento-/blob/main/admin/users.php"
click node_admin_reports "https://github.com/ekeshwar247/evento-/blob/main/admin/audience_report.php"
click node_admin_settings "https://github.com/ekeshwar247/evento-/blob/main/admin/site_settings.php"
click node_admin_services "https://github.com/ekeshwar247/evento-/blob/main/admin/admin_class.php"
click node_admin_layout "https://github.com/ekeshwar247/evento-/blob/main/admin/header.php"
click node_db_sql "https://github.com/ekeshwar247/evento-/blob/main/database/event_db.sql"
click node_uploads "https://github.com/ekeshwar247/evento-/tree/main/admin/assets/uploads"
click node_ui_assets "https://github.com/ekeshwar247/evento-/blob/main/js/scripts.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_index_php,node_home_php,node_venue_php,node_event_detail,node_registration_php,node_booking_php,node_public_layout toneBlue
class node_admin_login,node_admin_home,node_admin_events,node_admin_venues,node_admin_bookings,node_admin_audience,node_admin_users,node_admin_reports,node_admin_settings,node_admin_services,node_admin_layout toneAmber
class node_db_sql,node_uploads toneMint
class node_ui_assets toneRose
```

## Components

### Public site

Visitor-facing pages and shared presentation for event discovery and submissions

- [Landing](https://github.com/ekeshwar247/evento-/blob/main/index.php): public page · Entry point for the visitor site · `index.php`
- [Home](https://github.com/ekeshwar247/evento-/blob/main/home.php): public page · Main public listing and navigation page · `home.php`
- [Venues](https://github.com/ekeshwar247/evento-/blob/main/venue.php): public page · Public venue browsing page · `venue.php`
- [Event detail](https://github.com/ekeshwar247/evento-/blob/main/view_event.php): public page · Public event and art detail views · `view_event.php`
- [Registration](https://github.com/ekeshwar247/evento-/blob/main/registration.php): public form · Audience sign-up flow · `registration.php`
- [Booking](https://github.com/ekeshwar247/evento-/blob/main/booking.php): public form · Venue booking inquiry flow · `booking.php`
- [Shared layout](https://github.com/ekeshwar247/evento-/blob/main/header.php): includes · Common public header, head, and footer composition · `header.php`

### Admin portal

Authenticated management screens and back-office workflows

- [Admin login](https://github.com/ekeshwar247/evento-/blob/main/admin/login.php): auth page · Authentication boundary for staff access · `admin/login.php`
- [Dashboard](https://github.com/ekeshwar247/evento-/blob/main/admin/home.php): admin page · Back-office landing and summary screen · `admin/home.php`
- [Events](https://github.com/ekeshwar247/evento-/blob/main/admin/events.php): admin module · Create, edit, and publish events · `admin/events.php`
- [Venues](https://github.com/ekeshwar247/evento-/blob/main/admin/venue.php): admin module · Manage venue records and details · `admin/venue.php`
- [Bookings](https://github.com/ekeshwar247/evento-/blob/main/admin/booking.php): admin module · Review and manage booking requests · `admin/booking.php`
- [Audience](https://github.com/ekeshwar247/evento-/blob/main/admin/audience.php): admin module · Review registrations and attendance records · `admin/audience.php`
- [Users](https://github.com/ekeshwar247/evento-/blob/main/admin/users.php): admin module · Manage staff and admin accounts · `admin/users.php`
- [Reports](https://github.com/ekeshwar247/evento-/blob/main/admin/audience_report.php): admin reports · Audience and venue reporting views · `admin/audience_report.php`
- [Settings](https://github.com/ekeshwar247/evento-/blob/main/admin/site_settings.php): admin module · Site configuration and operational settings · `admin/site_settings.php`
- [Admin logic](https://github.com/ekeshwar247/evento-/blob/main/admin/admin_class.php): php service layer · Shared CRUD, workflow, and AJAX handling for the portal · `admin/admin_class.php`
- [Admin layout](https://github.com/ekeshwar247/evento-/blob/main/admin/header.php): includes · Common admin header, navbar, and topbar composition · `admin/header.php`

### State

Database and filesystem storage used by the application

- [MySQL schema](https://github.com/ekeshwar247/evento-/blob/main/database/event_db.sql): database schema · Central persistence for events, venues, users, registrations, bookings, and settings · `database/event_db.sql`
- [Uploads](https://github.com/ekeshwar247/evento-/tree/main/admin/assets/uploads): filesystem store · Stored event and venue media on disk · `admin/assets/uploads`

### Assets

Static client-side libraries and UI resources

- [UI assets](https://github.com/ekeshwar247/evento-/blob/main/js/scripts.js): static assets · Client-side libraries, styles, and scripts such as DataTables, Font Awesome, and site JS · `js/scripts.js`

## Connections

- Landing → Shared layout: uses · Composes shared public chrome
- Home → Shared layout: uses · Uses shared site layout
- Venues → Shared layout: uses · Uses shared site layout
- Event detail → Shared layout: uses · Uses shared site layout
- Registration → Shared layout: uses · Uses shared site layout
- Booking → Shared layout: uses · Uses shared site layout
- Admin login → Admin layout: uses · Uses admin chrome after auth
- Dashboard → Admin layout: uses · Uses admin chrome
- Events → Admin layout: uses · Uses admin chrome
- Venues → Admin layout: uses · Uses admin chrome
- Bookings → Admin layout: uses · Uses admin chrome
- Audience → Admin layout: uses · Uses admin chrome
- Users → Admin layout: uses · Uses admin chrome
- Reports → Admin layout: uses · Uses admin chrome
- Settings → Admin layout: uses · Uses admin chrome
- Dashboard → Admin logic: calls · Dashboard reads operational data through shared service layer
- Events → Admin logic: calls · Event CRUD goes through shared business logic
- Venues → Admin logic: calls · Venue CRUD goes through shared business logic
- Bookings → Admin logic: calls · Booking workflows go through shared business logic
- Audience → Admin logic: calls · Registration workflows go through shared business logic
- Users → Admin logic: calls · User management goes through shared business logic
- Reports → Admin logic: calls · Reports are assembled from shared data access
- Settings → Admin logic: calls · Settings are read and updated through shared logic
- Admin login → MySQL schema: auth · Validates credentials against persisted user records
- Shared layout → UI assets: loads · Loads shared CSS and JavaScript
- Admin layout → UI assets: loads · Loads admin CSS, DataTables, icons, and scripts
- Admin logic → MySQL schema: reads/writes · Central database access for CRUD and reports
- Events → Uploads: stores media · Event images are uploaded to disk
- Venues → Uploads: stores media · Venue images are uploaded to disk
- Home → MySQL schema: reads · Public content is rendered from database records
- Venues → MySQL schema: reads · Venue listings are read from the database
- Event detail → MySQL schema: reads · Event detail pages are read from the database
- Registration → MySQL schema: writes · Visitor registrations are stored in the database
- Booking → MySQL schema: writes · Booking inquiries are stored in the database
- Reports → MySQL schema: reads · Report pages aggregate persisted operational data
