Skip to content

mohammedabusamra04/CodeAlpha_EventRegistrationSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽช EventPulse โ€” Premium Event Registration System

EventPulse is a robust, production-ready Event Registration and Management System. Designed with a secure Node.js & Express REST API backend and a lightweight, dynamic vanilla JavaScript frontend, EventPulse provides organizers and attendees with a seamless workflow for discovering, hosting, reviewing, and registering for premium events.


๐Ÿ”— Live Demo

Experience the live application deployed on Render:
๐Ÿ‘‰ EventPulse Live Demo


โœจ Features

๐Ÿ‘ค User & Organizer Management

  • Role-Based Access Control (RBAC): Distinct permissions for user, organizer, and admin roles.
  • Secure Authentication: JWT-based stateless authentication with password hashing powered by bcrypt.
  • Profile Customization: Support for user avatars, phone numbers, and profile details.

๐Ÿ“… Event Management & Discovery

  • Full CRUD Operations: Organizers can create, edit, publish, and delete events.
  • Lifecycle States: Events transition smoothly through draft, published, cancelled, and completed states.
  • Categorization: Events are grouped dynamically under specific categories (e.g., Tech, Music, Business).
  • Capacity Tracking: Real-time seat availability tracking to prevent overbooking.

๐ŸŽŸ๏ธ Registration & Ticketing

  • One-Click Registrations: Attendees can register for events and receive unique ticket codes.
  • Status Tracking: Ticket lifecycle states including pending, confirmed, cancelled, and attended.
  • Flexible Payments: Support for tracking free, paid, and refunded transactions.

๐Ÿ’ฌ Social & Interaction

  • Event Reviews & Ratings: Registered attendees can rate events (1-5 stars) and write comments.
  • Notification System: Instant alerts for registrations, reminders, event cancellations, and reviews.

๐Ÿ› ๏ธ Tech Stack

Backend

  • Runtime Environment: Node.js (v18+)
  • Framework: Express.js (v5)
  • ORM: Sequelize (v6)
  • Database: PostgreSQL (Production/Config), SQLite (Local/Development testing)
  • Security: Helmet, Express Rate Limit (DDoS mitigation), CORS middleware

Frontend

  • Markup & Structure: Semantic HTML5
  • Styling: Vanilla CSS (Glassmorphism design, responsive layouts)
  • Client-side Logic: Vanilla JavaScript (ES6 Fetch API)

๐Ÿ“ Project Structure

CodeAlpha_EventRegistrationSystem/
โ”œโ”€โ”€ public/                 # Static assets served by Express
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ””โ”€โ”€ style.css       # Core design system & modern UI styling
โ”‚   โ””โ”€โ”€ js/
โ”‚       โ”œโ”€โ”€ auth.js         # Authentication helpers
โ”‚       โ”œโ”€โ”€ dashboard.js    # Attendee & Organizer dashboard actions
โ”‚       โ”œโ”€โ”€ event-details.js# Single event interactions & reviews
โ”‚       โ”œโ”€โ”€ events.js       # Event listing and category filtering
โ”‚       โ””โ”€โ”€ main.js         # Core fetch wrappers & navigation controller
โ”œโ”€โ”€ src/                    # Backend application source code
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”œโ”€โ”€ database.js     # Sequelize database connection setup
โ”‚   โ”‚   โ””โ”€โ”€ seed.js         # Database seeding script (default categories & test data)
โ”‚   โ”œโ”€โ”€ controllers/        # Business logic for all modules
โ”‚   โ”‚   โ”œโ”€โ”€ authController.js
โ”‚   โ”‚   โ”œโ”€โ”€ eventController.js
โ”‚   โ”‚   โ”œโ”€โ”€ notificationController.js
โ”‚   โ”‚   โ”œโ”€โ”€ registrationController.js
โ”‚   โ”‚   โ””โ”€โ”€ reviewController.js
โ”‚   โ”œโ”€โ”€ middleware/         # Custom Express middlewares
โ”‚   โ”‚   โ”œโ”€โ”€ auth.js         # JWT verification & user session payload injector
โ”‚   โ”‚   โ””โ”€โ”€ validation/     # Request body and parameter schema validator
โ”‚   โ”‚       โ”œโ”€โ”€ helpers.js  # Validation utility helpers
โ”‚   โ”‚       โ”œโ”€โ”€ index.js    # Validation middleware initialization
โ”‚   โ”‚       โ””โ”€โ”€ schemas.js  # Joi/custom schemas for API requests
โ”‚   โ”œโ”€โ”€ models/             # Sequelize database schemas & associations
โ”‚   โ”‚   โ”œโ”€โ”€ index.js
โ”‚   โ”‚   โ”œโ”€โ”€ Category.js
โ”‚   โ”‚   โ”œโ”€โ”€ Event.js
โ”‚   โ”‚   โ”œโ”€โ”€ Notification.js
โ”‚   โ”‚   โ”œโ”€โ”€ Registration.js
โ”‚   โ”‚   โ”œโ”€โ”€ Review.js
โ”‚   โ”‚   โ””โ”€โ”€ User.js
โ”‚   โ”œโ”€โ”€ routes/             # RESTful API route endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”œโ”€โ”€ events.js
โ”‚   โ”‚   โ”œโ”€โ”€ notifications.js
โ”‚   โ”‚   โ”œโ”€โ”€ registrations.js
โ”‚   โ”‚   โ””โ”€โ”€ reviews.js
โ”‚   โ”œโ”€โ”€ app.js              # Express app setup & middleware stacking
โ”‚   โ””โ”€โ”€ server.js           # Server listener & database synchronization
โ”œโ”€โ”€ views/                  # Static frontend page templates
โ”‚   โ”œโ”€โ”€ admin.html          # Organizer/Admin management view
โ”‚   โ”œโ”€โ”€ dashboard.html      # Attendee personalized space
โ”‚   โ”œโ”€โ”€ event-details.html  # Event details, reviews, and sign-ups
โ”‚   โ”œโ”€โ”€ events.html         # Browse & filter published events
โ”‚   โ”œโ”€โ”€ index.html          # Landing page
โ”‚   โ”œโ”€โ”€ login.html          # User login
โ”‚   โ””โ”€โ”€ register.html       # User registration
โ”œโ”€โ”€ .env.example            # Sample configuration file
โ”œโ”€โ”€ database.sqlite         # Local development SQLite database
โ”œโ”€โ”€ package.json            # Scripts & project dependencies
โ””โ”€โ”€ test_api.js             # API test automation script

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

