This directory now hosts both the Fumehub frontend UI/UX and the e‑commerce FastAPI backend in one place.
- Backend (APIs, database, auth, cart, orders, products)
- Path:
e-commerce-main/backend - Stack: FastAPI, PostgreSQL, Redis (rate limiting), Alembic, Nginx/Docker support
- Path:
- Frontend (Fumehub storefront UI/UX)
- Path:
fumehub - Stack: React + Vite, Framer Motion, React Router
- Path:
You can treat this root folder as your combined project: backend and frontend live side‑by‑side.
-
Install dependencies
cd /Users/sreenandkarichery/Documents/fumehub-backend/e-commerce-main/backend python -m venv .venv source .venv/bin/activate # On Windows: .venv\\Scripts\\activate pip install -r requirements.txt
-
Configure environment
- Copy or create
.envbased on any sample/config you have inapp/core/config.py. - Ensure database, Redis, and other URLs are set correctly.
- Copy or create
-
Run the API server (dev mode)
cd /Users/sreenandkarichery/Documents/fumehub-backend/e-commerce-main/backend uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The backend will be available at:
http://localhost:8000- Health check:
GET http://localhost:8000/health - Products list:
GET http://localhost:8000/api/v1/product/list - Single product:
GET http://localhost:8000/api/v1/product/show/{product_id}
- Health check:
CORS is already configured in the FastAPI app to allow
*, so the frontend can call it directly fromlocalhost.
-
Install dependencies
cd /Users/sreenandkarichery/Documents/fumehub-backend/fumehub npm install -
(Optional) Configure API base URL for future integration
If you want to gradually move from the local mock/product data to the FastAPI backend, you can define an environment variable:
# .env.local (in /Users/sreenandkarichery/Documents/fumehub-backend/fumehub) VITE_API_BASE_URL=http://localhost:8000Then, inside your React code, you can call the backend using:
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000';
and gradually replace static imports (like
../data/products) withfetch/axioscalls to the FastAPI endpoints. -
Run the frontend dev server
cd /Users/sreenandkarichery/Documents/fumehub-backend/fumehub npm run devBy default Vite serves at:
http://localhost:5173
- Start backend: FastAPI on
http://localhost:8000 - Start frontend: Fumehub React on
http://localhost:5173 - The UI/UX remains exactly the same (Fumehub), and you now have a production‑grade backend in
e-commerce-main/backendthat you can wire your React components to as needed (products, cart, orders, auth, etc.).
You can now evolve this into a single deployable app (e.g., Docker Compose or separate frontend/backend deployments) without changing the core UI/UX.