Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c8f475a
feat: add NDSEP Phase 44 full codebase
devin-ai-integration[bot] May 1, 2026
c09cb03
fix(ci): update pnpm to v10.4.1, fix Rust formatting and add serde_js…
devin-ai-integration[bot] May 1, 2026
47e641c
fix: replace hardcoded /home/ubuntu/ndsep/ paths with relative paths
devin-ai-integration[bot] May 1, 2026
3d7b5d6
feat: production-ready security, offline resilience, middleware healt…
devin-ai-integration[bot] May 1, 2026
3082b33
feat: business rules engine, workflow lifecycle, middleware integration
devin-ai-integration[bot] May 1, 2026
6259d83
fix: TypeScript errors in security modules (Map iteration, exports)
devin-ai-integration[bot] May 1, 2026
2e45956
docs: add production-ready archive manifest
devin-ai-integration[bot] May 1, 2026
e0d63c6
fix: auth middleware - parse cookies from raw header and lookup user …
devin-ai-integration[bot] May 1, 2026
0bebab9
docs: update manifest with auth fix and test results
devin-ai-integration[bot] May 1, 2026
5158afd
fix: wire orphaned routes, move catch-all to end, add Security Dashbo…
devin-ai-integration[bot] May 1, 2026
e49d962
fix: add /gov-dashboard route alias for dashboard page
devin-ai-integration[bot] May 2, 2026
7f20481
feat: categorize sidebar navigation by function + fix DPCO page consi…
devin-ai-integration[bot] May 4, 2026
1c26ee1
fix: DPCO portal dashboard stats - fix PostgreSQL enum values, column…
devin-ai-integration[bot] May 4, 2026
ca8ae9f
fix: consistent light theme across all pages + fix SelectItem crashes…
devin-ai-integration[bot] May 4, 2026
aa1193e
fix: add /audit-returns route alias for ComplianceAuditReturns
devin-ai-integration[bot] May 4, 2026
ee6636e
fix: resolve 15+ SQL column mismatches in phase12Features for correct…
devin-ai-integration[bot] May 4, 2026
bf6e18c
fix: vendor risk DPA column alias + compliance gap flatten JSONB gaps
devin-ai-integration[bot] May 4, 2026
9e2b39a
feat: middleware integration layer, crypto-safe IDs, API versioning, …
devin-ai-integration[bot] May 4, 2026
5f61a61
feat: add 243 middleware event emissions + production readiness scori…
devin-ai-integration[bot] May 4, 2026
78fb783
feat: mobile parity improvements + banking smoke test script
devin-ai-integration[bot] May 4, 2026
be4319b
chore: add middleware integration automation scripts
devin-ai-integration[bot] May 4, 2026
33a780e
feat: comprehensive seeding — banking tables, seed script, PostgreSQL…
devin-ai-integration[bot] May 4, 2026
f719402
feat: expand mobile projects to full buildable scaffolding
devin-ai-integration[bot] May 4, 2026
8738376
fix: Rust borrow checker error in offline_resilience worker
devin-ai-integration[bot] May 4, 2026
8c461ab
chore: gitignore compiled worker artifacts
devin-ai-integration[bot] May 4, 2026
51e469a
feat: comprehensive UI audit scorecard + sector seed SQL
devin-ai-integration[bot] May 6, 2026
888ed8c
fix: standardize look & feel across 65 page files
devin-ai-integration[bot] May 6, 2026
9afcbe2
fix: comprehensive look & feel audit - light theme, dark backgrounds,…
devin-ai-integration[bot] May 6, 2026
c17d557
fix: additional look & feel - replace remaining hardcoded colors in 2…
devin-ai-integration[bot] May 6, 2026
7592053
docs: comprehensive page-by-page audit report for all 135 routes
devin-ai-integration[bot] May 6, 2026
b7b196a
feat: implement encryption at rest (AES-256-GCM field-level + infrast…
devin-ai-integration[bot] May 7, 2026
176b3f9
fix: implement top 5 critical security & reliability fixes
devin-ai-integration[bot] May 7, 2026
210aadd
fix: move PII encryption from Express middleware to DB write point
devin-ai-integration[bot] May 7, 2026
531a334
feat: centralize DB URL, remove hardcoded credentials, encrypt demo u…
devin-ai-integration[bot] May 7, 2026
d6b63bc
feat: implement all remaining high/medium/enhancement recommendations
devin-ai-integration[bot] May 7, 2026
ccff580
feat: implement 52 production-readiness recommendations
devin-ai-integration[bot] May 7, 2026
9bf22fc
fix: CSRF cookie parsing (use manual parser instead of missing cookie…
devin-ai-integration[bot] May 7, 2026
0c80cf6
feat: implement 6 mandatory go-live security actions
devin-ai-integration[bot] May 7, 2026
40a6dff
fix: docker-compose duplicate YAML merge keys + security test body do…
devin-ai-integration[bot] May 7, 2026
3017df4
fix(ci): remove hardcoded DB password from config.ts + add security-e…
devin-ai-integration[bot] May 7, 2026
8bb5a8f
feat: world-class UI/UX overhaul — theming, transitions, PWA
devin-ai-integration[bot] May 7, 2026
2c2961a
feat(ui): dramatic visual modernization — gradient design system, gla…
devin-ai-integration[bot] May 7, 2026
c2ccc8c
fix: resolve 2 critical + 4 high audit findings
devin-ai-integration[bot] May 8, 2026
db18c95
fix: production readiness blockers B1-B5, B7-B8, B10-B12
devin-ai-integration[bot] May 13, 2026
1ac76eb
test: expand test coverage to 87% of server modules (B9)
devin-ai-integration[bot] May 13, 2026
2ee0814
fix: correct test assertions to match actual module exports
devin-ai-integration[bot] May 13, 2026
f0de99c
feat: wire orphan modules, add domain logic, fix disconnected features
devin-ai-integration[bot] May 14, 2026
596d40c
fix: consentAnalytics.getStats SQL uses wrong column name (consent_pu…
devin-ai-integration[bot] May 14, 2026
d55ff1b
fix: close all 7 code quality gaps
devin-ai-integration[bot] May 14, 2026
33fbb8f
feat: production-ready liveness detection system
devin-ai-integration[bot] May 16, 2026
7593649
fix: resolve mediapipe 0.10.35 API compatibility + numpy serialization
devin-ai-integration[bot] May 16, 2026
882cf18
feat: add wiredigg-rs network intelligence engine
devin-ai-integration[bot] May 23, 2026
dcd6d43
fix: add non-root USER to wiredigg Dockerfile (Semgrep SAST)
devin-ai-integration[bot] May 23, 2026
44c6d20
feat: implement all 20 next-generation enhancements end-to-end
devin-ai-integration[bot] May 23, 2026
57866c6
feat: complete NOC aggregation layer — collector, escalation, correla…
devin-ai-integration[bot] May 23, 2026
3f41920
feat: AI NOC Agent system — perception, reasoning, action engines + o…
devin-ai-integration[bot] May 23, 2026
afbfa13
feat: seed 154 tables with synthetic Nigerian regulatory data + digit…
devin-ai-integration[bot] May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
83 changes: 83 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ============================================================
# NDSEP Local Development Environment Variables
# Copy this file to .env and update values as needed.
# For production, see .env.production.example
# ============================================================

# ── Database ─────────────────────────────────────────────────
DATABASE_URL=postgresql://ndsep_user:ndsep_dev_password@localhost:5432/ndsep_db
LOCAL_DATABASE_URL=postgresql://ndsep_user:ndsep_dev_password@localhost:5432/ndsep_db
NDSEP_PG_URL=postgresql://ndsep_user:ndsep_dev_password@localhost:5432/ndsep_db
POSTGRES_PASSWORD=ndsep_dev_password

# ── Redis (optional — app degrades gracefully without it) ────
REDIS_URL=redis://localhost:6379

# ── Auth / JWT ───────────────────────────────────────────────
JWT_SECRET=dev-jwt-secret-change-me-in-production-min-32-chars
OWNER_NAME=Dev Admin

# ── Application ──────────────────────────────────────────────
NODE_ENV=development
PORT=3000
LOG_LEVEL=debug
VITE_APP_TITLE=NDSEP - Dev
ENABLE_DEMO_LOGIN=true

# ── Field-Level Encryption (AES-256-GCM) ─────────────────────
# 64-char hex string (32 bytes). Generate with:
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
FIELD_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000

# ── Stripe (test mode) ──────────────────────────────────────
STRIPE_SECRET_KEY=sk_test_placeholder
VITE_STRIPE_PUBLISHABLE_KEY=pk_test_placeholder
STRIPE_WEBHOOK_SECRET=whsec_test_placeholder

# ── Keycloak (optional for local dev) ────────────────────────
KEYCLOAK_URL=http://localhost:8080
KEYCLOAK_REALM=ndsep
KEYCLOAK_CLIENT_ID=ndsep-api
KEYCLOAK_CLIENT_SECRET=dev-client-secret

# ── APISIX (optional) ───────────────────────────────────────
APISIX_ADMIN_URL=http://localhost:9180
APISIX_ADMIN_KEY=dev-admin-key

# ── Temporal (optional) ─────────────────────────────────────
TEMPORAL_ADDRESS=localhost:7233
TEMPORAL_NAMESPACE=ndsep-dev

# ── Kafka (optional) ────────────────────────────────────────
KAFKA_BOOTSTRAP_SERVERS=localhost:9092

# ── OpenSearch (optional) ────────────────────────────────────
OPENSEARCH_URL=http://localhost:9200
OPENSEARCH_USER=admin
OPENSEARCH_PASS=admin

# ── Sector Regulator API Keys (dev placeholders) ─────────────
# These are validated at startup — dev mode shows warnings, production throws errors
NCC_API_KEY=
NHIA_API_KEY=
NERC_API_KEY=
DPR_API_KEY=
NAICOM_API_KEY=
CBN_FINTECH_API_KEY=

# ── SMS (Termii) ─────────────────────────────────────────────
TERMII_API_KEY=dev-termii-key
TERMII_SENDER_ID=NDSEP
TERMII_PHONE=+2340000000000

# ── PostgreSQL SSL (disabled for local dev) ──────────────────
DB_SSL_REJECT_UNAUTHORIZED=false

# ── CORS ─────────────────────────────────────────────────────
CORS_ORIGINS=http://localhost:3000,http://localhost:5173

# ── Webhook Signing ─────────────────────────────────────────
WEBHOOK_SIGNING_SECRET=dev-webhook-secret

# ── KMS Provider (local = no external KMS needed for dev) ────
KMS_PROVIDER=local
117 changes: 117 additions & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# ============================================================
# NDSEP Production Environment Variables
# Copy this file to .env.production and fill in real values.
# NEVER commit .env.production to version control.
# ============================================================

# ── Database ─────────────────────────────────────────────────
POSTGRES_PASSWORD=CHANGE_ME_STRONG_PASSWORD
DATABASE_URL=postgresql://ndsep_user:CHANGE_ME_STRONG_PASSWORD@postgres:5432/ndsep_db?sslmode=require
LOCAL_DATABASE_URL=postgresql://ndsep_user:CHANGE_ME_STRONG_PASSWORD@postgres:5432/ndsep_db?sslmode=require
NDSEP_PG_URL=postgresql://ndsep_user:CHANGE_ME_STRONG_PASSWORD@postgres:5432/ndsep_db?sslmode=require

# ── Redis ────────────────────────────────────────────────────
REDIS_URL=redis://:CHANGE_ME_REDIS_PASSWORD@redis:6379

# ── Auth / JWT ───────────────────────────────────────────────
JWT_SECRET=CHANGE_ME_AT_LEAST_32_CHARS_RANDOM_STRING
VITE_APP_ID=your-manus-app-id
OAUTH_SERVER_URL=https://api.manus.im
VITE_OAUTH_PORTAL_URL=https://manus.im
OWNER_OPEN_ID=your-owner-open-id
OWNER_NAME=NDPC Administrator

# ── Stripe ───────────────────────────────────────────────────
STRIPE_SECRET_KEY=sk_live_CHANGE_ME
VITE_STRIPE_PUBLISHABLE_KEY=pk_live_CHANGE_ME
STRIPE_WEBHOOK_SECRET=whsec_CHANGE_ME

# ── Application ──────────────────────────────────────────────
NODE_ENV=production
PORT=3000
LOG_LEVEL=info
VITE_APP_TITLE=NDSEP - National Data Sovereignty Enforcement Platform
VITE_APP_LOGO=https://ndsep.gov.ng/logo.png

# ── Built-in Forge API (Manus Platform) ─────────────────────
BUILT_IN_FORGE_API_URL=https://api.manus.im
BUILT_IN_FORGE_API_KEY=CHANGE_ME
VITE_FRONTEND_FORGE_API_KEY=CHANGE_ME
VITE_FRONTEND_FORGE_API_URL=https://api.manus.im

# ── Analytics ────────────────────────────────────────────────
VITE_ANALYTICS_ENDPOINT=https://analytics.ndsep.gov.ng
VITE_ANALYTICS_WEBSITE_ID=ndsep-production

# ── Worker / Scheduler ───────────────────────────────────────
WORKER_DATABASE_URL=postgresql://ndsep_user:CHANGE_ME_STRONG_PASSWORD@postgres:5432/ndsep_db?sslmode=require
WORKER_RELAY_URL=http://ndsep-api:3000/api/workers/event

# ── Middleware Services ───────────────────────────────────────
KAFKA_BOOTSTRAP_SERVERS=kafka:9092
NIFI_URL=http://nifi:8080
AIRFLOW_URL=http://airflow:8080
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318/v1/traces

# ── Temporal (Workflow Engine) ────────────────────────────────
TEMPORAL_ADDRESS=temporal:7233
TEMPORAL_NAMESPACE=ndsep

# ── Keycloak (IAM) ───────────────────────────────────────────
KEYCLOAK_URL=http://keycloak:8080
KEYCLOAK_REALM=ndsep
KEYCLOAK_CLIENT_ID=ndsep-api
KEYCLOAK_CLIENT_SECRET=CHANGE_ME

# ── Permify (Fine-Grained Authorization) ─────────────────────
PERMIFY_URL=http://permify:3476

# ── TigerBeetle (Financial Ledger) ───────────────────────────
TIGERBEETLE_ADDRESS=tigerbeetle:3001
TIGERBEETLE_CLUSTER_ID=0

# ── OpenSearch (Full-Text Search) ────────────────────────────
OPENSEARCH_URL=http://opensearch:9200
OPENSEARCH_USER=admin
OPENSEARCH_PASS=CHANGE_ME

# ── APISIX (API Gateway) ─────────────────────────────────────
APISIX_ADMIN_URL=http://apisix:9180
APISIX_ADMIN_KEY=CHANGE_ME

# ── Dapr (Sidecar Runtime) ───────────────────────────────────
DAPR_HTTP_PORT=3500
DAPR_GRPC_PORT=50001

# ── Fluvio (Stream Processing) ───────────────────────────────
FLUVIO_SC_URL=fluvio-sc:9003

# ── Mojaloop (Digital Payments) ──────────────────────────────
MOJALOOP_URL=http://mojaloop:3000

# ── OpenAppSec (WAF) ─────────────────────────────────────────
OPENAPPSEC_URL=http://openappsec:8080

# ── Lakehouse (Data Lake) ────────────────────────────────────
ICEBERG_CATALOG_URL=http://iceberg-rest:8181

# ── CORS ──────────────────────────────────────────────────────
CORS_ORIGINS=https://ndsep.nitda.gov.ng,https://app.ndsep.ng

# ── Security ─────────────────────────────────────────────────
ENABLE_DEMO_LOGIN=false

# ── Field-Level Encryption (AES-256-GCM) ─────────────────────
# Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
FIELD_ENCRYPTION_KEY=CHANGE_ME_64_CHAR_HEX_STRING

# ── PostgreSQL SSL Certificate Verification ───────────────────
# Path to CA certificate for verifying PostgreSQL server identity
DB_SSL_CA=/path/to/ca.crt
# Set to "true" (default in production) to reject self-signed certs
DB_SSL_REJECT_UNAUTHORIZED=true

# ── Volume Encryption ────────────────────────────────────────
# Paths to encrypted volumes (use LUKS/dm-crypt or cloud-managed encryption)
PG_DATA_DIR=/var/lib/ndsep/postgres-data
REDIS_DATA_DIR=/var/lib/ndsep/redis-data
43 changes: 43 additions & 0 deletions .github/branch-protection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Branch Protection Rules — NDSEP

Apply these rules in GitHub Repository Settings → Branches → Branch protection rules.

## `main` branch

| Setting | Value |
|---------|-------|
| **Require a pull request before merging** | Yes |
| Required approving reviews | **2** |
| Dismiss stale pull request approvals | Yes |
| Require review from code owners | Yes |
| **Require status checks to pass before merging** | Yes |
| Required checks: | `Node.js CI (TypeScript + Tests)` |
| | `Go CI (Build + Vet + Test)` |
| | `Security Scan` |
| | `CodeQL — JavaScript/TypeScript` |
| | `Semgrep SAST` |
| **Require branches to be up to date before merging** | Yes |
| **Require signed commits** | Recommended |
| **Require linear history** | Yes (squash merge) |
| **Include administrators** | Yes |
| **Restrict pushes** | Only deploy bots and release managers |
| **Allow force pushes** | No |
| **Allow deletions** | No |

## `develop` branch

| Setting | Value |
|---------|-------|
| Require a pull request before merging | Yes |
| Required approving reviews | **1** |
| Required status checks | `Node.js CI (TypeScript + Tests)` |
| Require branches to be up to date | Yes |

## `staging` branch

| Setting | Value |
|---------|-------|
| Require a pull request before merging | Yes |
| Required approving reviews | **1** |
| Required status checks | `Node.js CI (TypeScript + Tests)`, `Security Scan` |
| Require branches to be up to date | Yes |
Loading
Loading