This is a MERN (MongoDB, Express.js, React.js, Node.js) project for learning purposes focused on developing a Travel-Booking application.
- Introduction
- Features
- Technologies
- Installation
- Usage
- Environment Variables
- Strengths
- Deployments
- Reference Application
This project is designed to provide hands-on experience in building a Travel-Booking application using the MERN stack. The backend is developed using Node.js with Express.js to create API endpoints for fetching tour information and implementing features like data validation using Joi and JWT token authentication. The frontend is developed using React.js for building the user interface.
- Backend API endpoints for retrieving tour information
- Data validation using Joi
- JWT token authentication
- User-friendly frontend interface for booking tours
- Integration of Reactstrap for UI components
- Implementation of React Router for navigation
- MongoDB Atlas: Database
- Express.js: Backend framework for Node.js
- React.js: Frontend library for building user interfaces
- Node.js: JavaScript runtime environment
- JWT: JSON Web Tokens for authentication
- Joi: Library for data validation
- Reactstrap: Bootstrap components for React
- React Router DOM: Library for routing in React applications
- Vercel: Deployment platform for frontend
- Clone the repository:
git clone https://github.com/tiendk195/Travel_Booking
- Navigate to the backend folder:
cd backend
- Install dependencies:
npm install
- Navigate to the frontend folder:
cd frontend
- Install dependencies:
npm install
- Navigate to the backend folder:
cd backend
- Run the development server:
npm run dev
- Navigate to the frontend folder:
cd frontend
- Start the development server:
npm start
Make sure to create a .env
file in both the backend and frontend folders with the following variables:
PORT
: Port number for the serverMONGO_URL
: MongoDB Atlas connection URLJWT_SECRET_KEY
: Secret key for JWT token encryption
Upon completing this project, you will gain knowledge in the following areas:
- Building a full-stack web application using the MERN stack
- Creating API endpoints with Node.js and Express.js
- Data validation techniques using Joi
- User authentication using JWT tokens
- React.js for building dynamic user interfaces
- Integration of Reactstrap for UI components
- Implementation of React Router for navigation
The backend can be deployed to a platform like Heroku or AWS Elastic Beanstalk.
The frontend can be deployed to Vercel, which provides seamless deployment for React applications.
After completing this project, you can refer to the deployed Travel-Booking application Travel-Booking. This reference application will provide additional insights and serve as inspiration for further enhancements to your project.