A starter FastAPI service for collaboratively building itineraries. Users can register/login, create trips with flights and hotels, and share trips with other accounts.
- Email/password registration with hashed credentials and JWT login tokens
- Create trips with optional start/end dates
- Add flights (airline, airports, times) and hotels (city, check-in/out) to a trip
- Share trips with other registered users for read/write access
- SQLite persistence by default
- Install dependencies (recommend a virtual environment):
pip install -r requirements.txt
- Run the API server:
uvicorn app.main:app --reload
- Open the interactive docs at
http://127.0.0.1:8000/docsto try the endpoints.
POST /auth/register– create an accountPOST /auth/login– obtain an access token (sendusername+passwordform fields)POST /trips– create a trip with optional flights/hotels payloadsGET /tripsandGET /trips/{trip_id}– view trips you own or that are shared with youPOST /trips/{trip_id}/share– share a trip with another registered emailPOST /trips/{trip_id}/flightsandPOST /trips/{trip_id}/hotels– append items to an existing trip
Use the Authorization: Bearer <token> header for all /trips endpoints.