Skip to content

PathaniaOO/Fast-Api-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🛒 Product Manager — Full-Stack App

A full-stack product management application built with FastAPI (backend) and React (frontend). Supports creating, updating, and deleting products through a clean REST API connected to a PostgreSQL database.


🧱 Tech Stack

Layer Technology
Backend FastAPI, SQLAlchemy, psycopg2
Database PostgreSQL
Frontend React 18, Axios
Server Uvicorn
Config python-dotenv

📁 Project Structure

project-root/
├── backend/        # FastAPI app
│   ├── main.py
│   ├── models.py
│   ├── database.py
│   ├── .env
│   └── pyproject.toml
└── frontend/       # React app
    ├── src/
    ├── public/
    └── package.json

⚙️ Backend Setup

Prerequisites

  • Python 3.13+
  • PostgreSQL running locally

Installation

cd backend
pip install .

Environment Variables

Create a .env file in the backend/ directory:

DATABASE_URL=postgresql://username:password@localhost:5432/your_db_name

Run the Server

uvicorn main:app --reload

The API will be available at http://localhost:8000

API Endpoints

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

Interactive API docs available at: http://localhost:8000/docs


🖥️ Frontend Setup

Prerequisites

  • Node.js & npm

Installation

cd frontend
npm install

Run the App

npm start

The app will be available at http://localhost:3000 and proxies API requests to http://localhost:8000.


🚀 Running the Full Stack

  1. Start PostgreSQL
  2. Start the backend:
    cd backend && uvicorn main:app --reload
  3. Start the frontend:
    cd frontend && npm start

📄 License

MIT

About

A full-stack product management app built with FastAPI — supports creating, updating, and deleting products via a modern frontend and REST API backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors