Skip to content

yovsefx/TaskTeam-SaaS-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ TaskTeam SaaS API

Production-style multi-tenant SaaS backend built with:

  • FastAPI
  • Async SQLAlchemy (2.0 style)
  • JWT Authentication (Access + Refresh with rotation)
  • Role-Based Access Control (RBAC)
  • Clean Architecture (API β†’ Service β†’ Repository β†’ DB)
  • Dockerized & published to GHCR

πŸ— Architecture

API Layer β†’ FastAPI Routers
Service Layer β†’ Business Logic & Permissions
Repository Layer β†’ Database Queries
Database β†’ Async SQLAlchemy ORM

Project structure:

app/ β”œβ”€β”€ api/

β”œβ”€β”€ core/

β”œβ”€β”€ db/

β”œβ”€β”€ models/

β”œβ”€β”€ repositories/

β”œβ”€β”€ schemas/

β”œβ”€β”€ services/

β”œβ”€β”€ main.py

.env


πŸ” Authentication

  • JWT Access Token
  • Refresh Token with rotation
  • Token revocation support
  • Secure password hashing (bcrypt)
  • Role-based permissions

Roles:

owner β†’ Full control
admin β†’ Manage projects & members
member β†’ Limited access


πŸ›  Tech Stack

  • FastAPI
  • Async SQLAlchemy
  • SQLite (default)
  • PostgreSQL (supported)
  • python-jose (JWT)
  • Passlib (bcrypt)
  • Pytest (async testing)
  • Docker

βš™οΈ Default Configuration

By default:

  • Database: sqlite+aiosqlite
  • Secret Key: auto-generated if not provided
  • Access token expiry: 30 minutes
  • Refresh token expiry: 7 days

🐳 Docker (GHCR)

Prebuilt image:

ghcr.io/yovsefx/taskteam_saas:latest

Run with default configuration:

docker run -p 8000:8000 ghcr.io/yovsefx/taskteam_saas:latest

Run with custom environment variables (PostgreSQL example):

docker run -p 8000:8000 \\
  -e DATABASE_URL="postgresql+asyncpg://user:password@host:5432/dbname" \\
  -e SECRET_KEY="your-secret-key" \\
  -e ACCESS_TOKEN_EXPIRE_MINUTES=30 \\
  -e REFRESH_TOKEN_EXPIRE_DAYS=14 \\
  ghcr.io/yovsefx/taskteam_saas:latest

πŸš€ Run Locally

uvicorn app.main:app --reload

API Docs: http://127.0.0.1:8000/docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages