A clock-in/out application.
ttCloud provides a system for employees to record their work sessions. The application manages user authentication, session tracking (clock-in/out), and provides a web interface for both users and supervisors.
The backend exposes a REST API for session management and serves static assets for the frontend. Authentication is handled via JWTs issued upon login and stored in HTTP-only cookies.
The project requires the Rust toolchain and standard build utilities for compiling bundled C dependencies (SQLCipher).
To build the project in debug mode:
cargo buildTo run the application:
cargo runA Makefile is provided for convenience:
- Run (default): Builds in release mode and executes the binary.
make
- Release: Builds the optimized binary.
make release
- Debug: Standard cargo build.
make debug
- Clean: Removes build artifacts and lock files.
make clean
The application is configured via environment variables:
PORT: Server port (default: 3000).JWT_SECRET_KEY: Secret for signing tokens.DB_PASSPHR: Passphrase for SQLCipher database encryption.
- axum: Web framework for the REST API and static file serving.
- tokio: Asynchronous runtime.
- rusqlite (bundled-sqlcipher): Interface for SQLite3 with full database encryption.
- argon2: Password hashing using the Argon2id variant.
- jsonwebtoken: Implementation of JWT for stateless authentication.
- serde: Serialization/deserialization framework.
- Database Encryption: SQLCipher is used to ensure data at rest is encrypted, requiring a passphrase at initialization.
- Security: Argon2 provides robust protection against GPU-based cracking attacks. JWTs are used to maintain session state without server-side storage.