How berkayderin/ibb-otobus-app works
Main Components
a. Client-Side Layer:
• Sub-components:
• UI Components (from /components/ui)
• Feature Components (from /features/components)
• Client-Side State Management (React Query implied by useTransportQueries)
b. API Layer:
• Four main endpoints:
• /api/duraklar (Stops)
• /api/duyurular (Announcements)
• /api/filo (Fleet)
• /api/seferler (Trips)
c. Services Layer:
• TransportService from features/services
Component Relationships
• Feature Components → UI Components (composition)
• Feature Components → Transport Queries (data fetching)
• Transport Queries → API Routes (HTTP requests)
• API Routes → Transport Services (business logic)
Specific Implementation Details
• Next.js 13+ App Router architecture
• UI Component library integration
• React Query for state management
• TailwindCSS for styling
Technical Stack Highlights
• Next.js
• React
• TailwindCSS
• Shadcn UI (implied by component structure)
• React Query
[User Interface Layer]
• ↓
[Feature Components Layer]
• ↓
[Data Management Layer (React Query)]
• ↓
[API Routes Layer]
• ↓
[Services Layer]
Important Considerations:
How the transport queries interface with the API routes.
Additional Elements to Include:
Error Handling Flow
• How ErrorWithRetry component fits into the architecture
• Error propagation paths
Data Flow Patterns
• SSR (Server-Side Rendering) paths
• Client-side navigation flows
• Data refresh patterns
Configuration Context
• Relevant config files (next.config.mjs, tailwind.config.js)
• How they influence the application structure
• Grouping related components
• Adding clear labels and annotations
• Adding version numbers for key technologies