
Widget App – FastAPI + React (Vite) POC (POC) A production-ready FastAPI proof-of-concept fo Widget Company with PostgreSQL, SQLAlchemy, Vite+React frontend, and clean service-layer pricing logic. Implements basket pricing rules, delivery charges, and offers. This is just a proof of concept I have made for the demonstration purposes. All the information of the project or the documeneted that was provided to me is in POC_WIDGET_CO.docx. You can check it out for more info or what was asked of this project. I extended some functionality too which I thought should be added in it. Stack Backend: FastAPI, SQLAlchemy, pydantic-settings Frontend: Vite + React (JavaScript) DB: PostgreSQL (Docker) Orchestration: Docker Compose Quick start (Docker) “`bash from project root docker compose up -d –build seed database (one-time; backend must be healthy) docker exec -it widget_backend python seed.py “` Frontend: https://localhost:5173 Backend: https://localhost:8000 API base: https://localhost:8000/api/v1 Local development (without Docker) 1) Start Postgres (or use docker compose up -d db) 2) Configure .env bash DATABASE_URL=postgresql+psycopg2://postgres:postgres@localhost:5432/widget_db APP_NAME=Widget API DEBUG=true 3) Backend bash python -m venv .venv source .venv/bin/activate pip install -r requirements.txt python seed.py uvicorn app.main:app –reload –app-dir . 4) Frontend bash cd frontend npm install npm run dev API Health: GET /health Catalogue Products: GET/POST…Read More
References
Back to Main