Skip to content

Developer Documentation

This section provides technical reference materials for developers working with the TestNet platform, including API interfaces, frontend architecture, client design, and testing guides.

Document Index

DocumentDescription
API Endpoint IndexComplete endpoint index from backend Controllers
API Endpoint IndexComplete endpoint index from backend Controllers
Frontend Dev GuideResourceCrudPage component usage, CRUD scaffold development
Client ArchitectureGo scanning client architecture, executor implementations, security policies
Frontend E2E TestingPlaywright end-to-end test guide
Mock Testing GuideMock data file specs and local mock execution
DSL Verification Tooltestnet-client validate/test/verify subcommand usage

Tech Stack Overview

Backend (testnet-server)

TechnologyVersionUsage
Spring Boot3.4.3Core framework
JDK17Runtime
PostgreSQL16Primary database
Redis7Cache / Session
MyBatis-Plus3.5.8ORM
Flyway-Database migration
Resilience4j2.2.0Circuit breaking / Retry / Rate limiting
Springdoc OpenAPI2.3.0API documentation

Frontend (testnet-web)

TechnologyVersionUsage
Vue3.5UI framework
Vite8Build tool
TypeScript5.9Type system
Naive UI2.44Component library
UnoCSS66Atomic CSS
Pinia3State management
CodeMirror6Code editor
ECharts6Charting library

Scan Client (testnet-client)

TechnologyVersionUsage
Go1.21+Development language
Zap-Structured logging
gopsutil-System info collection

Quick Start for Development

bash
# 1. Start development dependencies (PostgreSQL + Redis)
docker compose -f docker-compose-dev.yml up -d

# 2. Start backend
cd testnet-server
mvn spring-boot:run
# Service starts at http://localhost:8081

# 3. Start frontend
cd testnet-web
npm install && npm run dev
# Frontend starts at http://localhost:3100

# 4. Start scanning node (optional)
cd testnet-client
go run ./cmd -server http://localhost:8081 -secret <secret> -name dev-node

API Authentication

All APIs (except whitelisted endpoints) require a JWT token in the request header:

http
Authorization: Bearer <your-jwt-token>

Tokens are obtained via POST /api/v1/auth/login and are valid for 24 hours.

Whitelisted endpoints (no auth required):

  • POST /api/v1/auth/login
  • POST /api/v1/client/register
  • POST /api/v1/client/heartbeat
  • POST /api/v1/client/offline
  • GET /api/v1/client/task/**
  • GET /api/v1/client/storage/**
  • GET /api/v1/client/config-file/**
  • /api/v1/ws/** (WebSocket endpoints)
  • GET /api/v1/license/info
  • GET /api/v1/license/machine-id
  • POST /api/v1/license/activate
  • GET /error, OPTIONS /**

Released under the MIT License