Skip to content

Intelektika Portal v2.0 — System Architecture & Overview ​

1. Executive Summary ​

Intelektika Portal v2.0 is a centralized license management authority, school server code allocation hub, and semi-offline synchronization platform built to meet ANBK / TKA Puspendik Kemendikdasmen RI examination standards. Architected using Golang 1.23+ Clean Architecture, MongoDB 6.0+, and a React 19 + Tailwind CSS frontend, the portal enables air-gapped DRM license generation signed with RSA-4096 cryptography, real-time lab server health monitoring, and tamper-evident assessment data syncing.


2. High-Level Architecture Diagram ​

The portal is packaged as a Single Static Binary, where compiled React SPA assets are embedded directly into the Golang executable using the //go:embed compiler directive.

mermaid
flowchart TD
    subgraph ClientLayer ["1. Client & School Lab Layer"]
        Browser["React 19 SPA Admin Dashboard"]
        CBTServer["School Lab CBT Server (Air-Gapped)"]
    end

    subgraph EdgeLayer ["2. Reverse Proxy & Edge Security"]
        WebServer["Reverse Proxy Web Server (HTTPS)"]
    end

    subgraph BackendLayer ["3. Core Application Service (Golang Clean Architecture)"]
        Router["HTTP Router Engine (Chi / Net/HTTP)"]
        JWTMiddleware["JWT Authorization Middleware"]
        
        subgraph UseCases ["Domain Use Cases"]
            AuthUC["Auth Use Case"]
            LicenseUC["License DRM Use Case"]
            SyncUC["Sync Engine Use Case"]
            SchoolUC["School Management Use Case"]
        end

        DRMSigner["DRM Cryptographic Engine (RSA-4096)"]
    end

    subgraph DatabaseLayer ["4. Persistence & Security Layer"]
        MongoRepo["MongoDB Repository Provider"]
        MongoDB[(MongoDB 6.0 Database)]
        KeyStore["RSA Private/Public Keys (.pem)"]
    end

    Browser -->|HTTPS REST API| WebServer
    CBTServer -->|Sync Protocol| WebServer
    WebServer --> Router
    Router --> JWTMiddleware
    JWTMiddleware --> UseCases

    LicenseUC --> DRMSigner
    DRMSigner --> KeyStore

    UseCases --> MongoRepo
    MongoRepo --> MongoDB

3. Technology Stack & Runtime Matrix ​

SubsystemTechnologyVersionTechnical Responsibility
Backend RuntimeGolang1.23+High-performance API server with low memory footprint
Database EngineMongoDB6.0+NoSQL document store for schools, licenses, and sync audit logs
Frontend FrameworkReact19.xInteractive client dashboard for proctor management and licensing
Styling FrameworkTailwind CSS3.4+Utility-first CSS engine for responsive dashboard interfaces
DRM CryptographyRSA / PKCS#1 v1.5RSA-4096Digital signature generation binding licenses to hardware IDs
Binary PackagingGo EmbedStandard LibraryEmbeds static frontend assets into single executable binary
Data ExchangeJSON & Base64RFC 8259Standard payload format for license tokens and REST API communication

4. Repository Anatomy ​

text
Intelektika-Portal/
├── cmd/
│   └── server/
│       └── main.go                 # Application main entry point
├── internal/
│   ├── config/                     # Environment loader & config struct
│   ├── delivery/
│   │   └── http/                   # HTTP Handlers, Routers & JWT Middleware
│   ├── domain/                     # Entity definitions & repository interfaces
│   ├── pkg/
│   │   └── drm/                    # RSA-4096 DRM signature engine
│   ├── repository/
│   │   └── mongo/                  # MongoDB query implementations
│   └── usecase/                    # Domain business logic modules
├── keys/                           # RSA-4096 keypair (.pem files) for DRM signing
├── web/                            # React 19 Frontend source code
│   ├── src/                        # UI components, dashboard views & API clients
│   └── dist/                       # Vite compiled static output
├── embedded.go                     # //go:embed directive for binary embedding
├── Dockerfile                      # Multi-stage production container build spec
└── docker-compose.yml              # Service orchestration for Portal & MongoDB