Secure, event-driven file sharing platform built with Go microservices, React, and Kafka.
Gokusan is a self-hosted file sharing platform where every uploaded file is automatically sanitized via Dangerzone before it becomes available for download or sharing. The system is fully event-driven: services communicate through Kafka and never call each other directly for write operations.
| Layer | Technology |
|---|---|
| Frontend | React, TypeScript, Vite |
| Gateway | Kong |
| Services | Go 1.23+, Gin |
| Auth | Keycloak, JWT, HttpOnly cookies |
| Storage | MinIO (S3-compatible) |
| Database | PostgreSQL 15 |
| Messaging | Apache Kafka |
| Cache | Redis 7 |
| Containers | Docker, Docker Compose |
Prerequisites: Docker and Docker Compose
docker compose up --build| Service | URL | Access |
|---|---|---|
| Client | http://localhost:5173 | public |
| Gateway | http://localhost:8000 | public |
| Kong Admin | http://localhost:8001 | public |
| MinIO API | http://localhost:9000 | public |
| MinIO Console | http://localhost:9001 | public |
| Keycloak | http://localhost:8080 | public |
| Auth Service | http://auth:8080 | internal |
| Upload Service | http://upload:6565 | internal |
| Download Service | http://download:8012 | internal |
| Metadata Service | http://metadata:8013 | internal |
| Share Service | http://share:8014 | internal |
| PostgreSQL | postgres:5432 | internal |
| Redis | redis:6379 | internal |
| Kafka | kafka:9092 | internal |
For the full system design, service breakdown, request flow diagrams, database schema, and API reference see ARCHITECTURE.md.
.
├── client/ # React SPA (Vite)
├── gateway/ # Kong configuration
├── services/
│ ├── auth/ # Auth service (Gin): login, register, validate
│ ├── upload/ # Upload service (Gin): multipart to MinIO + Kafka
│ ├── download/ # Download service (Gin): stream from MinIO
│ ├── metadata/ # Metadata service (Gin): owns PostgreSQL files table
│ ├── share/ # Share service (Gin): time-limited share links via Redis
│ ├── sanitization/ # Sanitization worker: Kafka consumer, runs Dangerzone
│ └── cleanup/ # Cleanup worker: cron job, purges deleted/quarantined files
├── infrastructure/
│ └── keycloak/ # Keycloak Docker Compose and realm config
└── docker-compose.yaml
MIT