How chaitanyadurgeshweb/irldb works
Loco Portal is a Next.js reference portal for Indian Railways locomotives. Users can search by locomotive number or filters, browse classes, and follow listings into locomotive, shed, zone, and manufacturer records. Pages query Supabase through a shared data-access module; search results are fetched and displayed by a shared listing component with table and pagination views. The README identifies Supabase as the backend and the repository includes schema and seed files. Some detail routes and informational pages were not excerpted, so their connections are limited to SOURCE INDEX references.
Main entry points: db.ts Data queries · ListedLocos.tsx Listed locomotives · app/page.tsx Home · search/page.tsx Search
Components 18
Catalog browsing
- Class index
app/locomotives/page.tsx - Class detail
app/locomotives/[slug]/page.tsx - Locomotive detail
app/locos/[number]/page.tsx - Shed index
app/sheds/page.tsx - Shed detail
app/sheds/[code]/page.tsx - Zone index
app/zones/page.tsx - Zone detail
app/zones/[code]/page.tsx - Manufacturer index
app/manufacturers/page.tsx - Manufacturer detail
app/manufacturers/[code]/page.tsx - Sources page
app/sources/page.tsx
Result views
- Listed locomotives
components/ListedLocos.tsx - Locomotive table
components/LocoTable.tsx - Pagination
components/Pager.tsx
Data access
- Data queries
lib/db.ts - Supabase
Other components
- Portal visitor
Connections 24
- Portal visitor → Home: opens
README.md - Portal visitor → Search: searches
README.md - Portal visitor → Class index: browses
README.md - Home → Data queries: loads options
app/page.tsx - Home → Data queries: counts locomotives
app/page.tsx - Search → Data queries: loads matches
app/search/page.tsx - Search → Listed locomotives: renders results
app/search/page.tsx - Class index → Data queries: loads classes
app/locomotives/page.tsx - Class detail → Data queries: loads class
app/locomotives/[slug]/page.tsx - Class detail → Listed locomotives: renders members
app/locomotives/[slug]/page.tsx - Locomotive detail → Data queries: loads locomotive
app/locos/[number]/page.tsx - Shed index → Data queries: loads sheds
app/sheds/page.tsx - Shed detail → Data queries: loads shed
app/sheds/[code]/page.tsx - Shed detail → Listed locomotives: renders members
app/sheds/[code]/page.tsx - Zone index → Data queries: loads zones
app/zones/page.tsx - Zone detail → Data queries: loads zone
app/zones/[code]/page.tsx - Zone detail → Listed locomotives: renders members
app/zones/[code]/page.tsx - Manufacturer index → Data queries: loads manufacturers
app/manufacturers/page.tsx - Manufacturer detail → Data queries: loads manufacturer
app/manufacturers/[code]/page.tsx - Manufacturer detail → Listed locomotives: renders members
app/manufacturers/[code]/page.tsx - Listed locomotives → Data queries: searches locomotives
components/ListedLocos.tsx - Listed locomotives → Pagination: renders pagination
components/ListedLocos.tsx - Listed locomotives → Locomotive table: renders rows
components/ListedLocos.tsx - Data queries → Supabase: queries
README.md