Daywell is a full-stack application for trip planning, featuring a React frontend and a FastAPI backend.
Set your Google Maps and PredictHQ API key in a .env
file or your environment:
VITE_GOOGLE_MAPS_API_KEY=your_actual_api_key_here
VITE_PREDICTHQ_API_KEY=your_predicthq_api_key_here
The frontend uses a configurable backend URL in src/config.ts
:
// For production (Azure):
export const BACKEND_BASE_URL = 'https://daywell-backend-gah8c4b3dzcbbtbf.eastus2-01.azurewebsites.net';
// For local development:
export const BACKEND_BASE_URL = 'http://localhost:8000';
Update this value if you deploy the backend elsewhere.
- Open a terminal and navigate to the
backend
directory:cd backend
- (Optional) Create a virtual environment:
python3 -m venv venv source venv/bin/activate
- Install Python dependencies:
pip install -r requirements.txt
- Start the FastAPI backend server:
uvicorn main:app --reload
- Open a new terminal and navigate to the
frontend
directory:cd frontend
- Install dependencies:
npm install
- Start the frontend development server:
npm run dev
You can test the /plan
endpoint with curl. Replace the URL as needed:
If testing locally:
curl -X POST "http://localhost:8000/plan" -H "Content-Type: application/json" -d '{"destination": "Paris", "days": 3}'
If using the deployed backend (Azure):
curl -X POST "https://daywell-backend-gah8c4b3dzcbbtbf.eastus2-01.azurewebsites.net/plan" -H "Content-Type: application/json" -d '{"destination": "Paris", "days": 3}'