https://github.com/jillmpla/node_js_space_events_app
Space-themed event management app built with Node.js, Express, EJS, and MongoDB Atlas. MVC architecture with session-based authentication and role-based authorization, RSVP workflow, and Cloudinary uploads.
https://github.com/jillmpla/node_js_space_events_app
bcrypt ejs events events-management events-manager express helmet javascript mongodb mongodb-atlas mongoose multer mvc mvc-pattern node-js nodejs webapp webapplication
Last synced: 2 months ago
JSON representation
Space-themed event management app built with Node.js, Express, EJS, and MongoDB Atlas. MVC architecture with session-based authentication and role-based authorization, RSVP workflow, and Cloudinary uploads.
- Host: GitHub
- URL: https://github.com/jillmpla/node_js_space_events_app
- Owner: jillmpla
- License: mit
- Created: 2024-07-06T04:07:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-13T06:10:56.000Z (7 months ago)
- Last Synced: 2026-04-14T22:06:20.122Z (2 months ago)
- Topics: bcrypt, ejs, events, events-management, events-manager, express, helmet, javascript, mongodb, mongodb-atlas, mongoose, multer, mvc, mvc-pattern, node-js, nodejs, webapp, webapplication
- Language: EJS
- Homepage: https://celestialgatherings.com/
- Size: 20.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Celestial Gatherings
Celestial Gatherings is a **space-themed event management platform** that makes it easy to create, share, and join events under the stars. Built with **Node.js, Express.js, MongoDB Atlas, and EJS**, it follows the MVC pattern and provides a smooth, secure experience for both event hosts and guests.
The app combines **robust backend functionality** with a **clean, responsive UI/UX**, giving users everything they need to plan astronomy meetups, science talks, watch parties, or any gathering that feels *out of this world*.
๐ **Live Demo:** [celestialgatherings.com](https://www.celestialgatherings.com)
>๐ *Note: Demo resets daily.*
Want to explore without signing up?
Use the following demo credentials:
- **Email:** `johndoe2@gmail.com`
- **Password:** `JaaL42$Aa`
---
## โจ Core Functionality
- **Event Management**
Create, edit, and manage events with full CRUD capabilities. Each event includes title, category, location, description, start/end dates, and optional image.
- **RSVP System**
Registered users can RSVP `YES / NO / MAYBE`. Hosts are prevented from RSVPing to their own events to keep data clean and meaningful.
- **Authentication & Profiles**
Secure sign-up and login with session-based auth. Logged-in users can view their profile, hosted events, and RSVPs.
- **Image Hosting**
Upload event images via **Cloudinary** (with Multer). If no image is uploaded, a placeholder is used.
- **User Feedback**
Flash messages and custom error pages provide clear guidance for success, warning, and error states.
- **Responsive UI/UX**
Space-inspired theme with accessible forms, visible focus states, and navigation that adapts to login state.
---
## ๐ ๏ธ Tech Stack
- **Frontend**: EJS templates, Bootstrap 4, custom CSS
- **Backend**: Node.js, Express.js
- **Database**: MongoDB Atlas with Mongoose
- **Authentication**: `express-session` + `connect-mongo` session storage
- **File Uploads**: Multer + Cloudinary (`multer-storage-cloudinary`)
- **Validation & Security**: express-validator, validator, Helmet, express-rate-limit, bcryptjs
- **Performance & Logging**: compression, morgan
- **Utilities**: Luxon (date/time), he (HTML entity encoding)
---
## ๐ Authentication & Authorization
- **Guests** can:
- Browse events
- **Registered Users** can:
- Sign up / log in securely
- RSVP to events
- Host new events
- Edit or delete events they created
- Manage RSVPs
- **Authorization** middleware ensures only event hosts can modify their own events.
---
## ๐งโ๐จ UI/UX
- **Space-inspired theme** with deep blues and cosmic accents
- **Accessible forms** with visible focus states, proper input validation, and keyboard-friendly navigation
- **Dynamic header navigation**: changes based on login state (Sign Up/Login vs. Profile/New Event/Logout)
- **Custom error views**: informative 400, 401, 404, and 500 pages
- **Responsive layouts**: looks great on desktop, tablet, and mobile
---
## ๐งฉ Design System
- Shared style variables in one place (colors, spacing, corners, shadows, type)
- Consistent hover/active/focus states across main nav and account links
- Text scales smoothly on all screens; clean spacing; sticky footer; no layout shift
---
## โฟ Accessibility
- Full keyboard support: clear focus outline + "skip to content" link
- Semantic landmarks (header, nav, main, footer), time elements, meaningful headings
- Forms announce errors; labels tied to inputs; status messages are announced
- Large, readable text and strong color contrast (meets WCAG AA level)
- Respects "Reduce Motion" preference
---
## ๐งช Validation & Error Handling
- Uses **express-validator** to validate/sanitize form input
- Passwords are hashed securely with **bcrypt** before storage
- Friendly error pages for:
- Invalid IDs
- Unauthorized access
- Missing resources
- Server/database errors
---
## ๐ Key Libraries
- Backend: `express`, `mongoose`, `express-session`, `connect-mongo`
- Auth/Security: `bcryptjs`, `express-rate-limit`, `helmet`, `validator`
- File Uploads: `multer`, `multer-storage-cloudinary`, `cloudinary`
- Validation/Formatting: `express-validator`, `luxon`, `he`
- UX/Feedback: `connect-flash`
- Performance/Logging: `compression`, `morgan`
---
## ๐งฑ Project Structure (MVC)
This codebase follows the Model-View-Controller (MVC) pattern. This keeps the app maintainable, testable, and easy to extend.
- **Models (Mongoose):** data schema + validation.
- **Views (EJS):** server-rendered HTML templates.
- **Controllers (Express):** request in โ response out.
- **Routes:** HTTP method + path โ controller.
- **Middleware:** pre-route logic (auth/sessions/logging).
```bash
โโ app.js #app entrypoint: Express config, sessions, MongoDB, routes, views
โโ middlewares.js #auth/role checks (isAuthenticated, isGuest, isHost/isNotHost)
โโ controllers/ #controllers (request handlers)
โ โโ mainController.js #home/about/contact
โ โโ userController.js #auth, profile
โ โโ eventController.js #event CRUD, RSVP
โโ models/ #models (Mongoose schemas)
โ โโ user.js
โ โโ eventModel.js
โ โโ rsvp.js
โโ routes/ #express routers
โ โโ mainRoutes.js
โ โโ userRoutes.js
โ โโ eventRoutes.js
โโ views/ #views (EJS templates)
โ โโ about.ejs
โ โโ contact.ejs -
โ โโ edit.ejs -
โ โโ error.ejs
โ โโ event.ejs -
โ โโ events.ejs
โ โโ index.ejs
โ โโ login.ejs
โ โโ newEvent.ejs
โ โโ profile.ejs
โ โโ signup.ejs -
โ โโ partials/ #shared UI
โ โโ header.ejs
โ โโ footer.ejs
โ โโ nav.ejs
โโ public/ #static assets served by Express
โ โโ css/
โ โโ images/
โ โโ javascript/ #client-side scripts
โโ package.json
โโ package-lock.json
```
---
## ๐ Getting Started (Local Dev)
1) Clone repository
```bash
git clone https://github.com/jillmpla/node_js_space_events_app.git
cd node_js_space_events_app
```
2) Install dependencies
```bash
npm install
```
3) Create a .env file with your keys
```bash
MONGODB_URI=...
SECRET_KEY=...
CLOUDINARY_CLOUD_NAME=...
CLOUDINARY_API_KEY=...
CLOUDINARY_API_SECRET=...
CLOUDINARY_URL=...
```
4) Run the app
```bash
npm start
```
5) Visit: http://localhost:3000
---
## ๐ License
This project is licensed under the MIT License. See the [License](./LICENSE) file for details.
## If you find this project useful, consider giving it a star! โญ