Skip to content

Latest commit

ย 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


๐Ÿ“Œ Overview

Fullstack Product App is a production-grade CRUD application built with a fully decoupled architecture โ€” a React frontend, a FastAPI backend, and a Neon PostgreSQL cloud database. It demonstrates an end-to-end fullstack workflow: REST API design โ†’ database integration โ†’ frontend consumption โ†’ cloud deployment.

Built as a postgraduate project to demonstrate real-world fullstack engineering: REST APIs, relational databases, CORS configuration, and multi-platform cloud deployment.


โœจ Features

Feature Description
๐Ÿ›’ Create Products Add new products with name, description, price & quantity
๐Ÿ“‹ Read Products Fetch all products or retrieve a single product by ID
โœ๏ธ Update Products Edit existing product details via PUT endpoint
๐Ÿ—‘๏ธ Delete Products Remove products from the database
โšก FastAPI Backend Auto-generated Swagger docs, async-ready, high performance
๐Ÿ˜ Neon PostgreSQL Serverless cloud database with persistent storage
๐ŸŒ React Frontend Clean, responsive UI deployed on Vercel
๐Ÿ”’ CORS Configured Secure cross-origin communication between frontend & backend
โ˜๏ธ Fully Deployed Frontend โ†’ Vercel, Backend โ†’ Render, DB โ†’ Neon

๐Ÿ–ฅ๏ธ Results & Screenshots

๐Ÿ–ฅ๏ธ User Interface โ€” Main Dashboard

Product App UI


โž• Create โ€” Inserting a Product

Step 1: Fill the form Step 2: Submit Step 3: Confirmed
Add product form Inserting product Product inserted

โœ๏ธ Update โ€” Editing a Product

Step 1: Select product Step 2: Edit fields Step 3: Confirmed
Update product Updating product Product updated

๐Ÿ—‘๏ธ Delete โ€” Removing a Product

Step 1: Trigger delete Step 2: Confirm pop-up Step 3: Removed
Delete product Delete pop-up Product deleted

๐Ÿงฑ System Architecture

React Frontend (Vercel)
        โ†“  HTTP Requests (fetch / axios)
FastAPI Backend (Render)
        โ†“  SQLAlchemy ORM
Neon PostgreSQL (Cloud DB)

๐ŸŒ Deployment

Layer Platform URL
๐ŸŒ Frontend Vercel fullstack-product-app-rust.vercel.app
โš™๏ธ Backend API Render fastapi-product-backend.onrender.com
๐Ÿ—„๏ธ Database Neon PostgreSQL Cloud-hosted (serverless)

๐Ÿ“ก API Endpoints

Method Endpoint Description
GET /products Retrieve all products
GET /products/{id} Retrieve product by ID
POST /products Create a new product
PUT /products/{id} Update an existing product
DELETE /products/{id} Delete a product

๐Ÿ“– Full interactive API docs available at /docs (Swagger UI) on the backend URL.


๐Ÿ› ๏ธ Tech Stack

Layer Tools
Frontend React, JavaScript, CSS
Backend Python, FastAPI, SQLAlchemy, Pydantic
Database PostgreSQL (Neon โ€” serverless cloud)
ORM SQLAlchemy + Alembic-ready models
Deployment Vercel (frontend), Render (backend), Neon (DB)

๐Ÿ“ Project Structure

fullstack-product-app/
โ”‚
โ”œโ”€โ”€ main.py                  # FastAPI app โ€” all CRUD routes
โ”œโ”€โ”€ models.py                # Pydantic request/response schemas
โ”œโ”€โ”€ database.py              # SQLAlchemy engine & session setup
โ”œโ”€โ”€ database_models.py       # ORM table definitions
โ”œโ”€โ”€ render.yaml              # Render deployment configuration
โ”œโ”€โ”€ requirements.txt         # Python dependencies
โ”‚
โ”œโ”€โ”€ frontend/                # React application source
โ”‚   โ””โ”€โ”€ ...                  # Components, pages, API calls
โ”‚
โ”œโ”€โ”€ product-ui/              # Additional UI assets / build
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ””โ”€โ”€ workings/                # Demo screenshots & video
    โ”œโ”€โ”€ User_Interface_Screen.png
    โ”œโ”€โ”€ adding_product.png
    โ”œโ”€โ”€ inserting_product.png
    โ”œโ”€โ”€ product_inserted.png
    โ”œโ”€โ”€ update_product.png
    โ”œโ”€โ”€ updating_product.png
    โ”œโ”€โ”€ product_updated.png
    โ”œโ”€โ”€ delete_pop_up.png
    โ”œโ”€โ”€ product_deleted.png
    โ””โ”€โ”€ CRUD_operations_carried_out.mp4

โš™๏ธ Local Setup

Prerequisites: Python 3.9+, Node.js 16+, pip, npm

Backend

# 1. Clone the repository
git clone https://github.com/jk-neha/fullstack-product-app.git
cd fullstack-product-app

# 2. Install Python dependencies
pip install -r requirements.txt

# 3. Configure your database
# Create a .env file and add:
# DATABASE_URL=postgresql://user:password@host/dbname

# 4. Run the FastAPI server
uvicorn main:app --reload

API runs at http://localhost:8000 ยท Swagger docs at http://localhost:8000/docs

Frontend

cd frontend
npm install
npm start

Frontend runs at http://localhost:3000

โš ๏ธ Update the API base URL in your frontend config to point to http://localhost:8000 for local development.


๐Ÿš€ How It Works

1. FRONTEND  โ†’  User interacts with the React UI (view / add / edit / delete products)

2. API CALL  โ†’  React sends an HTTP request to the FastAPI backend (with CORS headers)

3. BACKEND   โ†’  FastAPI validates the request body via Pydantic models

4. DATABASE  โ†’  SQLAlchemy ORM executes the query on Neon PostgreSQL

5. RESPONSE  โ†’  Result returned as JSON and rendered back in the React UI

๐Ÿ“ฆ Dependencies

fastapi
uvicorn
sqlalchemy
psycopg2-binary
pydantic
python-dotenv

See requirements.txt for exact versions.


๐Ÿ”ฎ Future Enhancements

  • User authentication (JWT / OAuth)
  • Pagination & search for product listings
  • Image upload support per product
  • Admin dashboard with analytics
  • Docker + CI/CD pipeline (GitHub Actions)
  • Unit & integration tests (pytest + React Testing Library)

๐Ÿ”ฅ What Makes This Project Strong

โœ” True fullstack separation โ€” frontend, backend, and database on independent services
โœ” Production deployment โ€” live on Vercel + Render + Neon, not just localhost
โœ” Clean REST design โ€” all CRUD operations with proper HTTP verbs
โœ” CORS handled correctly โ€” secure cross-origin setup for real-world deployment
โœ” ORM-based persistence โ€” SQLAlchemy models, not raw SQL
โœ” Auto-generated API docs โ€” Swagger UI out of the box with FastAPI


๐Ÿ‘ฉโ€๐Ÿ’ป Author

Neha Vardhini J K ยท @jk-neha

Postgraduate Project โ€” Full-Stack Product Management Application


๐Ÿ“„ License

This project is open-source under the MIT License.


โญ Star this repo if you found it useful!

GitHub stars

Releases

Packages

Contributors

Languages