A colorful, responsive news/events portal for MAHARAJA INSTITUTE OF TECHNOLOGY MYSORE with a lightweight Node/Express backend that serves detailed event data.
Files:
index.html— main page (student-facing)styles.css— styling (colorful glass look)script.js— fetches events from the backend, search, filters, and links to detail/registration pagesevent.html/event.js— standalone event detail view (read-only)register.html/register.js— dedicated registration pageadmin.html/admin.js— admin console for CRUD on events and registration approvalsserver.js— Express server exposing event and registration APIsdata/events.json— canonical source for all news/event metadatadata/registrations.json— submissions captured from the registration form
How to run
-
Install dependencies (first time only):
cd c:\Users\91903\Desktop\filename npm install -
Start the backend API:
npm start
The Express server listens on
http://localhost:4000and exposes:GET /api/events(supports?category=and?q=filters)GET /api/events/:idPOST /api/events— create new event (seeadmin.jsfor payload shape)DELETE /api/events/:idGET /api/registrations(supports?eventId=)POST /api/registrations— body{ eventId, name, email, department?, year?, phone?, notes? }PATCH /api/registrations/:id— update{ status: 'pending' | 'accepted' | 'rejected' }
-
New visitors should first open
signup.html, pick their role (student or admin), complete the short form, and they'll be redirected tologin.html. From there sign in as either Student/Reader (lands onindex.html) or Admin/Staff (lands onadmin.html). Keep the backend running the whole time.- Students can browse
index.html, click Read for details, or Register to submit a form. - Admins can use
admin.htmlto add/delete events and accept/reject registrations. - Credentials created during signup are stored in your browser's
localStorage; login will fail if the email, password, and role combination does not match a saved account.
- Students can browse
Optional static hosting: serve the index.html page via any static server if you prefer not to use file:// URLs.
Next steps (optional):
- Persist events in a database (SQLite, MongoDB, etc.).
- Add pagination or infinite scroll for large feeds.
- Add authentication and dashboards for contributors.
- Pipe registrations to email/SMS notifications or sync with Google Sheets/Airtable.