How passaaqui/passaaqui-mobile works
PassaAqui is a mobile platform for tourists to explore local points of interest, earn rewards, and redeem products, and for shopkeepers to manage stores and orders. The graph follows those two user journeys and includes shared authentication, API, and real-time infrastructure. Some feature branches are represented from the README and file tree; unsampled implementation details and their internal links are not asserted.
Main entry points: api.ts REST API client · HomeScreen.tsx Home and profile choice · authService.ts Tourist authentication · shopkeeperAuthService.ts Shopkeeper authentication
Components 31
App and identity
- Home and profile choice
src/features/home/screens/HomeScreen.tsx - Tourist authentication
src/features/user/auth/services/authService.ts - Shopkeeper authentication
src/features/shopkeeper/auth/services/shopkeeperAuthService.ts
Tourist exploration
- Map and navigation
src/features/user/map/screens/MapScreen.tsx - Route session hooks
src/features/user/map/hooks/useRouteSession.ts - POIs and check-ins
src/features/user/map/poi/services/poiService.ts - Routing service
src/services/routeService.ts - Route event listener
src/features/user/map/hooks/useRouteSocket.ts - Achievements
src/features/user/achievements/screens/AchievementScreen.tsx - Travel history
src/features/user/settings/screens/TravelHistoryScreen.tsx
Shopping and rewards
- Product discovery
src/features/user/shop/screens/GlobalShopScreen.tsx - Product details and ratings
src/features/user/shop/screens/ProductDetailScreen.tsx - Checkout and Pix
src/features/user/payment/screens/SummaryOrderScreen.tsx - Tourist order service
src/features/user/payment/services/orderService.ts - Purchased products
src/features/user/purchased/screens/PurchasedScreen.tsx - Product review
src/features/user/purchased/screens/ReviewProductScreen.tsx - Review media picker
src/features/user/purchased/hooks/useReviewMedia.ts - Review submission hook
src/features/user/purchased/hooks/useCreateReview.ts - Review service
src/features/user/purchased/services/reviewService.ts
Shopkeeper operations
- Product catalog
src/features/shopkeeper/catalog/screens/CatalogScreen.tsx - Product management
src/features/shopkeeper/products/hooks/useCreateProductForm.ts - Category selection
src/features/shopkeeper/components/CategoryModal.tsx - Order management
src/features/shopkeeper/orders/screens/OrdersScreen.tsx - Shop metrics
src/features/shopkeeper/dashboard/screens/DashboardScreen.tsx - Shop plans
src/features/shopkeeper/plans/screens/PlansScreen.tsx
Shared platform
- REST API client
src/services/api/api.ts - Tourist auth state
src/stores/user/auth/authStore.ts - Shopkeeper auth state
src/stores/shopkeeper/auth/shopkeeperAuthStore.ts - WebSocket client
src/services/socket/stompClient.ts
Other components
- Tourist
- Shopkeeper
Connections 36
- Tourist → Home and profile choice: opens app
- Shopkeeper → Home and profile choice: opens app
- Home and profile choice → Tourist authentication: enters tourist flow
- Home and profile choice → Shopkeeper authentication: enters shop flow
- Tourist → Map and navigation: explores map
- Map and navigation → Route session hooks: navigates
- Route session hooks → Routing service: calls route operations
src/features/user/map/hooks/useRouteSession.ts - Routing service → REST API client: sends REST requests
src/services/routeService.ts - Tourist → POIs and check-ins: checks in
- Map and navigation → Route event listener: receives route events
- Route event listener → WebSocket client: subscribes
src/features/user/map/hooks/useRouteSocket.ts - Route event listener → Routing service: normalizes check-in
src/features/user/map/hooks/useRouteSocket.ts - Tourist → Achievements: views achievements
- Tourist → Travel history: views visited cities
- Tourist → Product discovery: discovers products
- Product discovery → Product details and ratings: opens product
- Tourist → Checkout and Pix: redeems with Pix
- Checkout and Pix → Tourist order service: creates order
- Tourist → Purchased products: reviews purchases
- Purchased products → Product review: opens review
- Product review → Review media picker: selects media
src/features/user/purchased/screens/ReviewProductScreen.tsx - Product review → Review submission hook: submits review
src/features/user/purchased/screens/ReviewProductScreen.tsx - Review submission hook → Review service: creates review
src/features/user/purchased/hooks/useCreateReview.ts - Review service → REST API client: uploads review
src/features/user/purchased/services/reviewService.ts - Shopkeeper → Product catalog: manages catalog
- Product catalog → Product management: manages products
- Product management → Category selection: selects category
src/features/shopkeeper/products/hooks/useCreateProductForm.ts - Shopkeeper → Order management: manages orders
- Shopkeeper → Shop metrics: views metrics
- Shopkeeper → Shop plans: configures plans
- Tourist authentication → REST API client: authenticates via
src/features/user/auth/services/authService.ts - Shopkeeper authentication → REST API client: authenticates via
src/features/shopkeeper/auth/services/shopkeeperAuthService.ts - Tourist authentication → Tourist auth state: updates auth state
src/features/user/auth/services/authService.ts - Shopkeeper authentication → Shopkeeper auth state: updates auth state
src/features/shopkeeper/auth/services/shopkeeperAuthService.ts - REST API client → Tourist auth state: reads auth token
src/services/api/api.ts - REST API client → Shopkeeper auth state: reads auth token
src/services/api/api.ts