How manyfaces-coder/bads_platform works
Bads Platform is an API-first catalog for supplement information and published quality analyses. The visible workflow is a client request entering the FastAPI routes, using domain CRUD and database sessions, and returning validated API data. Category, manufacturer, and marketplace CRUD are shown; supplement endpoints and expertise, source, and offer data are present in the tree, but their full workflows were not sampled. The README documents PostgreSQL and SQLAlchemy; Redis is mentioned as a capability, but no runtime integration is evidenced in the supplied tree. Some relationships are therefore omitted.
Main entry points: base.py ORM foundation · db_helper.py Session helper · __init__.py Versioned routes · supplements.py Supplement routes
Components 25
REST API
- Application entry
app/main.py - API router
app/api/__init__.py - Versioned routes
app/api/v1/__init__.py
Catalog operations
- Category routes
app/api/v1/categories/views.py - Manufacturer routes
app/api/v1/manufacturers/views.py - Marketplace routes
app/api/v1/marketplaces/views.py - Category CRUD
app/api/v1/categories/crud.py - Manufacturer CRUD
app/api/v1/manufacturers/crud.py - Marketplace CRUD
app/api/v1/marketplaces/crud.py - Shared CRUD
app/api/v1/base_crud.py
Supplement domain
- Supplement routes
app/api/v1/supplements.py - Supplement CRUD
app/crud/supplements.py - Supplement schemas
app/core/schemas/supplement.py - Analysis expertise
app/core/models/supplement_expertise.py - Product offers
app/core/models/supplement_offer.py - Analysis sources
app/core/models/source.py - Supplement model
app/core/models/supplement.py - Category model
app/core/models/category.py - Manufacturer model
app/core/models/manufacturer.py - Marketplace model
app/core/models/marketplace.py
Persistence
- Session helper
app/core/db_helper.py - ORM foundation
app/core/models/base.py - Runtime settings
app/core/config.py
Other components
- API client
- PostgreSQL
Connections 31
- API client → Application entry: sends requests
README.md - Application entry → API router: includes routes
app/main.py - API router → Versioned routes: includes v1
app/api/__init__.py - Versioned routes → Category routes: registers routes
app/api/v1/__init__.py - Versioned routes → Manufacturer routes: registers routes
app/api/v1/__init__.py - Versioned routes → Marketplace routes: registers routes
app/api/v1/__init__.py - Category routes → Category CRUD: calls
app/api/v1/categories/views.py - Manufacturer routes → Manufacturer CRUD: calls
app/api/v1/manufacturers/views.py - Marketplace routes → Marketplace CRUD: calls
app/api/v1/marketplaces/views.py - Category routes → Session helper: gets session
app/api/v1/categories/views.py - Manufacturer routes → Session helper: gets session
app/api/v1/manufacturers/views.py - Marketplace routes → Session helper: gets session
app/api/v1/marketplaces/views.py - Category CRUD → Shared CRUD: uses helpers
app/api/v1/categories/crud.py - Manufacturer CRUD → Shared CRUD: uses helpers
app/api/v1/manufacturers/crud.py - Marketplace CRUD → Shared CRUD: uses helpers
app/api/v1/marketplaces/crud.py - Supplement routes → Supplement CRUD: calls
app/api/v1/supplements.py - Supplement routes → Session helper: gets session
app/api/v1/supplements.py - Supplement routes → Supplement schemas: uses schemas
app/api/v1/supplements.py - Supplement CRUD → Supplement schemas: uses schemas
app/crud/supplements.py - Supplement CRUD → Supplement model: queries model
app/crud/supplements.py - Session helper → Runtime settings: loads database config
app/core/db_helper.py - Application entry → Session helper: uses sessions
app/main.py - Session helper → PostgreSQL: connects
README.md - ORM foundation → Runtime settings: uses naming config
app/core/models/base.py - Category model → ORM foundation: inherits
app/core/models/category.py - Manufacturer model → ORM foundation: inherits
app/core/models/manufacturer.py - Marketplace model → ORM foundation: inherits
app/core/models/marketplace.py - Supplement model → ORM foundation: inherits
app/core/models/supplement.py - Analysis expertise → ORM foundation: inherits
app/core/models/supplement_expertise.py - Product offers → ORM foundation: inherits
app/core/models/supplement_offer.py - Analysis sources → ORM foundation: inherits
app/core/models/source.py