A FastAPI-based logging service designed for SaaS applications.
It provides an easy way to collect, store, and manage logs from multiple projects and users.
- 🔑 API Keys per Project – Each project has its own API key for authentication.
- 📝 Log Management – Store structured logs with metadata (level, message, context, timestamp).
- 📂 Multi-Tenant Support – Users can manage multiple projects under the same account.
- ⚡ FastAPI + Async – High-performance logging API built on FastAPI.
- 📊 Query & Filter Logs – Retrieve logs by project, date range, or log level.
- 🛡️ Secure by Design – API key authentication and scoped permissions.
- FastAPI – modern, async web framework.
- PostgreSQL – log storage.
- SQLAlchemy – ORM for database access.
- uv – package and project manager.
- Python 3.12.8
- PostgreSQL running locally or in the cloud
- uv installed
git clone https://github.com/your-org/loggy-api.git
cd loggy-api
uv syncCreate a .env file:
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/logs
SECRET_KEY=your-secret-key
ALGORITHM=algorithm
ACCESS_TOKEN_EXPIRE_MINUTES=minutes
uv run uvicorn app.main:app --reload
Visit http://localhost:8000/docs for the interactive Swagger UI.