Skip to content

Sravani508/fastapi-project

Repository files navigation

🚀 Enterprise Full-Stack Web Application Engine

An enterprise-grade, cloud-native web application built with robust Python (FastAPI) on the backend and modern React (TypeScript) on the frontend. This project serves as a highly scalable blueprint featuring automated software validation, strict data security, and containerized deployment infrastructure.


🎯 System Architecture Overview (How it works)

Below is the end-to-end data flow layout demonstrating how a user request passes through security and reaches the relational database:

[ User Browser ] ──(HTTPS)──> [ Traefik Reverse Proxy / Load Balancer ]
                                           │
                                   ┌───────┴───────┐
                                   ▼               ▼
                           [ React UI Frontend ]  [ FastAPI Backend API ]
                                                           │
                                                   (Data Validation via Pydantic)
                                                           │
                                                   (ORM via SQLModel)
                                                           │
                                                           ▼
                                                 [ PostgreSQL Database ]

🛠️ Technology Stack & Core Capabilities

Layer Technology Primary Purpose / Role in Project
Backend Python (FastAPI) High-performance asynchronous API development & routing.
Frontend React & TypeScript State-driven user interface with type safety.
Styling Tailwind CSS & shadcn/ui Modern, clean UI components with built-in Dark Mode support.
Database PostgreSQL Enterprise-grade, persistent relational data storage.
ORM SQLModel Bridge between Python classes and SQL tables seamlessly.
Validation Pydantic 100% strict runtime data typing and constraint enforcement.
Security JWT & Passlib Secure JSON Web Token authentication with password hashing.
Testing Pytest & Playwright Comprehensive automated backend unit and frontend E2E browser tests.
DevOps Docker & Docker Compose Multi-container environment orchestration for instant setup.
Proxy Traefik Reverse proxy with automated Let's Encrypt HTTPS management.
CI/CD GitHub Actions Automated validation scripts executed on every single code push.

📁 Complete Folder Structure Explained

Here is what every major folder and configuration file does inside the project repository:

wipro-fastapi-project/
├── .github/workflows/    # Automated CI/CD pipelines (Runs test scripts on push)
├── backend/              # Core server application folder
│   ├── app/              # Business logic including routes, database core, and models
│   │   ├── api/          # Individual endpoint paths (Users, Items, Authentication)
│   │   ├── core/         # Core system security settings, configurations, and DB setup
│   │   └── models.py     # Database table layouts mapping directly to PostgreSQL
│   ├── pyproject.toml    # Main Python package dependencies and workspace management
│   └── uv.lock           # Locked versions of scripts ensuring 100% stable builds
├── frontend/             # User Dashboard interface website built with React
│   ├── src/              # Visual user layout components, custom hooks, and pages
│   └── package.json      # JavaScript system node package dependencies
├── scripts/              # Setup, initialization, and test automation helper scripts
├── compose.yml           # Master orchestrator spinning up the complete tech stack
└── .env                  # Configuration variables (Saves security tokens and database passwords)

🚀 Quality Assurance & Software Validation

To adhere strictly to professional quality metrics, this blueprint isolates and executes tests dynamically inside live application environments:

1. Execute Backend Unit Verification Tests

Run data validation, endpoint responses, and system flow assertions using Pytest:

docker compose exec backend pytest

2. Execute Frontend End-to-End User Experience Workflows

Run simulated browser environments via Playwright to ensure zero UI bugs:

docker compose exec frontend npx playwright test

💻 Step-by-Step Local Deployment (Setup Guide)

Follow these direct steps to bring up the application infrastructure locally on your machine:

1. Fetch Code Repository

Download the project onto your local platform machine environment:

git clone https://github.com
cd wipro-fastapi-project

2. Setup Security Keys

Generate secure random encryption strings to replace the system placeholder credentials:

python -c "import secrets; print(secrets.token_urlsafe(32))"

Create a .env file from the repository templates and paste your unique keys into SECRET_KEY and POSTGRES_PASSWORD.

3. Orchestrate Containers

Run a single command to automatically build images, download configurations, network components, and spin up the live environment:

docker compose up -d --build

🖥️ Live Dashboard & Interface URLs

Once the terminal scripts complete, the running system maps your ports to the following access urls:

  • Interactive API Layout (Swagger Documentation): http://localhost/docs
  • Full-Stack UI Client Web Console: http://localhost
  • Local In-Development Mail Tester Console: http://localhost:8025

Developed as a premier production-ready blueprint illustrating clean architecture principles for modern software mandates.

About

Full stack, modern web application powered by Python FastAPI, React, SQLModel, PostgreSQL, and Docker Compose.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors