api21 Standalone API Engine
Welcome to the interactive documentation for api21. This server is a modular, high-concurrency REST API engine built in Go with Gin, GORM, PostgreSQL, and Redis.
Core Highlights
- Clean Layered Architecture: Strict separation of concerns across Delivery (HTTP), Domain / Use Cases, and Infrastructure (Database/Cache).
- High Performance: Built with Go and the Gin Web Framework.
- Resilient Security: Token-based admin sessions with SHA-256 token hashing and rate limiting via Redis.
- Embedded WebTerminal: Interactive browser terminal streamed over WebSocket directly into a pseudo-terminal (PTY) shell process.
- Docker First: Full containerized development and deployment workflows.
Quick Start
1. Prerequisites
- Docker & Docker Compose or Go 1.25+
- PostgreSQL 16+
- Redis / Valkey 7+
2. Environment Setup
cp .env.example .env
3. Run with Docker Compose
docker compose up -d
4. Verify Server Health
curl -s http://localhost:8080/api/v1/health