Octa is a high-performance avatar and asset service built with Go and SQLite. It generates deterministic avatars, stores uploads, and serves everything from a single binary.
Handling user identities shouldn't require complex object storage infrastructure. Octa is the specialized alternative.
Research shows SQLite reads small blobs (like avatars) 35% faster than the filesystem. Octa leverages WAL mode for high-performance I/O.
Stop managing IAM roles and egress fees for 50KB files. Octa replaces complex object storage with a simple, portable architecture.
No external dependencies. No Redis required. The database, the cache, and the server are all compiled into one lightweight executable.
Test the deterministic generation engine in real-time.
http://localhost:9980.
Octa is designed to be "Zero-Config" by default, but highly tunable via `config.yaml`. Every setting can also be overridden using environment variables (e.g., `OCTA_DATABASE_MAX_SIZE`), making it cloud-native ready.
Define the SQLite database path. Use `max_size` (e.g., "5GB") to enable auto-pruning. Octa will automatically delete the oldest assets when this threshold is reached, keeping disk usage predictable.
`upload_secret` is mandatory for write operations. The built-in `rate_limit` uses a token bucket algorithm to protect public read endpoints from abuse (DDoS) without affecting legitimate users.
Enable the embedded `consoleui` to visualize your asset library, monitor system health, and manually upload files via a web interface.
app:
name: "Octa"
version: "0.0.1"
base_url: "https://0.0.0.0:9980"
server:
port: 9980
env: "production" # development | production
database:
path: "./data/octa.db"
# Soft limit for auto-cleanup
max_size: "5GB"
# How often to check size
prune_interval: "10m"
image:
# Base size for generated avatars
default_size: 360
# Reject uploads larger than this
max_upload_size: "10MB"
# Quality: Compression level for image output (1-100)
quality: 80
# MaxKeyLimit: Maximum number of aliases allowed for a single asset mapping (e.g., 7)
max_key_limit: 7
cache:
enabled: true
max_capacity: 100 # MB
ttl: "30m"
security:
# REQUIRED for /upload endpoint
upload_secret: "YOUR_SECRET_KEY_HERE" # or use env
cors_origins:
- "http://localhost:9980" # accept only main
- "https://**.example.com" # accept main and subdomains
- "https://*.example2.com" # accept only subdomains
rate_limit:
enabled: true
requests: 50 # Req/sec per IP
burst: 100 # Allow traffic spikes
window: "1s"
consoleui:
enabled: true # Access via http://localhost:9980/console
user:
username: "admin"
password: "change_me" # Or use env var
Simple endpoints to integrate Octa into your backend.
Generates a deterministic avatar based on the seed (username, email, or uuid). Supports various formats and themes via query parameters.
| Param | Type | Description |
|---|---|---|
| theme | string |
style/palette (e.g. gradient/retro)
|
| size | int | Output width in pixels (Default: 360) |
| rounded | bool | Apply circular mask (100 or 0) |
| format | string |
Output format: png or svg
|
# Generate a gradient avatar
curl "{{.BaseURL}}/avatar/onur?theme=gradient/pro"
# Force SVG format
curl "{{.BaseURL}}/avatar/octa?format=svg"
Uploads a static asset to the SQLite Blob store. Requires the
X-Secret-Key header defined in your config.
curl -X POST {{.BaseURL}}/upload \
-H "X-Secret-Key: YOUR_SECRET" \
-F "file=@profile.jpg" \
-F "keys=user-123,my-profile"