How mrgrose/pillstore works
PillStore is a FastAPI e-commerce application for supplements, with a separate Telegram bot and Mini App integration. The main customer journey is account access, product discovery, cart management, and order placement; seller/admin tools, favorites, stock management, and iHerb import are additional product capabilities. The graph follows documented API registration and sampled service dependencies. Several route-to-service and persistence details are unsampled, so those links are omitted or marked unverified rather than inferred as certain.
Main entry points: main.py FastAPI app · products_crud.py Product persistence · category_crud.py Category persistence · order_service.py Order service
Components 30
Application entry
- FastAPI app
pillstore/app/main.py
Identity and access
- Auth API
pillstore/app/api/v2/auth.py - User service
pillstore/app/services/user_service.py - User persistence
pillstore/app/db_crud/user_crud.py - User records
pillstore/app/models/users.py
Catalog and import
- Product API
pillstore/app/api/v2/products.py - Category API
pillstore/app/api/v2/categories.py - Product service
pillstore/app/services/product_service.py - Category service
pillstore/app/services/category_service.py - Product persistence
pillstore/app/db_crud/products_crud.py - Category persistence
pillstore/app/db_crud/category_crud.py - Product records
pillstore/app/models/products.py - iHerb importer
pillstore/app/utils/iherb_scraper.py
Shopping and orders
- Cart API
pillstore/app/api/v2/cart.py - Cart service
pillstore/app/services/cart_service.py - Cart persistence
pillstore/app/db_crud/cart_crud.py - Orders API
pillstore/app/api/v2/orders.py - Order service
pillstore/app/services/order_service.py - Order persistence
pillstore/app/db_crud/order_crud.py - Order records
pillstore/app/models/orders.py - Favorites API
pillstore/app/api/v2/favorites.py
Admin and integrations
- Admin API
pillstore/app/api/v2/admin.py - Admin service
pillstore/app/services/admin_service.py - Telegram bot
pillstore/bot/main.py - Bot handlers
pillstore/bot/handlers.py - Bot API client
pillstore/bot/api_client.py
Other components
- Shopper
- Administrator
- PillStore HTTP API
- PostgreSQL
Connections 28
- Shopper → FastAPI app: shops at
- Administrator → FastAPI app: manages via
- FastAPI app → Auth API: registers
pillstore/app/main.py - FastAPI app → Product API: registers
pillstore/app/main.py - FastAPI app → Category API: registers
pillstore/app/main.py - FastAPI app → Cart API: registers
pillstore/app/main.py - FastAPI app → Orders API: registers
pillstore/app/main.py - FastAPI app → Favorites API: registers
pillstore/app/main.py - FastAPI app → Admin API: registers
pillstore/app/main.py - Auth API → User service: calls
pillstore/app/api/v2/auth.py - User service → User persistence: uses
pillstore/app/services/user_service.py - Product service → Product persistence: uses
pillstore/app/services/product_service.py - Product service → Category persistence: uses
pillstore/app/services/product_service.py - Category service → Category persistence: uses
pillstore/app/services/category_service.py - Order service → Cart persistence: uses
pillstore/app/services/order_service.py - Order service → Order persistence: uses
pillstore/app/services/order_service.py - Order service → Product persistence: uses
pillstore/app/services/order_service.py - Admin service → Product persistence: uses
pillstore/app/services/admin_service.py - Admin service → Category persistence: uses
pillstore/app/services/admin_service.py - Telegram bot → Bot handlers: registers handlers
pillstore/bot/main.py - Bot handlers → Bot API client: calls
pillstore/bot/handlers.py - Bot API client → PillStore HTTP API: requests
- iHerb importer → Product service: imports products
pillstore/app/services/product_service.py - User persistence → PostgreSQL: persists users
- Product persistence → PostgreSQL: persists products
- Category persistence → PostgreSQL: persists categories
- Cart persistence → PostgreSQL: persists cart
- Order persistence → PostgreSQL: persists orders