How ggames/venta_viaje works
This is a React travel-destination booking SPA. A visitor enters through the browser app, reaches public login or protected destination routes, browses destination listings, and can contract or cancel activities and review a trip total. Shared context holds authentication and booking state; destination and booking data are local application data, not a backend store. The map follows the sampled routing, state, and booking code; unsampled page details are included only where the source index establishes their modules or references.
Main entry points: Context.jsx Shared context · Router2.jsx Protected routes · Router.jsx Route selection · Provider.jsx State provider
Components 21
App and routing
- App entry
src/index.js - Home shell
src/Home.jsx - Route selection
src/routes/Router.jsx - Protected routes
src/routes/Router2.jsx - Private guard
src/routes/RutasPrivadas.jsx - Public guard
src/routes/RutasPublicas.jsx - Login page
src/paginas/Login.jsx - Navigation bar
src/navBar/NavBar.jsx
Destination browsing
- Capital listings
src/paginas/CP.jsx - North listings
src/paginas/NO.jsx - Destination listing
src/datos/CrearListado.jsx - Destination detail
src/paginas/Destino.jsx - Destination catalog
src/datos/data.js
Booking and trip
- Booking page
src/paginas/Comprar.jsx - My trip
src/paginas/Miviaje.jsx
Shared state
- Shared context
src/contexto/Context.jsx - State provider
src/contexto/Provider.jsx - Auth reducer
src/contexto/miReducer.js - Booking reducer
src/contexto/miReducer2.js - Action types
src/contexto/types.js
Other components
- Visitor
Connections 32
- Visitor → App entry: opens app
src/index.js - App entry → Home shell: renders
src/index.js - Home shell → Route selection: renders
src/Home.jsx - Route selection → Login page: routes to
src/routes/Router.jsx - Route selection → Protected routes: routes to
src/routes/Router.jsx - Route selection → Private guard: wraps routes
src/routes/Router.jsx - Route selection → Public guard: wraps routes
src/routes/Router.jsx - Protected routes → Navigation bar: renders
src/routes/Router2.jsx - Protected routes → Capital listings: routes to
src/routes/Router2.jsx - Protected routes → North listings: routes to
src/routes/Router2.jsx - Protected routes → Booking page: routes to
src/routes/Router2.jsx - Protected routes → My trip: routes to
src/routes/Router2.jsx - Navigation bar → Shared context: uses logout state
src/navBar/NavBar.jsx - Login page → Shared context: uses auth state
src/paginas/Login.jsx - Private guard → Shared context: reads auth state
src/routes/RutasPrivadas.jsx - Public guard → Shared context: reads auth state
src/routes/RutasPublicas.jsx - Capital listings → Destination listing: renders list
src/paginas/CP.jsx - North listings → Destination listing: renders list
src/paginas/NO.jsx - Destination listing → Destination catalog: filters data
src/datos/CrearListado.jsx - Destination listing → Destination detail: renders items
src/datos/CrearListado.jsx - Destination detail → Shared context: uses shared state
src/paginas/Destino.jsx - Booking page → Destination catalog: looks up destination
src/paginas/Comprar.jsx - Booking page → Shared context: dispatches booking
src/paginas/Comprar.jsx - My trip → Shared context: reads trip state
src/paginas/Miviaje.jsx - My trip → Shared context: dispatches cancellation
src/paginas/Miviaje.jsx - Home shell → State provider: uses provider
src/Home.jsx - State provider → Shared context: provides state
src/contexto/Provider.jsx - State provider → Auth reducer: dispatches auth
src/contexto/Provider.jsx - State provider → Booking reducer: dispatches bookings
src/contexto/Provider.jsx - State provider → Action types: uses actions
src/contexto/Provider.jsx - Auth reducer → Action types: matches actions
src/contexto/miReducer.js - Booking reducer → Action types: matches actions
src/contexto/miReducer2.js