/ justapi / demo_shop / shop / __init__.py
swadhinbiswas fix: remove highlight.js CSS import causing Docker build failure · 7/20/2026
299a084
25 lines · 1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""shop — a proper MVP e-commerce store API built on the JustAPI Runtime.

A real mini shop: categories, products (managed stock & price), sellers,
customers, a cart, checkout that creates orders + payments and decrements
inventory, and customer reviews. Data lives in `shop.db` (created/seeded by
`db_setup.py` from the Olist dataset). Mutations use real SQL transactions.

Package layout
--------------
  shop/config.py     application instance + DB wiring (singletons)
  shop/db.py         SQL helpers (query / paginate / tokens)
  shop/schemas.py    request validation schemas + validate() helper
  shop/catalog.py    categories + products CRUD + sellers
  shop/customers.py  customer register/lookup
  shop/cart.py       cart lifecycle + checkout (order + payment + stock dec)
  shop/orders.py     orders list/detail/status lifecycle
  shop/reviews.py    reviews + analytics

Importing this package builds the `app` (connects the DB and registers all
routes). Run with:  python -m shop --port 8080
"""
from .config import app, db

__all__ = ["app", "db"]