Welcome to Travely! This full-stack web application combines Django for the backend and Vite for the frontend, providing a seamless experience for users to explore travel options. This guide will help you set up the project on your local machine.
Before you begin, ensure you have the following installed on your system:
- Python (>= 3.8)
- Node.js (>= 14.x)
- npm or Yarn
- SQLite
- Git (optional, for version control)
Follow these steps to set up the backend:
- Clone the Repository:
git clone https://github.com/Boot41/travely-arnav-aggarwal.git cd travely-arnav-aggarwal - Create a Virtual Environment:
Navigate to the server directory:
For Linux/macOS:
cd serverFor Windows:python3 -m venv env source env/bin/activatepython -m venv env .\env\Scripts\activate
- Install Dependencies:
pip install -r requirements.txt
- Set Up:
- Update your
settings.pywith your database configurations or create a.envfile with the necessary environment variables. Your.envfile should include:OPENAI_API_KEY=your_openai_api_key - Run Migrations:
python manage.py makemigrations python manage.py migrate
- (Optional) Populate the Database with Mock Data:
python manage.py loaddata mock_data
- Update your
- Start the Django Development Server:
python manage.py runserver
Next, set up the frontend:
- Navigate to the Frontend Directory:
cd client - Install Node Dependencies:
Using npm:
npm install
- Configure Frontend Environment:
Create a
.envfile in theclientdirectory for environment-specific variables, such as the API URL. Your.envfile should include:VITE_MAPPLS_API_KEY=your_mappls_api_key VITE_API_URL=your_api_url - Start the Vite Development Server:
Using npm:
npm run dev
After completing the setup, you can access the application by navigating to http://localhost:8000 for the Django backend and http://localhost:5173 for the Vite frontend in your browser.
This project is licensed under the MIT License - see the LICENSE file for details.