Thanks for your interest in contributing to SentinelAI. This project is a full-stack AI safety platform with a Python backend, a Next.js dashboard, and a Python SDK. We welcome bug reports, feature ideas, documentation improvements, and code contributions.
Before you start, please read this guide and the project README so you understand the architecture and expected workflows.
This repository is organized as follows:
Backend/— FastAPI API, database models, business logic, and service integrationsFrontend/— Next.js dashboard for monitoring and managementsentinelai-sdk/— Python SDK published assentinelai-riskdocs-site/— documentation siteDocs/— project docs and design notes
You will need:
- Git
- Python 3.12 (recommended; the backend runtime file is set to
python-3.12.8) - Node.js 18+ and npm 9+
- Docker and Docker Compose (optional but recommended for local database and infra services)
If you are working on backend logic, you should also have PostgreSQL available locally or use Docker to run the included services.
git clone https://github.com/<your-user>/Sentinel-AI.git
cd Sentinel-AIIf you are contributing from a branch in your own fork, make sure you keep your work isolated and rebase regularly against main.
There are three common ways to run the project locally:
- Backend only
- Frontend only
- Full stack with Docker services
From the repository root:
cd Backend
python -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows PowerShell
# .\.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r api/requirements.txtCreate your environment file:
cp .env.example .envThen edit .env and fill in the values required for your local run. At minimum, ensure the following are set appropriately:
DATABASE_URLCLERK_SECRET_KEYCLERK_PUBLISHABLE_KEYSENTINELAI_API_KEYSSMTP_HOST,SMTP_PORT,FROM_EMAILFRONTEND_BASE_URL
For a quick local dev setup, the repository includes a Postgres and Mailpit stack in Backend/docker-compose.yml. You can bring up just those support services:
cd Backend
docker compose up -d sentinelai-db mailpitThen run the API:
cd Backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000After the app starts, check:
- API docs: http://localhost:8000/docs
- Health endpoint: http://localhost:8000/health
- Mailpit UI: http://localhost:8025
If you are on Windows, the project also includes a helper script:
cd Backend
run_dev.batFrom the repository root:
cd Frontend
npm installThen start the app in development mode:
npm run devThe frontend should be available at:
If the app depends on auth or deployment-specific configuration, create a local .env.local file with the required public and private keys used by the app. Keep these values out of source control.
This is the easiest way to run the full application environment:
cd Backend
docker compose up --buildThis starts the backend, Postgres database, Mailpit email capture, NGINX, Prometheus, and Grafana. It is especially useful when validating end-to-end flows or service integration.
Before opening a pull request, run the relevant checks for the area you changed.
cd Backend
python -m pytestIf you are working on a subset of tests, target them explicitly:
python -m pytest tests/ -qcd Frontend
npm run lint
npm run type-check
npm run buildcd sentinelai-sdk
python -m pytestWe prefer small, focused contributions.
- Keep each PR focused on one feature, bug fix, or documentation improvement
- Prefer readable, maintainable code over clever shortcuts
- Add or update tests when you change behavior
- Update docs if you add user-facing configuration, endpoints, or workflow changes
- Document environment variables or setup changes clearly
Use clear branch names such as:
feature/add-risk-dashboard-filterfix/auth-session-expirydocs/contributing-guidechore/update-sdk-versioning
Before submitting a PR:
- Rebase or update from
main - Run the relevant lint/test/build checks
- Confirm no secrets or local env files are included
- Explain the problem and the fix in the PR description
- Link the related issue if one exists
Please follow the conventions used in the surrounding codebase.
- Keep code readable and consistent with the existing style
- Use clear variable names and concise comments only where needed
- Avoid committing debug scripts, temporary files, or personal credentials
- Do not include generated build artifacts or local environment files in your commits
- Prefer minimal, well-scoped changes
If you find a bug or have a feature request:
- Search the open issues first to avoid duplication
- Open a new issue with a clear title and reproduction steps
- Include the relevant environment details, logs, and expected vs. actual behavior
- For security issues, do not open a normal public issue. Use a private reporting path or contact the maintainers directly.
Do not commit:
- API keys
- tokens
- private credentials
.envfiles- database dumps
- user data or screenshots containing sensitive content
If you need to test with real credentials, keep them local to your machine and never push them to the repo.
We expect contributors to be respectful, constructive, and collaborative. Please keep discussions focused on improving the project and maintain a professional, helpful tone in issues, PRs, and code reviews.
If you are unsure where to start, open an issue or ask in the repository discussion area. We are happy to help new contributors get set up and find a good first task.
Thank you for helping improve SentinelAI.