A full-stack application for planning holidays and getting destination suggestions.
- Python 3.8+
- Node.js 16+
- MongoDB (optional, the app will use in-memory storage if MongoDB is not available)
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv .holidayenv source .holidayenv/bin/activate # On Windows: .holidayenv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile based on.env.example:cp .env.example .env -
Update the
.envfile with your API keys and configuration:HF_API_TOKEN=your_huggingface_token MODEL_ID=your_model_id WEATHERAPI_KEY=your_weatherapi_key FOURSQUARE_API_KEY=your_foursquare_key MONGODB_URI=mongodb://localhost:27017 DB_NAME=holiday_planner SECRET_KEY=your_secret_key_here _here -
Start the backend server (for production, remove
--reloadand use multiple workers):uvicorn main:app --reload
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install -
Create a
.envfile in the frontend directory:VITE_BACKEND_URL=http://localhost:8000Set this to your deployed backend URL in production.
-
Start the development server:
npm run dev -
Access the application at http://localhost:5173
The application can run without MongoDB, using in-memory storage instead. However, data will be lost when the server restarts.
To set up MongoDB:
-
Install MongoDB Community Edition:
-
Start MongoDB:
- On Linux/macOS:
sudo systemctl start mongod - On Windows: Start MongoDB as a service
- On Linux/macOS:
-
Update your
.envfile with the MongoDB URI:MONGODB_URI=mongodb://localhost:27017 DB_NAME=holiday_planner -
Restart the backend server.
- User authentication (JWT)
- Holiday planning with budget and itinerary
- Destination suggestions based on preferences
- Weather forecasts for destinations
- Save and manage trip plans
- Dashboard for users
- Responsive UI with Tailwind CSS
- For production, use a production ASGI server (e.g.,
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4) - Set all environment variables in your deployment environment (do not commit secrets)
- Restrict CORS origins in
main.pyto your frontend domain(s) - Serve the frontend
dist/folder with a static host (Vercel, Netlify, etc.) - Ensure
VITE_BACKEND_URLin the frontend.envpoints to your deployed backend
MIT