Skip to content

desijuan/ttcloud

Repository files navigation

ttCloud

A clock-in/out application.

Overview

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.

Build and Execution

The project requires the Rust toolchain and standard build utilities for compiling bundled C dependencies (SQLCipher).

Using Cargo

To build the project in debug mode:

cargo build

To run the application:

cargo run

Using Make

A 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

Configuration

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.

Technical Stack

Core Dependencies

  • 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.

Architectural Decisions

  • 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.

About

A clock-in/out application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors