How syedminamurrehman/rahguzar works
1. Project shape
- RahGuzar is a Next.js 15 front-end application using the App Router (app/).
- The repo is primarily a static, data-driven UI for Karachi public transport information, not a backend/API service.
2. Top-level entry points
- app/layout.tsx defines the global shell: shared metadata, fonts/styling setup, and page-wide structure.
- app/page.tsx is the main landing page and likely composes the primary screen sections in order.
3. UI composition layer
- Most of the experience is assembled from reusable components in app/components/:
- Navbar.tsx, Hero.tsx, Footer.tsx for the page frame
- Filters.tsx, Search.tsx, Routes.tsx for discovery/browsing
- modal.tsx for route detail display
- servicecard.tsx for route cards or route summaries
- banner.tsx, bubbles.tsx for decorative/animated presentation
- This suggests a mostly component-driven architecture with one main page orchestrating the sections.
4. Data layer
- Route information lives in app/data/routes.ts.
- This is the central data source for transport routes, stops, fare ranges, and transport categories.
- There is no sign of a database, CMS, or external fetch layer in the repo; the app appears to use local static data bundled with the frontend.
5. Primary user flow
- The user lands on the home page, sees route discovery controls, and browses transport options.
- Filters and search refine the visible routes.
- Selecting a route opens modal.tsx to show detailed route information, including stops and fare.
- This is a read-only interaction flow driven by client-side state.
6. Filtering and search boundaries
- Filters.tsx likely handles transport-type segmentation such as BRTS, People Bus, Local Bus, and Chinchi.
- Search.tsx adds text-based discovery for routes or stops.
- These components are the main interaction boundary between the user and the route dataset, controlling what appears in the list/grid.
7. Route presentation
- Routes.tsx likely maps route data into visual cards or list items, probably using servicecard.tsx.
- The route list is the main “catalog” view; it is where filtered/search results are rendered.
- The detail modal is separate from the catalog, which keeps summary browsing and deep inspection cleanly split.
8. Modal and interaction model
- modal.tsx is a key UX boundary for showing expanded route details without leaving the page.
- The README indicates support for closing via outside click and Escape key, implying accessible overlay behavior.
- This keeps navigation lightweight and avoids page transitions for each route.
9. Styling and visual system
- app/globals.css holds the global CSS foundation.
- The README indicates Tailwind CSS is used for most styling, with a modern responsive layout and motion-friendly UI.
- Framer Motion is part of the experience for animated transitions and interactive effects.
10. PWA and client assets
- public/manifest.webmanifest and public/service-worker.js indicate the app is set up as a Progressive Web App.
- public/images/ contains static assets used by the UI.
- The service worker suggests offline/cache behavior for static resources, though the architecture remains frontend-only.
11. Architecture boundaries to capture in a diagram
- Presentation layer: page/layout + reusable visual components
- Data layer: static route dataset in app/data/routes.ts
- Interaction layer: filters/search/modal state driving what the user sees
- Asset/runtime layer: public static files, manifest, and service worker
- There is no evidence of server-side business logic, authentication, or third-party API integration in the repository.
12. What is notable for diagram accuracy
- The app is best drawn as a single front-end application with local data, not as a client/server system.
- The main dependency chain is: page → UI components → static route data → filtered route list → route detail modal.
- External route information is acknowledged in the README as curated from mnzil.app / CheelTech, but that appears to be a content source reference rather than a live integration.
Main entry points: page.tsx Home page · Routes.tsx Routes list · routes.ts Routes data · modal.tsx Route modal
Components 16
App shell
Global Next.js layout and the main page entrypoint.
UI components
Reusable presentation and interaction components for browsing routes.
- Navbar · Top-level site navigation and brand header.
app/components/Navbar.tsx - Hero · Primary landing content and visual entry section.
app/components/Hero.tsx - Filters · Segments routes by transport category and other facets.
app/components/Filters.tsx - Search · Text-based route and stop discovery.
app/components/Search.tsx - Routes list · Renders the browsable list of routes and filtered results.
app/components/Routes.tsx - Route card · Compact visual summary for an individual route.
app/components/servicecard.tsx - Route modal · Shows expanded route details without leaving the page.
app/components/modal.tsx - Banner · Promotional or visual accent component.
app/components/banner.tsx - Bubbles · Animated background or decorative motion element.
app/components/bubbles.tsx - Footer · Bottom-of-page informational footer.
app/components/Footer.tsx
Data
Static route dataset bundled with the frontend.
- Routes data · Local transport routes, stops, fares, and categories used by the UI.
app/data/routes.ts
Public assets
PWA metadata, service worker, and static images.
- Manifest · Web app manifest for installable PWA behavior.
public/manifest.webmanifest - Service worker · Caches and serves static assets for offline-friendly behavior.
public/service-worker.js - Images · Image assets used across the UI.
public/images
Connections 19
- Layout → Home page: renders · Global shell wraps the landing page.
- Home page → Navbar: includes · Page composes the header/navigation.
- Home page → Hero: includes · Page starts with the hero section.
- Home page → Filters: includes · Page exposes route filtering controls.
- Home page → Search: includes · Page exposes text search for route discovery.
- Home page → Routes list: includes · Page renders the route catalog.
- Home page → Banner: includes · Page uses decorative banner content.
- Home page → Bubbles: includes · Page uses animated decorative elements.
- Home page → Footer: includes · Page ends with the footer.
- Routes list → Route card: uses · Route list renders individual route cards.
- Routes list → Routes data: reads · Catalog is built from the bundled route dataset.
- Filters → Routes data: filters · Category controls operate on the shared route data.
- Search → Routes data: queries · Search matches route and stop information in the dataset.
- Route modal → Routes data: shows details · Modal displays expanded information for selected routes.
- Routes list → Route modal: opens · Selecting a route launches the detail overlay.
- Home page → Route modal: hosts · Modal is part of the page-level interaction flow.
- Home page → Manifest: ships with · App includes installable PWA metadata.
- Home page → Service worker: ships with · App includes offline/cache runtime support.
- Home page → Images: uses · Visuals and media are drawn from static image assets.