A comprehensive web application for managing events, ticket booking, and user management with different role-based access levels.
This Event Management System allows users to create, manage, and book tickets for events. It includes features like user authentication, role-based access control, ticket management, payment processing, and reporting capabilities.
- User Authentication: Sign up, login, password reset
- Role-Based Access Control: Manager, Vendor (Salesperson), Accountant, Customer
- Event Management: Create, view, edit, and delete events
- Ticket Booking: Select and book tickets for events
- Payment Processing: Process payments for tickets
- PDF Generation: Generate tickets as PDF documents
- Email Notifications: Send email notifications for various actions
- Reporting: Generate reports on sales, revenue, and expenditure
- User Management: Add, edit, delete, and restore users
software_project/ ├── controllers/ # Request handlers / Controllers │ ├── auth.controller.js │ ├── pdf.controller.js │ └── users.controller.js │ ├── models/ # Mongoose or Sequelize models │ ├── booking.model.js │ ├── event.model.js │ ├── Token.model.js │ └── User.model.js │ ├── public/ # Static assets served to client │ ├── backgrounds/ # Background images │ ├── *.css # Stylesheets │ └── script.js # Frontend JavaScript │ ├── routes/ # Route definitions │ ├── index.route.js │ └── profile.routes.js │ ├── services/ # Business logic │ └── auth.service.js │ ├── utils/ # Utility functions and helpers │ └── email/ │ └── sendEmail.js # Email sending utility │ ├── views/ # EJS view templates │ ├── *.ejs # Page views │ └── template/ # Email templates │ ├── .env # Environment configuration ├── db.js # Database connection file └── index.js # Entry point of the application
- Backend: Node.js, Express.js
- Database: MongoDB
- Template Engine: EJS
- Authentication: JWT (JSON Web Tokens)
- Email: Nodemailer, Handlebars
- PDF Generation: Puppeteer
- CSS Framework: Custom CSS
- Other Libraries: bcrypt (password hashing), cors, dotenv
-
Clone the repository:
git clone <repository-url> cd software_project
-
Install dependencies:
npm install
-
Create a
.envfile in the root directory with the required environment variables (see below).
Create a .env file in the root directory with the following variables:
EMAIL_USERNAME=your-email@gmail.com
EMAIL_PASSWORD=your-email-app-password
FROM_EMAIL=your-email@gmail.com
DB_URL=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>?retryWrites=true&w=majority
JWT_SECRET=your-secret-key
CLIENT_URL=http://localhost:3000
BCRYPT_SALT=10
PORT=3000
EMAIL_USERNAME: Gmail account username for sending emailsEMAIL_PASSWORD: Gmail app password (not regular password)FROM_EMAIL: Email address that appears as senderDB_URL: MongoDB connection stringJWT_SECRET: Secret key for JWT token generationCLIENT_URL: URL of the client applicationBCRYPT_SALT: Salt rounds for password hashingPORT: Port number for the server
-
Install nodemon globally (if not already installed):
npm install -g nodemon
-
Start the server with nodemon for automatic reloading during development:
nodemon index.js
Or start the server normally:
node index.js
-
The application will be available at
http://localhost:3000(or the port specified in your.envfile)
- Add/edit/delete events
- Add/edit/delete users
- View reports and analytics
- Manage all aspects of the system
- View events
- Book tickets for customers
- Track bookings and commissions
- View financial reports
- Track revenue and expenditure
- Monitor ticket sales
- View events
- Book tickets
- View booking history
POST /index/signup: Register a new userPOST /index/login: Login a userPOST /index/forgot: Request password resetPOST /index/resetPassword: Reset password
GET /index/:user_id: User dashboardGET /index/:user_id/profile: View user profilePATCH /index/:user_id/profile: Update user profile
GET /index/:user_id/AddEvent: Add event formPOST /index/:user_id/AddEvent: Create a new eventGET /index/:user_id/search: Search eventsGET /index/:user_id/details/:event_id: View event details
GET /index/:user_id/details/:event_id/booking: Booking formPOST /index/:user_id/details/:event_id/booking: Create a bookingPATCH /index/:user_id/details/:event_id/booking/:ticket_id: Update a bookingGET /index/:user_id/details/:event_id/booking/:ticket_id/payment: Payment pageGET /index/:user_id/details/:event_id/booking/:ticket_id/payment/:email/download: Generate ticket PDF