How srfrancklo0309/nexus_event works
Project Type and Purpose
– Nexus Event is a full-stack web application (static frontend + mock backend) for managing and publishing events, subscriptions, and contacts.
– Frontend: HTML5 pages, CSS (Bulma + custom), JavaScript (ES6 modules).
– Backend: JSON Server (REST API) with a simple JSON file as the data store.
High-Level File Structure Analysis
• Root
– index.html, app.js
– pages/*.html (login, dashboard, events, suscriptions, contacts)
– scripts/*.js (page-specific logic + bulma.js)
– api/*.js (API wrappers: API.js + user, event, subscription, contact modules)
• assets/
– css/*.css (common and per-page styles)
– db/db.json (data store for JSON Server)
– img, videos/ (media assets)
• Config
– package.json (npm scripts to launch Live Server & JSON Server)
a. Frontend (Browser)
– Static Server (Live Server @5500)
– HTML pages + CSS + JS modules (app.js, scripts/, api/)
b. API Layer (Client-side wrappers)
– api/API.js (base fetch logic)
– api/userAPI.js, eventAPI.js, suscriptionAPI.js, contactAPI.js
c. Backend (Mock Server)
– JSON Server @3000 serving REST endpoints (/users, /events, /suscriptions, /contacts)
– Data store: assets/db/db.json
d. External Services
– Google Maps (embedded in contact form)
– (Planned) Email Service for subscriptions
Component Relationships and Data Flows
– Browser → Live Server: GET index.html, CSS, JS modules
– JS Modules (app.js + page scripts) → API wrappers → JSON Server REST endpoints
– JSON Server → Reads/Writes assets/db/db.json → Returns JSON payloads
– Browser renders data (events grid, contact form feedback, admin dashboards)
– Browser ↔ Google Maps (script include + API calls)
Architectural Patterns & Principles
– Modularization: Separate API logic from UI logic (api/ vs scripts/)
– Single Responsibility: Each JS module handles one page or one resource
– Separation of Concerns: Static assets served separately, data served via REST
– Progressive Enhancement: Plain HTML pages augmented with JS modules
Checklist
• Grouped sub-components for pages, scripts, API modules