Skip to content

desraymondz/ventEvent

Repository files navigation

ventEvent

Coursework for the University of London, CM2040: Database networks and the Web — a small event app where organisers manage events and tickets, and attendees browse, filter, and book.

JavaScript Node.js Express SQLite EJS Tailwind CSS
Grade

Demo

ventEvent — CM2040 demo

What it does

  • Organisers — Register / login (bcrypt, express-validator), sessions, site settings, draft & publish events, categories & tags, full + concession tickets and quotas, bookings and remaining counts on the dashboard.
  • Attendees — List published events, filter by category, search titles & tags, book tickets; small JS helpers in public/js/ (timezone, forms, copy link, confirmations).
  • Database — SQLite (database.db from db_schema.sql): organisers, events, bookings, plus categories / tags / event_tags for the discoverability work.

Stack & shape

  • Presentation — EJS views, Tailwind (CDN), static assets in public/.
  • Application — Express, routes/auth.js, organiser.js, attendee.js, middleware/requireLogin.js.
  • Datasqlite3, queries mostly via util/dbHelpers.js.

The submitted report’s architecture diagram marks table-heavy flows (events, tags, event_tags, categories) vs search/filter (GET query params → dynamic SQL → EJS).

Coursework extensions

  • Also built — organiser auth, bookings on organiser home, remaining tickets for organiser and attendee views.
  • Report focusDiscoverability on /attendee/home: category dropdown + keyword search (title or tag), combinable, filtered in SQL with bound parameters (routes/attendee.js).
  • How search works — Optional GET ?search=&category=; SQL adds LIKE on title and/or a subquery on tags; optional AND c.category_name = ?; template gets selectedCategory and searchQuery so the form doesn’t reset.
  • Extra tablescategories (pre-seeded), tags (unique names), event_tags (many-to-many, ON DELETE CASCADE on both FKs).

Getting started

  • Needs — Node ≥ 16, npm ≥ 8, sqlite3 CLI on PATH for build-db.
npm install
npm run build-db    # macOS/Linux → creates database.db
npm start             # http://localhost:3000
  • Windowsnpm run build-db-win instead of build-db.
  • Reset DBnpm run clean-db (or clean-db-win), then build-db again.

Project layout

  • index.js — app, session, DB handle, route mounting
  • routes/auth, organiser, attendee
  • util/dbHelpers.js — shared queries
  • views/ — EJS + layout.ejs
  • public/ — CSS + client JS
  • db_schema.sql — schema + category seeds

📄 License

This project is coursework for the University of London module CM2040: Database networks and the Web and is intended for educational purposes.

About

Midterm for Database Network and the Web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors