A command-line login system with registration, password login, and optional
two-factor authentication using TOTP codes that work with Google
Authenticator. Passwords are hashed with bcrypt (cost 12). After 5 failed
attempts an account is locked for 15 minutes. Sessions expire after a timeout
set by the SESSION_TIMEOUT environment variable.
It runs as two containers with Docker Compose: the app, and MySQL with a persistent volume. The database schema is a SQL file embedded in the compiled binary and applied at startup.
The interface is an interactive prompt with command history and tab-completion. The CLI, the auth service and the data access layer each depend only on an interface of the layer below, not on its concrete type.