How atcasanova/trips works
Trips is a collaborative travel-planning product: users create or join a trip, build an itinerary and reservations, add documents and expenses, then share or export an editorial Trip Book. The React client calls an Express API backed by PostgreSQL; backend services add AI extraction, location resolution, email intake and PDF generation. The graph preserves README-documented capabilities where their implementation was not sampled; those links are documented rather than claims of inspected call sites.
Main entry points: pool.ts PostgreSQL · index.ts REST routing · tripController.ts Trip and membership · itineraryController.ts Itinerary
Components 24
Web client
- Trip workspace
client/src/pages/TripDetailPage.tsx - Trip dashboard
client/src/pages/DashboardPage.tsx - API client
client/src/api/client.ts
API and access
- Authentication
server/src/controllers/authController.ts - REST routing
server/src/routes/index.ts - Session access
server/src/middleware/auth.ts - Administration
server/src/controllers/adminController.ts
Trip planning
- Trip and membership
server/src/controllers/tripController.ts - Itinerary
server/src/controllers/itineraryController.ts - Location resolution
server/src/services/itineraryLocationService.ts - Reservations
server/src/controllers/reservationController.ts - Expense splitting
server/src/controllers/expenseController.ts
Documents and publishing
- Document management
server/src/controllers/documentController.ts - Document confirmation
server/src/services/documentConfirmationService.ts - AI extraction
server/src/services/openaiService.ts - Inbound email
server/src/services/inboundEmailService.ts - Trip Book content
server/src/services/reportService.ts - PDF rendering
server/src/services/tripBookPdfService.ts
Persistence and integrations
- PostgreSQL
server/src/db/pool.ts - OpenAI
- SMTP mail
- Pexels photos
- PDF service
server/src/services/pdfService.ts
Other components
- Traveler
Connections 38
- Traveler → Trip dashboard: plans trips
- Trip dashboard → API client: requests data
- Trip workspace → API client: requests trip data
- API client → REST routing: calls REST API
- REST routing → Authentication: routes authentication
server/src/routes/index.ts - REST routing → Trip and membership: routes trip requests
server/src/routes/index.ts - REST routing → Itinerary: routes itinerary requests
server/src/routes/index.ts - REST routing → Reservations: routes reservations
server/src/routes/index.ts - REST routing → Expense splitting: routes expenses
server/src/routes/index.ts - REST routing → Document management: routes documents
server/src/routes/index.ts - REST routing → Administration: routes admin requests
server/src/routes/index.ts - Session access → PostgreSQL: checks sessions
server/src/middleware/auth.ts - Trip and membership → PostgreSQL: reads and writes
server/src/controllers/tripController.ts - Trip and membership → Location resolution: resolves locations
server/src/controllers/tripController.ts - Itinerary → PostgreSQL: reads and writes
server/src/controllers/itineraryController.ts - Itinerary → Location resolution: refreshes locations
server/src/controllers/itineraryController.ts - Itinerary → PDF rendering: requests regeneration
server/src/controllers/itineraryController.ts - Location resolution → PostgreSQL: queries trip data
server/src/services/itineraryLocationService.ts - Location resolution → OpenAI: resolves places
- Reservations → PostgreSQL: reads and writes
server/src/controllers/reservationController.ts - Expense splitting → PostgreSQL: reads and writes
server/src/controllers/expenseController.ts - Document management → Document confirmation: confirms extraction
- Document confirmation → AI extraction: extracts document
server/src/services/documentConfirmationService.ts - Document confirmation → PostgreSQL: stores confirmations
server/src/services/documentConfirmationService.ts - AI extraction → OpenAI: extracts structured data
- AI extraction → PostgreSQL: records AI audit
server/src/services/openaiService.ts - Inbound email → AI extraction: analyzes attachments
server/src/services/inboundEmailService.ts - Inbound email → Document confirmation: confirms documents
server/src/services/inboundEmailService.ts - Inbound email → SMTP mail: sends notifications
- Trip Book content → PostgreSQL: loads trip data
server/src/services/reportService.ts - PDF rendering → Trip Book content: builds report HTML
server/src/services/tripBookPdfService.ts - PDF rendering → PDF service: renders PDF
server/src/services/tripBookPdfService.ts - PDF rendering → PostgreSQL: stores PDF metadata
server/src/services/tripBookPdfService.ts - Administration → PostgreSQL: queries metrics
server/src/controllers/adminController.ts - Administration → SMTP mail: sends invitations
- Trip and membership → SMTP mail: sends trip invitations
server/src/controllers/tripController.ts - Trip workspace → Trip Book content: shares Trip Book
- Trip workspace → Pexels photos: searches cover photos