Skip to content

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Git

Quick Start

  1. Clone the repository:
bash
git clone https://github.com/fabriziosalmi/nis2-public.git
cd nis2-public
  1. Create your environment file:
bash
cp .env.example .env

Edit .env and set JWT_SECRET and NEXTAUTH_SECRET to random values. See Configuration for all variables.

  1. Start the platform:
bash
make dev

This builds and starts all services: PostgreSQL, Redis, FastAPI, Celery worker, Celery Beat, and the Next.js frontend.

  1. Open the dashboard:

First Steps

  1. Register an account from the login page. Registration automatically creates an organization and assigns you the admin role.
  2. Add assets -- enter the domains or IPs you want to scan.
  3. Run a scan -- select one or more assets and click Start Scan.
  4. Review findings in the dashboard. Each finding maps to a NIS2 article and includes severity and remediation guidance.

Project Structure

nis2-public/
  packages/
    scanner/     # Python scanner (aiohttp, asyncio, dnspython, playwright)
    api/         # FastAPI backend (REST API, Celery task definitions)
    web/         # Next.js 15 frontend (shadcn/ui, Tailwind CSS)
  infra/
    docker/      # docker-compose.dev.yml, docker-compose.prod.yml
  scripts/       # DB seed, migration helpers
  docs/          # This documentation (VitePress)

Make Targets

CommandDescription
make devStart all services in development mode
make dev-downStop development services
make dev-logsTail logs for all services
make api-logsTail API service logs
make web-logsTail frontend logs
make db-migrate msg="description"Generate a new Alembic migration
make db-upgradeRun database migrations
make db-seedSeed database with sample data
make testRun all tests (scanner + API)
make test-scannerRun scanner tests only
make test-apiRun API tests only
make prodStart production stack
make prod-downStop production stack
make cleanRemove containers, volumes, and caches

Released under the MIT License.