How jdcar1241/viajaperu works
ViajaPeru is a tourism-package booking and payment application: travelers browse packages, register or sign in, submit a reservation, and receive confirmation; staff-facing flows collect payments and issue receipts. The React app routes to these screens and its API helpers send requests to the Express backend, which handles authentication, bookings, payment, document verification, and receipts using Supabase. Major frontend and backend capabilities are represented, but some route implementations and integrations were not excerpted; those links are omitted or marked unverified.
Main entry points: App.jsx Screen router · index.js Express server and routes · api-reservas.js Authenticated API client · supabase.js Supabase services and data
Components 31
Traveler web app
- Screen router
react-turismo/src/App.jsx - Package catalog
react-turismo/src/Catalogo.jsx - Package details
react-turismo/src/Detalle.jsx - Package API client
react-turismo/src/api.js - Authenticated API client
react-turismo/src/api-reservas.js
Backend API
- Express server and routes
backend-turismo/src/index.js - Session and role checks
backend-turismo/src/auth.middleware.js - Supabase services and data
backend-turismo/src/supabase.js
Identity and documents
- Account registration
react-turismo/src/Registro.jsx - Sign in
react-turismo/src/Login.jsx - Session state
react-turismo/src/auth.js - Document validation
react-turismo/src/documentos.js - Passport MRZ
react-turismo/src/mrz.js - Authentication routes
backend-turismo/src/auth.routes.js - Customer registration routes
backend-turismo/src/clientes.routes.js - Document verification
backend-turismo/src/verificacion-documentos.js - Document lookup routes
backend-turismo/src/consultas.routes.js - Foreign document lookup
backend-turismo/src/consultas-ce.routes.js - MRZ parser
backend-turismo/src/mrz.js
Package booking
- Reservation form
react-turismo/src/Reserva.jsx - Reservation confirmation
react-turismo/src/Confirmacion.jsx - Reservation routes
backend-turismo/src/reservas.routes.js - Package routes
backend-turismo/src/paquetes.routes.js
Payments and receipts
- Payment list
react-turismo/src/Cobros.jsx - Collect payment
react-turismo/src/Cobrar.jsx - Receipt and PDF view
react-turismo/src/Comprobante.jsx - Payment routes
backend-turismo/src/cobros.routes.js - Culqi gateway adapter
backend-turismo/src/culqi.js - Receipt routes
backend-turismo/src/comprobantes.routes.js - PDF generation
backend-turismo/src/comprobante.pdf.js
Other components
- Traveler or staff
Connections 45
- Traveler or staff → Screen router: uses
react-turismo/src/App.jsx - Screen router → Package catalog: routes to
react-turismo/src/App.jsx - Screen router → Package details: routes to
react-turismo/src/App.jsx - Screen router → Account registration: routes to
react-turismo/src/App.jsx - Screen router → Sign in: routes to
react-turismo/src/App.jsx - Screen router → Reservation form: routes to
react-turismo/src/App.jsx - Screen router → Reservation confirmation: routes to
react-turismo/src/App.jsx - Screen router → Payment list: routes to
react-turismo/src/App.jsx - Screen router → Collect payment: routes to
react-turismo/src/App.jsx - Screen router → Receipt and PDF view: routes to
react-turismo/src/App.jsx - Package catalog → Package API client: requests packages
react-turismo/src/Catalogo.jsx - Package details → Package API client: requests details
react-turismo/src/Detalle.jsx - Account registration → Authenticated API client: submits registration
react-turismo/src/Registro.jsx - Account registration → Document validation: validates documents
react-turismo/src/Registro.jsx - Account registration → Passport MRZ: parses passport MRZ
react-turismo/src/Registro.jsx - Sign in → Authenticated API client: requests login
react-turismo/src/Login.jsx - Sign in → Session state: sets session
react-turismo/src/Login.jsx - Reservation form → Authenticated API client: submits reservation
react-turismo/src/Reserva.jsx - Reservation form → Document validation: validates documents
react-turismo/src/Reserva.jsx - Reservation form → Document lookup routes: looks up documents
- Authenticated API client → Session state: reads token
react-turismo/src/api-reservas.js - Authenticated API client → Express server and routes: sends API requests
- Express server and routes → Authentication routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Customer registration routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Reservation routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Package routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Document lookup routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Foreign document lookup: mounts routes
backend-turismo/src/index.js - Express server and routes → Payment routes: mounts routes
backend-turismo/src/index.js - Express server and routes → Receipt routes: mounts routes
backend-turismo/src/index.js - Customer registration routes → Document verification: verifies documents
backend-turismo/src/clientes.routes.js - Document verification → MRZ parser: parses MRZ
backend-turismo/src/verificacion-documentos.js - Customer registration routes → Supabase services and data: creates account and profile
backend-turismo/src/clientes.routes.js - Authentication routes → Supabase services and data: uses auth service
backend-turismo/src/auth.routes.js - Session and role checks → Supabase services and data: checks session and role
backend-turismo/src/auth.middleware.js - Reservation routes → Supabase services and data: creates reservation
backend-turismo/src/reservas.routes.js - Package routes → Supabase services and data: queries packages
backend-turismo/src/paquetes.routes.js - Payment routes → Supabase services and data: reads and records payments
backend-turismo/src/cobros.routes.js - Payment routes → Culqi gateway adapter: charges or refunds
backend-turismo/src/cobros.routes.js - Receipt routes → Supabase services and data: issues and retrieves receipts
backend-turismo/src/comprobantes.routes.js - Receipt routes → PDF generation: generates PDF
backend-turismo/src/comprobantes.routes.js - Receipt and PDF view → Authenticated API client: requests receipt data
react-turismo/src/Comprobante.jsx - Payment list → Authenticated API client: requests payment data
react-turismo/src/Cobros.jsx - Collect payment → Authenticated API client: submits payment
react-turismo/src/Cobrar.jsx - Reservation confirmation → Authenticated API client: requests reservation data
react-turismo/src/Confirmacion.jsx