You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Architectural Overview
6
+
7
+
The codebase appears to be a Rust project, heavily focused on network communication, security, storage, and tokenization, suggesting an application that handles data processing, potentially involving encryption or large data structures (indicated by `zstd` dependencies).
8
+
9
+
**Major Components & Interactions:**
10
+
11
+
1.**Network Layer (`src/network/`)**:
12
+
*`broadcaster.rs` and `mod.rs` suggest a component responsible for broadcasting information across the system. This likely interfaces with other layers to disseminate data or state updates.
13
+
2.**Security Layer (`src/security/`)**:
14
+
*`authentication.rs` and `mod.rs` handle user or service authentication/authorization. This layer is critical for securing interactions with storage and network components. It interacts heavily with encryption mechanisms.
15
+
3.**Storage Layer (`src/storage/`)**:
16
+
* This is the data persistence core, featuring several modules:
17
+
*`persistance.rs`: Likely handles the primary read/write operations for application data.
18
+
*`engine.rs`: Suggests a core logic engine for data manipulation or state management within storage.
19
+
*`subscription.rs`: Implies features related to managing subscriptions or access control over stored data.
20
+
*`snapshoting.rs`: Points to functionality for creating snapshots of the storage state, crucial for backup or versioning.
21
+
*`statistics.rs`: Suggests metrics collection related to storage operations.
22
+
*`admin.*` (`admin.html`, `admin.rs`): Indicates an administrative interface or endpoint is present.
23
+
4.**Tokenizer Layer (`src/tokenizer/`)**:
24
+
*`engine.rs` and `mod.rs` form a dedicated component for text processing, likely involved in data preparation, compression, or encoding before storage or transmission.
25
+
5.**Core / Utilities**:
26
+
* The presence of `encryption.sh` and key files (`encryption.key`) indicates that cryptography is an integral part of the system's operation, likely used by the Security and Storage layers.
27
+
* Files in the root like `Cargo.toml` and `.env` define project dependencies and environment configuration.
28
+
29
+
**Component Interaction Flow (Hypothetical):**
30
+
31
+
A typical flow might involve: A network request hits the **Network Layer**, which is validated by the **Security Layer**. If authorized, data is processed by the **Tokenizer Layer** (for encoding/compression) before being persisted via the **Storage Layer's engine**. The Storage Layer may use **Snapshotting** for state management and the Statistics module to track performance.
32
+
33
+
## Common Commands
34
+
35
+
### Build
36
+
***Command**: `cargo build`
37
+
***Notes**: Standard Rust compilation. Check `Cargo.toml` for specific target configurations or dependencies required by `zstd-sys`.
38
+
39
+
### Linting
40
+
***Command**: (Not explicitly found, but typically handled by `cargo clippy`)
41
+
***Notes**: Check for existing linting setup in a `.cargo/config.toml` file or look for integration with Clippy via scripts in `test.sh`.
42
+
43
+
### Testing
44
+
***Command**: `./test.sh` (or individual tests)
45
+
***Notes**: The presence of `test.sh` suggests an explicit script for running the test suite. Review files in `tests/` for component-specific test logic, especially around storage engine and network handlers.
46
+
47
+
### Running Application / Stress Testing
48
+
***Command**: `./stress.sh`
49
+
***Notes**: This script is designated for stress testing the system, likely targeting the Storage or Network layers under heavy load. Review this script to understand the specific load profile it imposes on the system components.
50
+
51
+
## Code Conventions & Specifics
52
+
53
+
***Encryption**: Cryptographic operations are separated (via `encryption.sh` and key files), suggesting a clear separation of cryptographic concerns from business logic in storage/security modules.
54
+
***Data Structures**: The presence of `zstd` related files (`zdict.h`, `zstd.h`) suggests that data serialization or compression is a significant concern, likely implemented within the Tokenizer layer or Storage persistence routines.
55
+
***Administration**: The existence of `src/storage/admin.rs` and `src/storage/admin.html` indicates that system configuration or monitoring access points are designed into the storage module structure.
0 commit comments