A full-stack web application built with React, FastAPI, and Supabase PostgreSQL.
- Backend: LibraryHub - Backend
- React
- JavaScript
- HTML5 & CSS3
- Tailwind CSS
- Daisy UI
- Python
- FastAPI
- Pydantic
- SQLAlchemy
- Supabase
- PostgreSQL
- Git & GitHub
- VS Code
- Postman
- Responsive and user-friendly interface
- RESTful API development with FastAPI
- PostgreSQL database integration using Supabase
- Data validation with Pydantic
- CRUD operations (Create, Read, Update, Delete)
- Frontend and backend separation
React Frontend
|
| HTTP Requests (REST API)
v
FastAPI Backend
|
| Database Queries
v
Supabase PostgreSQL
FastAPI-Fullstack-Project/
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ ├── App.jsx
│ │ └── main.jsx
│ └── package.json
│
├── backend/
│ ├── router/
│ ├── .env
│ ├── .gitignore
│ ├── database.py
│ ├── main.py
│ ├── models.py
│ └── requirements.txt
│
└── README.md
Make sure you have installed:
- Node.js and npm
- Python 3.10+
- A Supabase account
- Git
git clone https://github.com/MMunim90/FastAPI-Fullstack-Project.git
cd FastAPI-Fullstack-Projectcd backend
python -m venv venvActivate the virtual environment.
Windows:
venv\Scripts\activateLinux/macOS:
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtCreate a .env file and configure your database connection:
DATABASE_URL=your_supabase_postgresql_connection_stringStart the FastAPI server:
uvicorn main:app --reloadThe backend will run at:
http://127.0.0.1:8000
Interactive API documentation:
http://127.0.0.1:8000/docs
Open a new terminal:
cd frontend
npm installConfigure your frontend environment variables if required.
Create a .env file:
VITE_API_URL=http://127.0.0.1:8000Start the React development server:
npm run devOpen the local URL displayed in your terminal.
- Create a project in Supabase.
- Set up your PostgreSQL database tables.
- Copy the appropriate database connection string from your Supabase project.
- Add the connection string to the backend
.envfile. - Ensure your database credentials are kept private.
Never commit secret keys, passwords, or database credentials to GitHub.
Add the following to .gitignore:
.env
venv/
__pycache__/
node_modules/
dist/FastAPI automatically generates interactive API documentation.
- Swagger UI:
/docs - ReDoc:
/redoc
- Build the user interface with React.
- Develop API endpoints with FastAPI.
- Connect the backend to Supabase PostgreSQL.
- Integrate the frontend with the backend API.
- Test API endpoints and database operations.
- Test the complete application.
Currently under development.
Munim
- GitHub: @MMunim90
- LinkedIn: MD. SHAHAN AL MUNIM
This project is licensed under the MIT License. Add a LICENSE file if you intend to distribute it under that license.