How yaya1426/mawid-nodejs works
This is a server-rendered event-management application: organizers sign up or log in, create events, and view attendee lists; visitors browse events and register, with capacity and duplicate-registration checks before confirmation. Express routes dispatch to controllers, which coordinate authentication and event/registration models backed by Prisma and MariaDB. Sessions are persisted through a Prisma session store. The views directory supplies the rendered pages. Relationships reflect the sampled source; unsampled startup and schema details are not expanded.
Main entry points: prisma.js Prisma client · app.js Express app · auth.controller.js Auth workflows · event.controller.js Event workflows
Components 14
Web application
- Express app
src/app.js - Auth routes
src/routes/auth.routes.js - Event routes
src/routes/event.routes.js - Rendered pages
src/views
Authentication
- Auth workflows
src/controllers/auth.controller.js - Auth guard
src/middleware/requireAuth.js - Session handling
src/session.js - User records
src/models/user.model.js
Event management
- Event workflows
src/controllers/event.controller.js - Event records
src/models/event.model.js - Registrations
src/models/registration.model.js
Persistence
- Prisma client
src/prisma.js - MariaDB database
Other components
- Visitor or organizer
Connections 18
- Visitor or organizer → Express app: sends requests
src/app.js - Express app → Auth routes: mounts routes
src/app.js - Express app → Event routes: mounts routes
src/app.js - Express app → Session handling: installs middleware
src/app.js - Auth routes → Auth workflows: dispatches to
src/routes/auth.routes.js - Event routes → Auth guard: guards routes
src/routes/event.routes.js - Event routes → Event workflows: dispatches to
src/routes/event.routes.js - Auth workflows → User records: reads or creates
src/controllers/auth.controller.js - Auth workflows → Session handling: sets or destroys
- Auth workflows → Rendered pages: renders pages
src/controllers/auth.controller.js - Event workflows → Event records: reads or creates
src/controllers/event.controller.js - Event workflows → Registrations: creates or lists
src/controllers/event.controller.js - Event workflows → Rendered pages: renders pages
src/controllers/event.controller.js - User records → Prisma client: queries
src/models/user.model.js - Event records → Prisma client: queries
src/models/event.model.js - Registrations → Prisma client: queries
src/models/registration.model.js - Session handling → Prisma client: stores sessions
src/session.js - Prisma client → MariaDB database: uses adapter
src/prisma.js