Prerequisites
Before you begin, ensure you have the following installed:- Node.js 24 or later
- pnpm 10 or later (install via corepack:
corepack enable) - Python 3.14 or later (for security analysis functions)
- A Supabase project (for database and storage)
- A GitHub OAuth App (for authentication)
Setup Steps
Enable pnpm and install dependencies
Configure environment variables
.env.local and fill in the required values:DATABASE_URL— PostgreSQL connection stringSUPABASE_URL— Your Supabase project URLSUPABASE_ANON_KEY— Public keySUPABASE_SERVICE_ROLE_KEY— Service role key (server-only)BETTER_AUTH_SECRET— Session encryption secretGITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET— OAuth credentialsFIRST_ADMIN_EMAIL— Email address to promote to admin role
.env.example for the complete list of configuration options.Available Commands
Development
Testing
Database
Admin
Project Structure
Tank is a monorepo managed by Turborepo with pnpm workspaces:Troubleshooting
Hot Reload Issues
The web app uses aglobalThis.__db singleton to prevent database connection leaks during hot reload. If you see connection pool errors, restart the dev server.
Test Failures
E2E tests require real credentials in.env.local. If tests fail:
- Ensure all environment variables are set
- Check that the database is accessible
- Verify Supabase storage is configured
Python Dependencies
If the security scanner fails:Next Steps
Architecture
Understand the system design and tech stack
Contributing
Learn how to contribute to Tank
Testing
Run and write tests