Prerequisites
Before you begin, ensure you have the following installed:- Task (taskfile) — Installation Guide
- Node.js v22+ — Installation Guide
- Go 1.26+ — Installation Guide
- PostgreSQL v17+ (with pgvector extension)
- Docker & Docker Compose (recommended for database and full stack)
Clone the repository
console and core-api — alongside the Go worker.
Project Structure
console/— React 19 + TanStack Router + Vite.core-api/— NestJS 11 (REST on port6276, gRPC on port16276).worker/— Go scanning workers (CLI and app entry points).
Initialize Developer Environment
To set up your local development environment, run the following command:- Copy example environment files (
.env) forcore-api,console, andworker - Install project dependencies using
npm(managed by the task for each workspace) - Install Go dependencies for the worker
- Install worker security tools (nuclei, subfinder, httpx, naabu, dnsx) into
worker/oasm-tools/
task init, you can start all services using task dev or run them individually as described below.
Running Services
All Services with Task
To start the API and Console development servers simultaneously:- Core API at
http://localhost:6276 - Console at
http://localhost:5173(Vite dev server)
Core API
6276 (base path http://localhost:6276/api) with the gRPC server on port 16276.
Console (Web Interface)
Workers
To run workers locally in CLI mode:Database Setup
task init does not automatically start PostgreSQL. You can either:
- Use Docker Compose to start PostgreSQL and Redis (both are required for local development):
- Use your own PostgreSQL instance and update
core-api/.envaccordingly.
task docker-compose instead — see Using Docker Compose.
Database Migration
Database migrations are managed using TypeORM. The migration scripts are defined incore-api/taskfile.yml and can be executed using the task commands.
Run All Pending Migrations
This command executes all pending database migrations:- Connect to the PostgreSQL database
- Check for pending migrations in the
migrationstable - Run all new migrations that haven’t been applied yet
Generate a New Migration
To generate a new migration with a custom name:core-api/src/database/migrations/.
Revert the Last Migration
To rollback the most recently executed migration:Migration with Docker Compose
If you prefer to run migrations using Docker (useful when not running PostgreSQL locally):core-api once migrations complete. To keep the container for debugging:
--rm flag ensures the container is removed after it stops.
Development Conventions
Code Style
- Core API (NestJS): Uses ESLint and Prettier.
- Console (React): Uses ESLint and Prettier.
- Workers (Go): Uses
go fmtandgo vet.
Testing
-
Core API: Uses Jest for testing.
-
Console: Uses Vitest for unit tests and Playwright for e2e tests.
-
Workers: Uses Go testing.
Build
API Client Generation
After making changes to the API contract, regenerate the console API client:.open-api in core-api (the docs site mirrors it at api-reference/openapi.json).
gRPC Stub Generation
After modifying proto files, regenerate gRPC stubs:grpc-client/.
Environment variables
Each service reads its configuration from its own.env file, copied from the example templates by task init. The table below lists the variables used in local development with their defaults.
Never commit
.env files — they are gitignored. The worker’s WORKER_API_KEY must match the workspace key the Core API expects; a mismatch prevents workers from registering, see Worker.Using Docker Compose
To run the entire stack using Docker Compose:- Console (port 3000)
- Core API (port 6276, gRPC port 16276)
- 3 Worker instances
- PostgreSQL with pgvector (port 5432)
- Redis (port 6379)
- Geo-IP proxy (port 4360)
- Rustfs S3 storage (port 9000)
Local CI Testing
Before pushing changes, you can run GitHub Actions workflows locally using act to catch issues early.Prerequisites
- Docker Desktop must be installed and running
- Install act:
Usage
Local Test Equivalents
Notes
- Workflows using
docker/build-push-actionwith multi-platform builds (build-release.yml,build-nightly.yml) need QEMU and native CI runners — they cannot run locally. dorny/paths-filtermay not detect file changes correctly in shallow clones. Use--full-historyor test specific jobs.- Docker layer caching (
type=gha) is not available locally, but builds will still work.
Contributing
We welcome contributions! Please follow these steps:- Fork the repository.
- Create a feature branch:
git checkout -b feature/amazing-feature. - Make your changes and commit them following Conventional Commits:
- Test CI workflows locally:
bash .github/scripts/test-local.sh <workflow> - Push to the branch:
git push origin feature/amazing-feature. - Open a Pull Request.
