An open API service indexing awesome lists of open source software.

https://github.com/pixisprod/todo-api2.0

Asynchronous To-Do API with JWT authentication, role-based access control, and admin tools built on FastAPI and PostgreSQL.
https://github.com/pixisprod/todo-api2.0

admin alembic fastapi postgresql python rbac security sqlalchemy todo

Last synced: 2 months ago
JSON representation

Asynchronous To-Do API with JWT authentication, role-based access control, and admin tools built on FastAPI and PostgreSQL.

Awesome Lists containing this project

README

          

# ๐Ÿ“Œ To-Do API
![Python](https://img.shields.io/badge/python-3.13-blue)
![FastAPI](https://img.shields.io/badge/FastAPI-โšก-blue)
![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-๐Ÿงช-blue)
![Alembic](https://img.shields.io/badge/Alembic-โš—-blue)
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-๐Ÿ˜-blue)

## ๐Ÿ“– Description
A fast and modern asynchronous To-Do API built with FastAPI and PostgreSQL.
Includes secure authentication with JWT, role-based access control (RBAC), and advanced admin tools for managing users and tasks efficiently.

### ๐Ÿ”ฅ Highlights
โšก Fully asynchronous architecture for high performance
๐Ÿ” JWT authentication and security layer
๐Ÿงฉ Role-based access control (RBAC) โ€” user and admin roles
๐Ÿ“ CRUD operations for tasks
๐Ÿ› ๏ธ Admin tools to manage users and their tasks
๐Ÿงช SQLAlchemy + Alembic for database management
๐Ÿ˜ PostgreSQL support
๐Ÿ”ฌ Integrational tests for more stability

---

## ๐Ÿ”ง Features
- Fully asynchronous
- Authentication and security system
- RBAC system (user, admin)
- Task operations:
- View tasks
- Edit tasks
- Delete tasks
- Create tasks
- Admin tools:
- Deactivate users
- Activate users
- View all users
- View tasks of all users

---

## ๐Ÿ›  Technologies
- **Language**: Python 3.13 ๐Ÿ
- **Framework**: FastAPI โšก
- **Database**: PostgreSQL ๐Ÿ˜
- **ORM**: SQLAlchemy ๐Ÿงช
- **Migrations**: Alembic โš—
- **Tests**: Pytest ๐Ÿ”ฌ

---

# โš™ How to setup and run

## ๐Ÿ“ฆ Preparation
1. **Clone the repository to your folder:**
```
git clone https://github.com/PixisProd/todo-api2.0.git
```

2. **Install poetry:**
```
pip install poetry
```

3. **Install the dependencies:**
```
poetry install --no-root
```

4. **Download and install PostgreSQL**:
- Visit the [official PostgreSQL download page](https://www.postgresql.org/download/).
- Ensure PostgreSQL is running and note the credentials for your database setup.

---

## ๐Ÿš€ Launch
1. First, create a `.env` file by copying `.env.example` and filling in all the required fields.
*You can also configure additional parameters, such as `JWT_SECRET_KEY`, etc.*

2. **Activate poetry virtual environment**:
```
poetry shell
```

3. **Run project**:
```
poetry run uvicorn src.main:app --reload
```

---

# ๐ŸŒŒ Conclusion
Thank you for your attention. If you like the structure and implementation of the project, feel free to give it a star.

_โœจ Crafted to build knowledge._