Welcome to TicketFusion, a ticket booking dashboard built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. This application allows users to view available events, book tickets, and manage their bookings through an intuitive interface.
Live Demo: TicketFusion
- User Authentication: Sign up and sign in functionality with JWT-based authentication.
- Event Management: View a list of available events and detailed information for each event.
- Ticket Booking: Book tickets for events, view and manage bookings.
- Error Handling: Proper error handling and validation to ensure a smooth user experience.
-
Clone the repository:
git clone https://github.com/yourusername/ticketfusion-frontend.git cd ticketfusion-frontend
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add the following environment variables:REACT_APP_API_URL=your_backend_api_url
-
Start the development server:
npm start
Ensure you have the backend server running and accessible. Update the REACT_APP_API_URL
in your .env
file to point to your backend API.
In the project directory, you can run:
npm start
: Runs the app in development mode.npm test
: Launches the test runner.npm run build
: Builds the app for production.
The project structure is organized as follows:
ticketfusion-frontend/
├── public/
│ ├── index.html
│ └── ...
├── src/
│ ├── components/
│ │ ├── Auth/
│ │ │ ├── SignIn.js
│ │ │ ├── SignUp.js
│ │ │ └── ...
│ │ ├── Events/
│ │ │ ├── EventDetails.js
│ │ │ ├── EventList.js
│ │ │ └── ...
│ │ ├── Bookings/
│ │ │ ├── BookingPage.js
│ │ │ └── ...
│ │ └── ...
│ ├── context/
│ │ └── AuthContext.js
│ ├── services/
│ │ ├── api.js
│ │ └── auth.js
│ ├── App.js
│ ├── index.js
│ └── ...
Here are the key API endpoints used by the frontend application:
- Get Comments
- GET
/comments
- GET
- Get Events
- GET
/events
- GET
- Get Event by ID
- GET
/events/:id
- GET
- Book Seat
- POST
/sitBook
- POST
- Get Seat Bookings
- GET
/sitBook
- GET
- Get Seat Booking by ID
- GET
/singleSitBook/:id
- GET
- Register User
- POST
/users
- POST
- Authenticate User
- POST
/users/authenticate
- POST
- Get User by Email
- GET
/users/:email
- GET
- Error Handling: Ensure proper error handling on both frontend and backend.
- Validation: Implement basic validation to prevent invalid data submissions.
- Free and Paid Tickets: Implement logic to differentiate between free and paid tickets.
- Free tickets can be booked without payment.
- Paid tickets require payment before booking.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or new features.
This project is licensed under the MIT License. See the LICENSE file for details.
This `README.md` provides a comprehensive overview of your TicketFusion frontend project, including installation instructions, features, configuration, API endpoints, and additional requirements. Feel free to customize it further based on your specific project needs and structure.