The back-end API for ITEMS marketplace app.
- Python FastAPI
- PostrgreSQL
- Poetry
- Alembic (SQLAlchemy)
- Docker (or Kuberneter)
- pydantic
- S3 storage
...among many things
- Install
nbstripoutfor jupyter notebook commit output stripping. - Copy
.env.exampleto.envand fill out values.
Build and Run:
make runVisit: http://localhost:8000/docs
Database: localhost:5432
The meal recommendation system combines user swipes with high-rated reviews to build a personalized queue.
Key pieces you might need:
-
Seed local data (10 users × 5 reviews each + likes):
poetry run python admin/seed_recommendation_data.py
-
Notebook demo:
admin/recommendation_test.ipynb(run all cells to see top picks for a sample user). -
API:
GET /users/me/feed?limit=20returns the pre-ranked queue for the authenticated user. -
Queue regeneration: if a user’s
user_feed_itemtable is empty, the backend automatically recomputes their feed using the latest reviews/ratings.
Use this section as the canonical reference when hooking up the frontend swipe/scroll experience.
Run all tests while the api is running:
make testAdd package:
poetry add <name>Install from pyproject.toml or poetry.lock:
poetry installA collection of general rules and guidelines for code style and linting.