How chaitanyadurgeshweb/locod works
Loco Portal is a Next.js reference site for Indian Railways locomotives. Users can browse classes and organizational categories, search and filter locomotive records, then follow results to locomotive or category details. The runtime data path is page handlers through a Supabase client; shared listing logic performs paginated queries and renders tables. The README also documents Supabase schema and seed files. Some category detail and informational pages were not excerpted, so their internal behavior and links are shown only where documented or indexed.
Main entry points: db.ts Query layer · ListedLocos.tsx Filtered listings · search/page.tsx Search · [slug]/page.tsx Class detail
Components 17
Browse reference
- Home
app/page.tsx - Class index
app/locomotives/page.tsx - Class detail
app/locomotives/[slug]/page.tsx - Loco detail
app/locos/[number]/page.tsx - Shed pages
app/sheds - Zone pages
app/zones - Manufacturer pages
app/manufacturers
Search and listings
- Search
app/search/page.tsx - Filtered listings
components/ListedLocos.tsx - Loco table
components/LocoTable.tsx - Pagination
components/Pager.tsx
Data access
- Query layer
lib/db.ts - Supabase database
- Database schema
supabase/migrations/0001_schema.sql
Other components
- Site visitor
Connections 17
- Site visitor → Home: opens
app/page.tsx - Site visitor → Search: searches
app/search/page.tsx - Home → Query layer: loads options and count
app/page.tsx - Class index → Query layer: queries classes
app/locomotives/page.tsx - Class detail → Query layer: loads class
app/locomotives/[slug]/page.tsx - Class detail → Filtered listings: requests class listings
app/locomotives/[slug]/page.tsx - Loco detail → Query layer: queries locomotive
app/locos/[number]/page.tsx - Shed pages → Query layer: queries shed data
app/sheds/page.tsx - Zone pages → Query layer: queries zone data
app/zones/page.tsx - Manufacturer pages → Query layer: queries manufacturer data
app/manufacturers/page.tsx - Search → Query layer: loads options and text matches
app/search/page.tsx - Search → Filtered listings: requests filtered results
app/search/page.tsx - Filtered listings → Query layer: searches locomotives
components/ListedLocos.tsx - Filtered listings → Loco table: renders rows
components/ListedLocos.tsx - Filtered listings → Pagination: renders pagination
components/ListedLocos.tsx - Query layer → Supabase database: queries
lib/db.ts - Database schema → Supabase database: defines schema for
README.md