Skip to main content

Platform Architecture

Tech Stack

LayerTechnologyVersion
RuntimeNode.js20 LTS
LanguageTypeScript5.x
HTTP FrameworkFastify4.x
ORMPrisma5.x
DatabasePostgreSQL16 (AWS RDS)
Auth@fastify/jwt (HS256)
Rate Limiting@fastify/rate-limit1000 req / 15 min
CORS@fastify/cors
API Docs@fastify/swagger v8 + @fastify/swagger-ui v4Fastify 4–compatible
ValidationZod3.x
Process Managersystemdcreovine-api.service
Reverse ProxynginxLatest
SSLLet's Encrypt / certbotAuto-renews
Swagger Version Pinning

@fastify/swagger@9 and @fastify/swagger-ui@5 require Fastify 5. This repo uses Fastify 4 — always pin to @fastify/swagger@8 and @fastify/swagger-ui@4.

Route Architecture

https://api.creovine.com

├── GET / # Root — lists products
├── GET /health # Health check
├── GET /docs # Swagger UI

├── /v1 (Platform)
│ ├── /auth # Platform user auth
│ ├── /platform/admin # Admin management + CMS admin
│ ├── /products # Public product catalog
│ └── /cms # Public CMS content

├── /cvault/v1 (CVault VPN)
│ ├── /auth # CVault user auth
│ ├── /devices # Device management
│ ├── /vpn # VPN session management
│ └── /licenses # License management

└── /lira/v1 (Lira AI)
├── /meetings # Meeting session CRUD + AI summary
├── /bot # Bot deployment + management
├── /orgs # Organizations, KB, documents, tasks
├── /integrations # 9 OAuth providers
├── /email # Email config + inbound reply engine
├── /usage # Usage tracking & quotas
├── /webhooks/inbound # External webhooks
└── /ws # WebSocket (legacy text mode)

Database Models

Core Entities

ModelDescription
TenantBusiness customer (apiKey, status, limits, whitelabelConfig)
TenantUserEnd user (email, role, googleId, passwordHash)
ProductPlatform product catalog (slug, type, status, features, plans)
LicenseProduct license (key, plan, maxUses, expiresAt)

CVault Entities

ModelDescription
DeviceWireGuard device (publicKey, assignedIp, status)
SessionActive VPN connection (connectedAt, disconnectedAt)
ServerWireGuard server (region, publicIp, capacity)

CMS & Analytics

ModelDescription
HomepageSlotCMS sections (HERO_SLIDE, FEATURED_BANNER, LOGO_STRIP, etc.)
ContentBlockGeneric key/value page content
MediaAssetUploaded media library
AnalyticsEventRaw event log (product views, SDK downloads)
AnalyticsSummaryDaily aggregated metrics
UsageMetricPer-tenant daily bandwidth/connection usage

Lira AI Entities (DynamoDB)

TableKey StructureContains
lira-meetingsPK: USER#<userId>Meeting sessions, transcripts, settings
lira-connectionsWebSocket connection tracking
lira-organizationsPK: ORG#<orgId>, SK: <type>#<id>Orgs, members, KB entries, docs, tasks, email config
lira-interviewsPK: ORG#<orgId>, SK: INT#<id>Interviews, questions, evaluations