Skip to content

Gerege POS

Production · Layer 4 — vertical product · Repo: gerege-pos-mn · geregepos.mn

Verified identity and digital signing at the point of sale. At the counter the customer is identified from their electronic ID on the spot, and contracts, consents and transactions are sealed with a legally valid signature.

Ownership

The platform is owned and operated by Gerege POS LLC. Its technical foundation is open-gerege-core, the versioned shared Go module from Gerege Systems, which supplies the authentication, security, AI and service layers.

What it solves

A traditional POS records what was sold but cannot prove who bought it. Age-restricted goods, contracted services, credit, insurance, registered SIM cards — all of these need a real identification act at the counter. Gerege POS closes that gap:

Question Answer
Who is standing here? eID identification — QR / App2App / push by national ID
Did they consent? PAdES digital signature (eID Mongolia /v3)
On behalf of a company? eID PKI profile — organisations and authorised signers
Can they deny it later? Hash-chained, append-only audit log

Core capabilities

  • eID + Gerege SSO


    eID is the only way in. No passwords. It is also a relying party of Gerege SSO.

  • An OIDC provider in its own right


    With OAUTH_ISSUER configured the platform becomes an identity provider itself and signs in downstream apps (own Go code, no Hydra).

  • Digital signing


    PAdES signatures on PDF; the sign relay lets third-party RPs obtain signatures through the platform's eID credentials.

  • Admin-driven gateway


    Service catalogue, per-app svc:* grants, request telemetry.

  • Citizen service portal


    Applications, references, notifications, payments, appointments plus the officer queue (CPSV-AP vocabulary, SLA-aware state machine).

  • AI assistant (Gemini)


    Chat, speech-to-text, text-to-speech, live translation. Knowledge base with pgvector semantic search.

Also: RBAC and super admin (TOTP MFA), organisations and membership, the unified service registry (once-only monitoring), cross-platform relay, Google Drive · Dropbox · Google Meet integrations, its own SFTP storage (Gerege Space), and a four-language UI (mn · en · zh · ru).

Where it sits in the ecosystem

flowchart TD
    EID[eID Mongolia<br/>Layer 1] --> SSO[Gerege SSO<br/>Layer 2]
    SSO -->|OIDC RP| POS[Gerege POS<br/>Layer 4]
    SSO -->|eID proxy · sign relay| POS
    CORE[(open-gerege-core<br/>Layer 3)] -.shared module.-> POS
  • It never talks to eID directly. Permitted eID services arrive through the SSO eID proxy (/rp/eid, /rp/eid-org) and the sign relay (/rp/sign).
  • The client secret lives on SSO. The gerege-pos-mn client is registered on sso.gerege.mn, where the secret exists only as a hash.
  • The foundation is shared. The backend is a reference deployment of open-gerege-core with no routes of its own, so a security patch propagates from a single point.

Technology

Layer Choice
Backend Go 1.26 · chi (net/http) · pgx (no ORM, hand-written SQL)
Data PostgreSQL 16 + pgvector · Redis 7
Frontend Next.js 15 (BFF) · React 19 · TanStack Query
AI Gemini REST (SDK-free) — chat · STT · TTS · translation
Observability OpenTelemetry · Prometheus · Zap
Deployment Docker Compose behind edge nginx, geregepos.mn

More on the Technology stack.

Security foundations

  • Postgres Row-Level Security — the api connects as a non-superuser role, and a boot guard enforces that.
  • BFF model — tokens live in httpOnly cookies and never reach browser JS; CSRF is defended twice (custom header + origin check).
  • Fail-closed features — without credentials a capability switches off rather than pretending to work.
  • Hash-chained audit/api/v1/audit/verify checks chain integrity and points at the first broken row.

The ecosystem-wide requirements are on Security.

Full documentation

Implementation-level documentation — capability map, endpoint reference, deployment runbook — lives on its own site:

Gerege POS docs →

Page About
Capability map Every module, permission, rate limit and enabling condition
App integration (OIDC RP) Steps to sign your own app in
eID Service Proxy Fetching eID data through the proxy
API reference Every endpoint in one table
Deployment Compose, env, nginx, rollback