Commit Graph

17 Commits

Author SHA1 Message Date
fbd53f821f Merge branch 'main' of https://git.gabens.lol/thatnewyorker/employee-tracking-backend 2025-08-20 21:14:24 -04:00
f6d0d9b5ec Update MongoDB URI to use Docker hostname 2025-08-20 21:14:23 -04:00
d3feeef996 Rename employee-tracking-backend to purenotify_backend and add OFFLINE
mode

- Rename crate and update dependencies to newer versions - Add OFFLINE
runtime mode for loopback-only server without DB - Refactor state
handling with typed Axum routers and state injection - Rename mongodb
module to mongo and fix imports accordingly - Update Cargo.lock with
updated and removed dependencies - Remove no-auth feature and related
code - Simplify health and user routes to generic state parameter Rename
backend to purenotify_backend and add OFFLINE mode

Use OFFLINE env var to run server without DB, binding to loopback only.
Rename mongodb module to mongo and update dependencies. Update
dependencies and fix router state handling.
2025-08-20 20:53:22 -04:00
e79d16b87f implement Password utils 2025-08-17 17:07:07 -04:00
73e4701daa implement MongoDB user 2025-08-17 16:39:56 -04:00
26832acc31 implement MongoDB user repository with async support 2025-08-17 16:36:07 -04:00
f004dcf0c9 dockercompose file fix 2025-08-16 07:00:42 -04:00
5919966954 Add user registration endpoint 2025-08-16 06:56:21 -04:00
ed612bd717 feat: add MongoDB support with connection pooling and repository pattern 2025-08-16 06:38:30 -04:00
8a05f4edac add user endpoint 2025-08-15 18:38:57 -04:00
34a6f211de small fix 2025-08-15 18:09:09 -04:00
611301dfda Add a better structure in the project 2025-08-15 18:02:30 -04:00
985443ca91 docs: Add documentation for Crypto and JWT modules
This commit adds detailed documentation for the  and  modules.

The new markdown files ( and ) provide a comprehensive overview of each module's functionality, including:
- Dependencies and setup.
- Error handling strategies.
- Detailed descriptions of structs and functions.
- Practical usage examples for key operations.
2025-08-15 17:09:25 -04:00
29dbca70c4 feat: Implement Crypto and JWT utility modules in Rust
This commit introduces a Rust implementation of the cryptographic and JWT handling utilities, translated from the original TypeScript codebase.

The new `CryptoUtils` module provides core cryptographic functionalities, including:
- AES-256-CBC encryption and decryption.
- Generation, saving, and loading of RSA-4096 key pairs.
- It leverages the `openssl`, `sha2`, and `hex` crates.

The new `JWTUtils` module handles JSON Web Tokens manually, without relying on the `jsonwebtoken` crate. Its features include:
- Creating and signing JWTs using RSA-SHA256.
- Verifying the signature and expiration of tokens.
- Decoding tokens and validating claims.
- This implementation uses the `openssl` crate for signing and verification, ensuring alignment with the `CryptoUtils` module.

Additionally, minor compiler warnings, such as unused imports in `main.rs` and `config.rs`, have been resolved.
2025-08-15 17:03:23 -04:00
3d7da03bcf Initialize project with basic backend setup 2025-08-15 16:30:26 -04:00
96b30b90cb first commit 2025-08-14 12:09:17 -04:00
3dc6c86c3b Initialize project with basic backend setup 2025-08-14 11:56:32 -04:00