How nef2le/anonix works
Anonix is a Go microservice system that pseudonymizes or anonymizes personal data through a public REST gateway. The main user flow is a client or admin panel calling the gateway, which applies authentication/RBAC and routes requests to auth, mapping, and tokenizer services; mapping and tokenizer are explicitly documented not to call each other. Mapping persists reversible token records and audit data, while tokenizer performs cryptographic operations through Vault. Additional product branches include role/kind administration, key rotation, audit access, and scheduled TTL cleanup. Edges reflect README statements and shown imports/routes; unsampled internals are represented only where documented.
Main entry points: main.go HTTP gateway · service/service.go Authentication and RBAC · service/service.go Mapping and audit · tokenizer_service.go Tokenizer client service
Components 24
Gateway and panel
- Admin panel
gateway/static/panel/app.js - HTTP gateway
gateway/cmd/main.go - Auth handlers
gateway/internal/handlers/http_handlers/auth_service_handler.go - Mapping handlers
gateway/internal/handlers/http_handlers/mapping_service_handler.go - Tokenizer handlers
gateway/internal/handlers/http_handlers/tokenizer_service_handler.go - Key rotation
gateway/internal/handlers/http_handlers/key_rotation_handler.go - Auth client service
gateway/internal/services/auth_service.go - Mapping client service
gateway/internal/services/mapping_service.go - Tokenizer client service
gateway/internal/services/tokenizer_service.go - Panel API client
gateway/static/panel/api.js - Admin views
gateway/static/panel/views
Identity and access
- Authentication and RBAC
auth_service/internal/service/service.go - Auth gRPC endpoint
auth_service/internal/transport/grpc/handler.go - Users and roles store
auth_service/internal/ports/adapters/storage/postgres.go - Token cache
auth_service/internal/ports/adapters/cache/redis.go
Token data services
- Mapping and audit
mapping/internal/service/service.go - Mapping gRPC endpoint
mapping/internal/transport/grpc/handler.go - Mapping database
mapping/internal/ports/adapters/storage/postgres.go - Mapping cache
mapping/internal/ports/adapters/cache/redis.go
Cryptography and cleanup
- Token algorithms
tokenizer/internal/service/service.go - Tokenizer gRPC endpoint
tokenizer/internal/transport/grpc/handler.go - TTL cleaner
mapping_cleaner/internal/service/service.go
Other components
- API client
- HashiCorp Vault
Connections 26
- API client → HTTP gateway: calls REST
gateway/cmd/main.go - Admin panel → Panel API client: uses API
gateway/static/panel/app.js - Panel API client → HTTP gateway: calls REST
gateway/static/panel/api.js - HTTP gateway → Auth handlers: routes auth
gateway/cmd/main.go - HTTP gateway → Mapping handlers: routes data
gateway/cmd/main.go - HTTP gateway → Tokenizer handlers: routes tokens
gateway/cmd/main.go - HTTP gateway → Key rotation: routes rotation
gateway/cmd/main.go - HTTP gateway → Admin views: serves panel
gateway/cmd/main.go - Admin views → Panel API client: requests data
gateway/static/panel/app.js - Auth handlers → Auth client service: calls service
gateway/internal/handlers/http_handlers/auth_service_handler.go - Mapping handlers → Mapping client service: calls service
gateway/internal/handlers/http_handlers/mapping_service_handler.go - Tokenizer handlers → Tokenizer client service: calls service
gateway/internal/handlers/http_handlers/tokenizer_service_handler.go - Key rotation → Tokenizer client service: rotates keys
- Auth client service → Auth gRPC endpoint: gRPC request
- Mapping client service → Mapping gRPC endpoint: gRPC request
- Tokenizer client service → Tokenizer gRPC endpoint: gRPC request
- Auth gRPC endpoint → Authentication and RBAC: dispatches
auth_service/internal/transport/grpc/handler.go - Authentication and RBAC → Users and roles store: reads and writes
- Authentication and RBAC → Token cache: caches tokens
- Mapping gRPC endpoint → Mapping and audit: dispatches
mapping/internal/transport/grpc/handler.go - Mapping and audit → Mapping database: reads and writes
- Mapping and audit → Mapping cache: reads and writes
- Tokenizer gRPC endpoint → Token algorithms: dispatches
tokenizer/internal/transport/grpc/handler.go - Token algorithms → HashiCorp Vault: uses Transit
- TTL cleaner → Mapping database: deletes expired
- TTL cleaner → Mapping cache: deletes expired