Skip to content

Gerege App

Everyday citizen services in one appeID-based · AI-enabled

Gerege App is a platform where every citizen is identified by their national electronic ID (eID) and gets their everyday services in one place: obtaining certificates, signing contracts, making payments, managing their organisation — without juggling multiple apps, passwords and queues.

This documentation explains every capability of the platform, verified against the source: which module each endpoint, permission and flow comes from.

  • eID sign-in
    The only way in is the national eID — QR, App2App deep link, or a push to the registered device by national ID. No passwords, no e-mail OTP.

  • OIDC provider
    The platform can be its own OpenID Connect issuer — /oauth2/auth, /oauth2/token, /userinfo, JWKS, authorization code flow with PKCE.

  • Government services
    Full cycle: catalogue → application → officer queue → decision → certificate, payment and appointment.

  • AI assistant
    Gemini-backed function-calling chat, voice (STT/TTS), live translation and a pgvector knowledge base.

  • Document signing
    PAdES PDF signatures via eID Mongolia /v3; a sign relay for third-party apps.

  • Security
    Postgres RLS, hash-chained audit, CSP/HSTS/COOP, per-IP rate limits, BFF token isolation.

Where it sits

Gerege App sits in the vertical product layer of the Gerege ecosystem. Its technical foundation is the versioned shared Go module platform-core, from which it inherits identity, RBAC, AI and the security baseline. That means security patches propagate from one place to every product.

graph TD
  A["eID Mongolia — PKI core"] --> B["Gerege SSO · sso.gerege.mn"]
  B --> C["platform-core — shared foundation"]
  C --> D["Gerege App · geregeapp.mn"]
  C --> E["Other ecosystem apps"]
Domain Role
geregeapp.mn Gerege App — the citizen-facing services app (this documentation)
sso.gerege.mn Gerege SSO — the ecosystem OIDC provider and eID relying party
docs.gerege.mn Unified technical documentation for the ecosystem

Repository and ownership

The platform is owned and operated by Gerege App LLC. Code: gerege-systems/gerege-app-mn. The backend is a thin app over platform-core (backend/cmd/api/main.go is ~30 lines); the frontend is a full Next.js BFF.

Technology

Layer Choice Why
Backend Go 1.26 · chi (net/http) · pgx v5 No ORM, hand-written SQL — every query is visible
Data PostgreSQL 16 + pgvector · Redis 7 Row-level isolation via RLS; vector search
Frontend Next.js 15 (App Router) · TanStack Query BFF — tokens never reach browser JS
AI Gemini REST (no SDK) Few dependencies, full control over function calling
Observability OpenTelemetry · Prometheus · Zap Traces, metrics and structured logs

Where to start