A full-featured web application for managing and displaying upcoming and past events. Built using Node.js, Express, EJS, MySQL, & Bootstrap.
- 🔐 Admin login system (session-based)
- 📅 Add, edit, delete upcoming events
- 📜 View past events automatically (auto-update logic included)
- 🔎 Public pages to view upcoming and past events
- 📂 Admin dashboard with sidebar navigation
- 🧠 Auto-update logic: Moves events to "past" based on date and time
- Backend: Node.js, Express.js
- Frontend: HTML, CSS (Bootstrap), EJS
- Database: MySQL
- Session Management: express-session
All admin routes are protected using a requireAdmin
middleware:
function requireAdmin(req, res, next) {
if (!req.session || req.session.role !== "admin") {
return res.send("Access Denied! Session not initialized.");
}
next();
}
- Clone the repository:
git clone https://github.com/Mubeen-Channa/Event-Management-Web-App
cd your-repo-name
- Install dependencies:
npm install
-
Configure .env or DB connection in db.js.
-
Run the server:
node server.js
- Open in browser:
http://localhost:3000
Let me know if you'd like to add deployment steps (e.g., for Vercel, Render, or cPanel) or database schema instructions!