A full-stack web application for sharing travel destinations, collecting testimonials, and managing visitor inquiries. Built with the MERN stack (MongoDB, Express.js, React, Node.js).
- π Destinations Management: Browse and manage travel destinations with detailed information
- β Testimonials: Display user reviews and experiences
- π§ Contact Form: Collect visitor inquiries and feedback
- π¨ Modern UI: Responsive design with Material-UI and Tailwind CSS
- π REST API: Fully functional backend API with CRUD operations
- ποΈ Database: MongoDB integration for data persistence
- Runtime: Node.js
- Framework: Express.js 5.2
- Database: MongoDB with Mongoose ODM
- Utilities:
- CORS for cross-origin requests
- dotenv for environment variables
- Nodemon for development
- Library: React 19
- Styling:
- Tailwind CSS
- Material-UI (MUI)
- HTTP Client: Axios
- Routing: React Router DOM
- Build Tool: Create React App
MERN/
βββ backend/
β βββ config/
β β βββ db.js # MongoDB connection config
β βββ models/
β β βββ Contact.js # Contact schema
β β βββ Destination.js # Destination schema
β β βββ Testimonial.js # Testimonial schema
β βββ routes/
β β βββ contactRoutes.js # Contact API endpoints
β β βββ destinationRoutes.js # Destination API endpoints
β β βββ testimonialRoutes.js # Testimonial API endpoints
β βββ package.json
β βββ server.js # Express server setup
β βββ Project Setup.txt
β
βββ frontend/
βββ src/
β βββ components/
β β βββ Footer.jsx # Footer component
β β βββ TravelCard.jsx # Travel destination card
β βββ pages/
β β βββ Home.jsx # Home page
β βββ App.js # Main App component
β βββ App.css
β βββ index.js
β βββ index.css
β βββ setupTests.js
βββ package.json
βββ tailwind.config.js
βββ postcss.config.js
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (local or Atlas)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in the backend directory:MONGODB_URI=your_mongodb_connection_string PORT=5000 -
Start the development server:
npm run dev
The backend server will run on
http://localhost:5000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
The frontend will open at
http://localhost:3000
GET /api/destinations- Get all destinationsGET /api/destinations/:id- Get a specific destinationPOST /api/destinations- Create a new destinationPUT /api/destinations/:id- Update a destinationDELETE /api/destinations/:id- Delete a destination
GET /api/testimonials- Get all testimonialsGET /api/testimonials/:id- Get a specific testimonialPOST /api/testimonials- Create a new testimonialPUT /api/testimonials/:id- Update a testimonialDELETE /api/testimonials/:id- Delete a testimonial
GET /api/contact- Get all contact messagesPOST /api/contact- Submit a contact messageDELETE /api/contact/:id- Delete a contact message
npm start # Run server with Node
npm run dev # Run server with Nodemon (auto-restart on changes)npm start # Start development server
npm run build # Create production build
npm test # Run tests
npm run eject # Eject from Create React App (irreversible){
"cors": "^2.8.6",
"dotenv": "^17.2.3",
"express": "^5.2.1",
"mongoose": "^9.1.5",
"nodemon": "^3.1.11" (dev)
}{
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-router-dom": "^7.13.0",
"axios": "^1.13.4",
"@mui/material": "^7.3.7",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1"
}- Browse Destinations: View all available travel destinations on the home page
- Read Testimonials: Check out reviews and experiences from other travelers
- Submit Feedback: Use the contact form to send inquiries or feedback
- Manage Data: Use API endpoints to manage destinations and testimonials
Create a .env file in the backend directory:
# Database
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/travel-blog
# Server
PORT=5000
NODE_ENV=development
- Push code to GitHub
- Connect your repository to deployment platform
- Set environment variables
- Deploy
- Run
npm run build - Deploy the
buildfolder - Update API endpoints for production
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the ISC License.
Created as a MERN stack learning project.
If you encounter any issues or have questions, please open an issue on GitHub.
Happy traveling! π