How karthikeyanh/seg-catalogue works
SEG Spare Parts Catalogue is a searchable catalogue of starters and generators, with cross-references and component part numbers. Customers search and filter products through the web or mobile client, which the README describes as reading from the API; the API returns catalogue records from the database. Administrators use the web admin panel and token-protected API operations to manage records. The backend also seeds an empty database from the catalogue JSON. Web and mobile implementation details are not included in the sampled source, so those links reflect README documentation.
Main entry points: main.py HTTP API · crud.py Search and CRUD · web Web app and admin · db.py DB sessions
Components 12
Catalogue clients
- Web app and admin
web - Mobile app
mobile
Catalogue API
- HTTP API
backend/app/main.py - Search and CRUD
backend/app/crud.py - Product validation
backend/app/schemas.py
Catalogue storage
- Product records
backend/app/models.py - DB sessions
backend/app/db.py - Catalogue database
Catalogue data
- Seed loader
backend/app/main.py - Catalogue seed data
data/catalogue_data.json
Other components
- Customer
- Administrator
Connections 13
- Customer → Web app and admin: uses
README.md - Administrator → Web app and admin: manages catalogue
README.md - Web app and admin → HTTP API: requests catalogue
README.md - Mobile app → HTTP API: reads catalogue
README.md - HTTP API → Search and CRUD: calls search and create
backend/app/main.py - Search and CRUD → Product records: creates and searches
backend/app/crud.py - HTTP API → Product records: reads records
backend/app/main.py - HTTP API → DB sessions: uses sessions
backend/app/main.py - Search and CRUD → Catalogue database: queries and writes
backend/app/crud.py - DB sessions → Catalogue database: connects
backend/app/db.py - HTTP API → Product validation: validates requests
backend/app/main.py - Seed loader → Catalogue seed data: loads when empty
backend/app/main.py - Seed loader → Search and CRUD: creates products
backend/app/main.py