Open
Description
Description
Create RESTful routes for trip management with CRUD operations and implement a structured itinerary system with daily time-block organization.
Requirements
Trip Routes
- Implement the following RESTful endpoints:
- GET /trips (list all user trips)
- GET /trips/:id (show single trip)
- POST /trips (create new trip)
- PUT /trips/:id (update trip)
- DELETE /trips/:id (remove trip)
- Add proper authorization checks for all routes
- Implement query parameters for trip filtering
Itinerary Structure
- Create data structure for daily itinerary with time blocks:
- Morning block (activities/plans)
- Afternoon block (activities/plans)
- Evening block (activities/plans)
- Implement itinerary CRUD operations
- Add real-time saving for itinerary updates
Technical Details
- Request/Response format for trips:
{ "destination": "string", "startDate": "ISO date", "endDate": "ISO date", "coordinates": { "latitude": "float", "longitude": "float" }, "itinerary": { "days": [{ "date": "ISO date", "morning": "text", "afternoon": "text", "evening": "text" }] } }