Ensure you have the following installed on your local machine:

  • Node.js (v18 or higher)
  • npm (bundled with Node.js)
  • PostgreSQL (or use the SQLite file for quick local testing)

๐Ÿ”ง Installation

  1. Clone the Repository
    git clone https://github.com/mohammedabusamra04/CodeAlpha_EventRegistrationSystem.git
    cd CodeAlpha_EventRegistrationSystem
  2. Install Dependencies
    npm install
  3. Configure Environment Variables
    Duplicate .env.example to create a .env file:
    cp .env.example .env
    Open .env and fill in your credentials:
    PORT=5000
    DB_HOST=localhost
    DB_PORT=5432
    DB_USER=your_db_user
    DB_PASSWORD=your_db_password
    DB_NAME=event_registration_db
    JWT_SECRET=your_jwt_secret_key
    JWT_EXPIRES_IN=1d

๐Ÿ’ป Running Locally

  • Start in Development Mode (with automatic reload):
    npm run dev
  • Start in Production Mode:
    npm start

Once running, access the landing page at: http://localhost:5000


๐Ÿงช API Documentation

The REST API exposes the following endpoints (all requests/responses use JSON format):

๐Ÿ”‘ Authentication Endpoints (/api/auth)
Method Endpoint Description Auth Required
POST /register Register a new user account โŒ
POST /login Authenticate user and return a JWT โŒ
๐Ÿ“… Event Endpoints (/api/events)
Method Endpoint Description Auth Required
POST / Create a new event ๐Ÿ” (Admin/Organizer)
GET / Retrieve list of all events โŒ
GET /:id Retrieve details of a single event โŒ
PUT /:id Update an existing event ๐Ÿ” (Admin/Organizer)
DELETE /:id Delete/cancel an event ๐Ÿ” (Admin/Organizer)
๐ŸŽŸ๏ธ Registration Endpoints (/api/registrations)
Method Endpoint Description Auth Required
POST /:eventId Register current user for an event ๐Ÿ”
GET / Get current user's registrations ๐Ÿ”
DELETE /:id Cancel a registration ๐Ÿ”
๐Ÿ’ฌ Review Endpoints (/api/reviews)
Method Endpoint Description Auth Required
POST /:eventId Submit rating & review for an event ๐Ÿ”
GET /:eventId Get all reviews for an event โŒ
DELETE /:id Delete a review ๐Ÿ”
๐Ÿ”” Notification Endpoints (/api/notifications)
Method Endpoint Description Auth Required
GET /user Get all notifications for current user ๐Ÿ”
PATCH /mark-as-read/:id Mark notification as read ๐Ÿ”
GET /event/:eventId Get notifications for a specific event ๐Ÿ”

๐Ÿ”’ Security Notes

  • Helmet.js is integrated to set secure HTTP headers and protect the application from common web vulnerabilities.
  • Express Rate Limit protects the API from brute-force attempts and DDoS attacks by limiting requests to 100 per 15-minute window per IP.
  • ORM Protection: Database interactions are mediated through Sequelize, preventing SQL injection vulnerabilities.

๐Ÿ”ฎ Future Improvements

  • Payment Integration: Implement Stripe or PayPal SDKs for paid event ticket purchases.
  • Interactive Seating Charts: Allow organizers to define maps and users to select seats.
  • PDF Ticket Generator: Auto-email a styled PDF ticket with a QR code upon registration.
  • WebSockets Integration: Live notifications for event changes or seat availability counts.
```

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors