Skip to content

Repository files navigation

Tyk Console

A management console for Tyk Gateway OSS — persistent storage, self-managed state, China Cybersecurity Level-3 compliance, and healthcare data exchange built-in.

Tyk Gateway OSS 管理控制台 — 弥补社区版缺少持久化存储与自管状态的短板,内置等保三级安全合规与医疗数据共享能力。


LicenseVersion

⚠️This project is under active development (v0.9.0). Not yet recommended for production use. ⚠️UI is currently Chinese-only. i18n support is tracked as a good first issue.


Screenshots

Coming soon.


Why Tyk Console?

Tyk Gateway OSS is a powerful API gateway, but its community edition has notable gaps:

LimitationHow Tyk Console solves it
No persistent storage — API definitions live only in RedisPostgreSQL as source of truth; all API/Key definitions survive restarts
No built-in RBAC — single admin userThree-role separation (system admin / security admin / audit admin), JWT auth, row-level security
No audit trail — who changed what and when?Full operation audit logging with HMAC integrity verification
No security complianceImplements China Cybersecurity Level-3 (等保 2.0 三级) requirements out of the box
No API lifecycle managementActivate / deactivate / archive / re-sync APIs with a click
No healthcare-specific toolingBuilt-in validation engine, 5 medical business domains (LAB/IMG/PATH/ECG/CSSD), interface contract management

Features

Gateway Management

  • API Definitions — Full CRUD, batch operations (activate/deactivate/delete), one-click register from interface catalog, sync status tracking
  • Key Management — Create/edit/revoke keys, rate limits, quotas, expiry, per-API access rights
  • Gateway Monitor — Container health, start/stop/restart, hot reload

Security & Compliance (等保 2.0 三级)

  • Three-Role Separation (三员分立) — System Admin / Security Admin / Audit Admin
  • Row-Level Security — PostgREST + PostgreSQL RLS enforces data isolation
  • Audit Logging — HMAC-signed immutable audit trail, searchable by user/module/time range
  • Password Policy — Configurable complexity, expiration, and session timeout

Healthcare Data Exchange

  • 5 Business Domains — Laboratory (LAB), Medical Imaging (IMG), Pathology (PATH), ECG, Central Sterile Supply (CSSD)
  • Validation Engine — Chain-of-responsibility: Regex → Domain → Cross-Field validation
  • Interface Contract Management — Interface ID catalog (LAB-DEMO-MD-O001), field-level metadata, test data generation

Developer Experience

  • PostgREST Bridge — Auto-generated REST APIs from PostgreSQL schemas
  • One-command Startdocker compose up spins up the entire stack
  • Test Data Generator — Python scripts for full-column test coverage across 22 lab tables

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 20+
  • Tyk Gateway OSS (v5.12+)

1. Clone & Configure

git clone https://github.com/EarthGraduates/tyk-console.git
cd tyk-console
cp .env.example .env
# Edit .env with your settings (defaults work for local dev)

2. Start Infrastructure

# PostgreSQL + PostgREST + Redis
docker compose up -d

3. Start Frontend

npm install
npm run dev # → http://localhost:5173

4. Default Accounts

EmailPasswordRole
dev_admin@ichse.localTest1234!System Admin
dev_sec@ichse.localTest1234!Security Admin
dev_audit@ichse.localTest1234!Audit Admin

⚠️Development defaults only. Change passwords immediately for any non-local deployment.


Architecture

Browser (localhost:5173)
├── /tyk/* → Tyk Gateway (localhost:8080) ← API/Key CRUD
├── /hello → Tyk Gateway ← Health check
└── /db/* → PostgREST (localhost:3001) ← Database REST API
└── PostgreSQL (localhost:5433)
┌──────────────────────────────────┐
│ Tyk Gateway (:8080) │
│ API routing, keyless passthrough│
└──────────────┬───────────────────┘
│
┌──────────────▼───────────────────┐
│ Python FastAPI Services (:8000) │
│ Validation Engine + Router │
└──────┬────────────┬─────────────┘
│ │
┌──────────────▼──┐ ┌──────▼──────────────┐
│ PostgREST (:3001)│ │ PG Functions (ichse)│
│ Table CRUD │ │ Complex transactions│
└────────┬─────────┘ └──────┬──────────────┘
│ │
┌────────▼───────────────────▼──────────┐
│ PostgreSQL (:5433) │
│ ┌──────────┐ ┌────────────────────┐ │
│ │ ichse │ │ biz │ │
│ │ 管理数据 │ │ 业务数据 (lab/img/…) │ │
│ └──────────┘ └────────────────────┘ │
└────────────────────────────────────────┘
┌──────────┐
│ Redis │ Rule cache + log queue
└──────────┘

Tech Stack

ComponentVersionPurpose
Refine + Ant Designv6Frontend framework (Data + Auth providers)
Reactv19UI runtime
TypeScriptv5.8Type system
Vitev6.3Build tool
Tyk Gateway OSSv5.12API Gateway (managed target)
PostgreSQLv17Source of truth
PostgRESTv14DB → REST API bridge
Redisv7Rule cache + async log queue
Python FastAPIValidation engine services
Docker ComposeLocal dev environment

Documentation

DocumentDescription
CONTEXT.mdDomain glossary and terminology
docs/architecture.mdSystem architecture overview
docs/conventions.mdCoding conventions (naming, DB schema, API registration)
docs/security.mdSecurity compliance design (等保 2.0 三级)
docs/adr/Architectural Decision Records

Contributing

See CONTRIBUTING.md for development setup, commit conventions, and PR guidelines.

We follow Conventional Commits (feat / fix / docs / chore).

UI is currently Chinese-only. We welcome contributions for i18n internationalization!


License

Apache 2.0 © 2026 EarthGraduates

About

A management console for Tyk Gateway OSS with persistent storage, China Cybersecurity Level-3 compliance (等保三级), and healthcare data exchange. Tyk OSS 管理控制台 — 持久化存储 + 等保三级安全 + 医疗数据共享。

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages