Evidra is a modular, microservice-based platform for managing evidence repositories, compliance frameworks, questionnaires, and AI-assisted audit workflows. Built with Go, it follows domain-driven design with clean architecture boundaries.
ββββββββββββββββ
β Frontend β
β (Next.js) β
ββββββββ¬ββββββββ
β HTTP / gRPC
βββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β β β
ββββββββΌβββββββ βββββββΌβββββββ βββββββββββΌβββββββββββ βββΌβββββββββββ
β Identity β βQuestionnaireβ β Evidence β β Export β
β Service β β Service β β Repository β β Service β
ββββββββ¬βββββββ βββββββ¬βββββββ βββββββββββ¬βββββββββββ βββββββ¬βββββββ
β β β β
β βββββββΌβββββββ β β
β β Worker β β β
β β (NATS sub) β β β
β βββββββ¬βββββββ β β
β β β β
ββββββββΌβββββββ βββββββΌβββββββ βββββββββββΌβββββββββββ βββββββΌβββββββ
β Audit β βOrchestratorβ β Worker β β Compliance β
β Service β β Service β β (NATS sub) β β Mapper β
βββββββββββββββ ββββββββββββββ βββββββββββββββββββββββ ββββββββββββββ
β β β β
βββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββ
β β
ββββββββΌββββββββββββββββββββΌβββββββ
β NATS β
β Message Bus β
ββββββββββββββββββββββββββββββββββββ
Service
Port
Status
Description
Identity
8081
β
Live
Organizations, users, roles, JWT auth, API keys, OIDC
Questionnaire
8082
β
Live
Upload, parse, extract questions from PDF/XLSX/DOCX
Evidence
8083
β
Live
Evidence repository with embeddings & approval workflow
Orchestrator
8084
β
Live
RAG, LLM integration (OpenAI/Claude/Local), draft generation
Audit
8085
β
Live
Event sourcing & audit trail with NATS ingestion
Export
8086
β
Live
PDF/XLSX/DOCX generation with MinIO storage
Compliance
8087
β
Live
Framework mapper (SOC2, ISO27001, NIST, PCI-DSS, HIPAA, FedRAMP)
Frontend
3000
β
Live
Next.js 15 dashboard with TypeScript
Supporting Infrastructure
Component
Technology
Purpose
Database
PostgreSQL 16 + pgvector
State persistence + vector embeddings
Messaging
NATS (JetStream)
Async event bus between services
Storage
MinIO (S3-compatible)
File/attachment storage
Observability
OpenTelemetry + Prometheus + Grafana
Distributed tracing, metrics, dashboards
Container
Docker / Docker Compose
Local development orchestration
Orchestration
Kubernetes + Kustomize
Production deployment
IaC
Terraform (AWS)
Cloud infrastructure provisioning
Category
Choice
Language
Go 1.25+
HTTP
chi/v5
Database
PostgreSQL 16 + pgx/v5 + pgvector
Migrations
goose
Validation
go-playground/validator
Auth
JWT (golang-jwt/v5) + bcrypt + OIDC/OAuth2
Messaging
NATS
Storage
MinIO (S3-compatible) via minio-go
Config
Viper + YAML + env vars
Logging
slog
Tracing
OpenTelemetry (OTLP gRPC)
Metrics
Prometheus client_golang
gRPC
google.golang.org/grpc + protobuf
Frontend
Next.js 15 + TypeScript + Tailwind CSS
Testing
testify + testcontainers-go
Docs
OpenAPI 3.0, Protocol Buffers
CI/CD
GitHub Actions
evidra/
βββ frontend/ # Next.js 15 TypeScript frontend
β βββ src/
β βββ app/ # App Router pages
β βββ components/ # Reusable UI components
β βββ contexts/ # React contexts (auth)
β βββ lib/ # API client & types
β
βββ identity/ # Identity & access management
β βββ cmd/server/ # HTTP + gRPC server
β βββ domain/ # Business entities & rules
β βββ repository/ # Data access (postgres)
β βββ service/ # Use cases & business logic
β βββ transport/ # HTTP handlers, middleware, gRPC
β
βββ questionnaire/ # Questionnaire management
β βββ cmd/server/ # API server
β βββ cmd/worker/ # Document processor (NATS sub)
β βββ domain/
β βββ events/ # NATS event definitions
β βββ parser/ # PDF/XLSX/DOCX extraction
β βββ repository/
β βββ service/
β βββ transport/
β
βββ evidence/ # Evidence repository
β βββ cmd/server/
β βββ domain/
β βββ events/
β βββ repository/
β βββ service/
β βββ transport/
β
βββ orchestrator/ # AI orchestrator (RAG + LLM)
β βββ cmd/server/
β βββ cmd/worker/
β βββ domain/
β βββ events/
β βββ repository/
β βββ service/
β βββ transport/
β
βββ audit/ # Audit trail service
β βββ cmd/server/
β βββ domain/
β βββ events/
β βββ repository/
β βββ service/
β βββ transport/
β
βββ export/ # Document export service
β βββ cmd/server/
β βββ domain/
β βββ events/
β βββ repository/
β βββ service/ # PDF/XLSX/DOCX generators
β βββ transport/
β
βββ compliance/ # Compliance framework mapper
β βββ cmd/server/
β βββ domain/
β βββ events/
β βββ repository/
β βββ service/
β βββ transport/
β
βββ pkg/ # Shared libraries
β βββ queue/ # NATS message bus abstraction
β βββ storage/ # MinIO/S3 abstraction
β βββ telemetry/ # OpenTelemetry + Prometheus
β
βββ api/ # API specifications
β βββ openapi/ # OpenAPI 3.0 specs per service
β βββ proto/ # Protocol Buffer definitions
β βββ gen/ # Generated code
β
βββ deployments/ # Production deployments
β βββ kubernetes/ # K8s manifests (16 resources)
β βββ terraform/ # AWS IaC with modules
β βββ grafana/ # Dashboard + Prometheus config
β
βββ test/ # Integration tests
β βββ integration/ # Testcontainers-based
β
βββ configs/ # Environment YAML configs
βββ migrations/ # Database migrations
βββ scripts/ # Utility scripts
βββ docs/ # Architecture & design docs
βββ docker-compose.yml # Local dev orchestration
βββ Dockerfile # Multi-stage build
βββ Makefile # Build & dev commands
Go 1.25+
Docker & Docker Compose
Node.js 20+ (for frontend)
# Clone
git clone https://github.com/MihirMohapatra/evidra.git
cd evidra
# Start dependencies (PostgreSQL Γ5, NATS, MinIO)
docker compose up -d
# Run migrations for all services
go run ./migrations
# Start backend services (in separate terminals)
go run ./identity/cmd/server
go run ./questionnaire/cmd/server
go run ./questionnaire/cmd/worker
go run ./evidence/cmd/server
go run ./orchestrator/cmd/server
go run ./audit/cmd/server
go run ./export/cmd/server
go run ./compliance/cmd/server
# Start frontend (in another terminal)
cd frontend
npm install
npm run dev
Each service reads a YAML config file. Environment variables with the EVIDRA_ prefix override config values .
# configs/dev.yaml
server :
host : " 0.0.0.0"
port : 8081
database :
url : " postgres://evidra:evidra@localhost:5432/evidra_identity?sslmode=disable"
nats :
url : " nats://localhost:4222"
go build ./... # Build all Go packages
cd frontend && npm run build # Build frontend
go test ./... # Unit tests
go test ./test/integration/... # Integration tests (requires Docker)
cd frontend && npm run lint # Frontend lint
# Run all migrations
go run ./migrations
# Or run per-service
go run ./identity/migrations
Identity Service (port 8081)
Method
Path
Description
POST
/api/v1/auth/login
Authenticate user
POST
/api/v1/auth/refresh
Refresh session token
POST
/api/v1/auth/logout
Invalidate session
GET
/api/v1/auth/oidc/providers
List OIDC providers
GET/POST
/api/v1/organizations
List/create organizations
GET/PUT/DELETE
/api/v1/organizations/{id}
Organization CRUD
GET/POST
/api/v1/users
List/create users
GET/PUT/DELETE
/api/v1/users/{id}
User CRUD
GET/POST
/api/v1/api-keys
List/create API keys
DELETE
/api/v1/api-keys/{id}
Revoke API key
Evidence Service (port 8083)
Method
Path
Description
GET/POST
/api/v1/evidence
List/create evidence
GET/PUT/DELETE
/api/v1/evidence/{id}
Evidence CRUD
POST
/api/v1/evidence/{id}/submit
Submit for review
POST
/api/v1/evidence/{id}/approve
Approve evidence
POST
/api/v1/evidence/{id}/reject
Reject evidence
POST
/api/v1/evidence/{id}/export
Mark as exported
GET
/api/v1/evidence/{id}/approvals
Approval history
Orchestrator Service (port 8084)
Method
Path
Description
POST
/api/v1/orchestrator/answer
Generate answer (RAG + LLM)
GET
/api/v1/orchestrator/drafts
List drafts
GET
/api/v1/orchestrator/drafts/{id}
Get draft
POST
/api/v1/orchestrator/drafts/{id}/approve
Approve draft
POST
/api/v1/orchestrator/drafts/{id}/reject
Reject draft
Questionnaire Service (port 8082)
Method
Path
Description
POST
/api/v1/questionnaires/upload
Upload document
GET
/api/v1/questionnaires
List questionnaires
GET/DELETE
/api/v1/questionnaires/{id}
Questionnaire detail/delete
GET
/api/v1/questionnaires/{id}/questions
Extracted questions
Audit Service (port 8085)
Method
Path
Description
POST
/api/v1/audit/events
Record audit event
GET
/api/v1/audit/events
List audit events
Export Service (port 8086)
Method
Path
Description
POST
/api/v1/exports
Export evidence (PDF/XLSX/DOCX)
GET
/api/v1/exports/{id}
Get export status/details
GET
/api/v1/exports
List exports (filter by evidence_id)
Compliance Service (port 8087)
Method
Path
Description
POST/GET
/api/v1/compliance/frameworks
Create/list frameworks
GET/DELETE
/api/v1/compliance/frameworks/{frameworkId}
Framework detail/delete
POST/GET
/api/v1/compliance/frameworks/{frameworkId}/controls
Create/list controls
POST
/api/v1/compliance/mappings
Map evidence to control
DELETE
/api/v1/compliance/mappings/{id}
Remove mapping
GET
/api/v1/compliance/mappings/by-control/{controlId}
Mappings by control
GET
/api/v1/compliance/frameworks/{frameworkId}/coverage
Coverage report
Metrics : Prometheus /metrics endpoint on every service
Tracing : OpenTelemetry OTLP gRPC exporter (configurable endpoint)
Dashboards : Grafana dashboard at deployments/grafana/dashboard.json
Scraping : Prometheus config at deployments/grafana/prometheus.yml
docker compose up -d --build
kubectl apply -k deployments/kubernetes/
cd deployments/terraform
terraform init
terraform workspace select dev
terraform apply
Architecture β Service map, communication patterns, DDD structure
Database Design β ER diagrams, indexes, migrations, pgvector
Scaling β Horizontal scalability, throughput estimates, caching
Security β JWT, API keys, OIDC/OAuth2, RBAC, audit trail
Deployment β Local dev, Docker, CI/CD, Kubernetes, Terraform
MIT