Published on March 2, 2025
Developing the NoCap shop was an exciting challenge. This was my first time building a full-fledged React-based online store from scratch, integrating backend logic with FastAPI, and ensuring a seamless shopping experience.
Component | Technology Used |
---|---|
Frontend | React + Vite |
Backend | FastAPI (Python) |
Database | PostgreSQL |
Payments | Stripe |
Reverse Proxy | Nginx |
The product cards are simple and user-friendly, showing the product image, title, price, and an “Add to Cart” button for a smooth purchasing experience.
React manages state-based filtering, allowing users to sort products by category, price, or name dynamically.
Using collaborative filtering, the platform suggests products based on past user interactions, helping customers discover relevant items.
The backend creates a checkout session via the Stripe API. The frontend then redirects users to a secure Stripe-hosted page. After payment, users are redirected back to the site.
pip install -r backend/requirements.txt
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000
Endpoint | Method | Description |
---|---|---|
/caps | GET | Get all caps |
/cap/{cap_id} | GET | Get cap by ID |
/add_cap | POST | Add a new cap |
/create-checkout-session | POST | Create a Stripe checkout session |
npm install
npm run dev --host --port 5173
npm run build
The NoCap shop was a great learning experience, from setting up a full-stack e-commerce platform to handling payments and optimizing performance. The combination of React, FastAPI, and PostgreSQL provides a scalable and efficient solution. If you’re interested in building a similar platform, let’s connect!