@su-record/vibe 2.4.72 → 2.4.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +216 -215
- package/README.md +4 -4
- package/agents/research/best-practices-agent.md +13 -13
- package/agents/research/codebase-patterns-agent.md +33 -33
- package/agents/research/framework-docs-agent.md +23 -23
- package/agents/research/security-advisory-agent.md +29 -29
- package/agents/review/architecture-reviewer.md +31 -31
- package/agents/review/complexity-reviewer.md +21 -21
- package/agents/review/data-integrity-reviewer.md +29 -29
- package/agents/review/git-history-reviewer.md +24 -24
- package/agents/review/performance-reviewer.md +29 -29
- package/agents/review/python-reviewer.md +53 -53
- package/agents/review/rails-reviewer.md +40 -40
- package/agents/review/react-reviewer.md +40 -40
- package/agents/review/security-reviewer.md +29 -29
- package/agents/review/simplicity-reviewer.md +24 -24
- package/agents/review/test-coverage-reviewer.md +31 -31
- package/agents/review/typescript-reviewer.md +41 -41
- package/commands/vibe.analyze.md +103 -7
- package/commands/vibe.reason.md +106 -0
- package/commands/vibe.review.md +123 -38
- package/commands/vibe.run.md +286 -223
- package/commands/vibe.spec.md +425 -186
- package/commands/vibe.utils.md +104 -3
- package/commands/vibe.verify.md +179 -86
- package/dist/cli/detect.js +40 -40
- package/dist/cli/detect.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/llm.js +5 -5
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/setup.js +3 -3
- package/dist/cli/setup.js.map +1 -1
- package/dist/lib/ContextCompressor.js +1 -1
- package/dist/lib/ContextCompressor.js.map +1 -1
- package/dist/lib/MemoryManager.d.ts +13 -155
- package/dist/lib/MemoryManager.d.ts.map +1 -1
- package/dist/lib/MemoryManager.js +52 -617
- package/dist/lib/MemoryManager.js.map +1 -1
- package/dist/lib/gemini-api.js +12 -12
- package/dist/lib/gemini-api.js.map +1 -1
- package/dist/lib/gemini-oauth.js +22 -22
- package/dist/lib/gemini-oauth.js.map +1 -1
- package/dist/lib/gemini-storage.js +3 -3
- package/dist/lib/gemini-storage.js.map +1 -1
- package/dist/lib/gpt-api.js +11 -11
- package/dist/lib/gpt-api.js.map +1 -1
- package/dist/lib/gpt-oauth.js +28 -28
- package/dist/lib/gpt-oauth.js.map +1 -1
- package/dist/lib/gpt-storage.js +3 -3
- package/dist/lib/gpt-storage.js.map +1 -1
- package/dist/lib/memory/KnowledgeGraph.d.ts +34 -0
- package/dist/lib/memory/KnowledgeGraph.d.ts.map +1 -0
- package/dist/lib/memory/KnowledgeGraph.js +216 -0
- package/dist/lib/memory/KnowledgeGraph.js.map +1 -0
- package/dist/lib/memory/KnowledgeGraph.test.d.ts +2 -0
- package/dist/lib/memory/KnowledgeGraph.test.d.ts.map +1 -0
- package/dist/lib/memory/KnowledgeGraph.test.js +189 -0
- package/dist/lib/memory/KnowledgeGraph.test.js.map +1 -0
- package/dist/lib/memory/MemorySearch.d.ts +25 -0
- package/dist/lib/memory/MemorySearch.d.ts.map +1 -0
- package/dist/lib/memory/MemorySearch.js +85 -0
- package/dist/lib/memory/MemorySearch.js.map +1 -0
- package/dist/lib/memory/MemorySearch.test.d.ts +2 -0
- package/dist/lib/memory/MemorySearch.test.d.ts.map +1 -0
- package/dist/lib/memory/MemorySearch.test.js +149 -0
- package/dist/lib/memory/MemorySearch.test.js.map +1 -0
- package/dist/lib/memory/MemoryStorage.d.ts +77 -0
- package/dist/lib/memory/MemoryStorage.d.ts.map +1 -0
- package/dist/lib/memory/MemoryStorage.js +278 -0
- package/dist/lib/memory/MemoryStorage.js.map +1 -0
- package/dist/lib/memory/MemoryStorage.test.d.ts +2 -0
- package/dist/lib/memory/MemoryStorage.test.d.ts.map +1 -0
- package/dist/lib/memory/MemoryStorage.test.js +198 -0
- package/dist/lib/memory/MemoryStorage.test.js.map +1 -0
- package/dist/lib/memory/index.d.ts +4 -0
- package/dist/lib/memory/index.d.ts.map +1 -0
- package/dist/lib/memory/index.js +8 -0
- package/dist/lib/memory/index.js.map +1 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator.js +4 -6
- package/dist/orchestrator/orchestrator.js.map +1 -1
- package/dist/tools/convention/analyzeComplexity.d.ts +3 -1
- package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
- package/dist/tools/convention/analyzeComplexity.js +102 -4
- package/dist/tools/convention/analyzeComplexity.js.map +1 -1
- package/dist/tools/convention/analyzeComplexity.test.d.ts +2 -0
- package/dist/tools/convention/analyzeComplexity.test.d.ts.map +1 -0
- package/dist/tools/convention/analyzeComplexity.test.js +207 -0
- package/dist/tools/convention/analyzeComplexity.test.js.map +1 -0
- package/dist/tools/convention/applyQualityRules.js +1 -1
- package/dist/tools/convention/applyQualityRules.js.map +1 -1
- package/dist/tools/convention/checkCouplingCohesion.js +2 -2
- package/dist/tools/convention/checkCouplingCohesion.js.map +1 -1
- package/dist/tools/convention/suggestImprovements.js +1 -1
- package/dist/tools/convention/suggestImprovements.js.map +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts +3 -1
- package/dist/tools/convention/validateCodeQuality.d.ts.map +1 -1
- package/dist/tools/convention/validateCodeQuality.js +145 -2
- package/dist/tools/convention/validateCodeQuality.js.map +1 -1
- package/dist/tools/convention/validateCodeQuality.test.d.ts +2 -0
- package/dist/tools/convention/validateCodeQuality.test.d.ts.map +1 -0
- package/dist/tools/convention/validateCodeQuality.test.js +230 -0
- package/dist/tools/convention/validateCodeQuality.test.js.map +1 -0
- package/dist/tools/memory/autoSaveContext.js +1 -1
- package/dist/tools/memory/autoSaveContext.js.map +1 -1
- package/dist/tools/memory/createMemoryTimeline.js +27 -27
- package/dist/tools/memory/createMemoryTimeline.js.map +1 -1
- package/dist/tools/memory/deleteMemory.js +1 -1
- package/dist/tools/memory/deleteMemory.js.map +1 -1
- package/dist/tools/memory/getMemoryGraph.js +24 -24
- package/dist/tools/memory/getMemoryGraph.js.map +1 -1
- package/dist/tools/memory/getSessionContext.js +36 -36
- package/dist/tools/memory/getSessionContext.js.map +1 -1
- package/dist/tools/memory/linkMemories.js +21 -21
- package/dist/tools/memory/linkMemories.js.map +1 -1
- package/dist/tools/memory/prioritizeMemory.js +1 -1
- package/dist/tools/memory/prioritizeMemory.js.map +1 -1
- package/dist/tools/memory/restoreSessionContext.js +1 -1
- package/dist/tools/memory/restoreSessionContext.js.map +1 -1
- package/dist/tools/memory/searchMemories.js +1 -1
- package/dist/tools/memory/searchMemories.js.map +1 -1
- package/dist/tools/memory/searchMemoriesAdvanced.js +42 -42
- package/dist/tools/memory/searchMemoriesAdvanced.js.map +1 -1
- package/dist/tools/memory/startSession.js +2 -2
- package/dist/tools/memory/startSession.js.map +1 -1
- package/dist/tools/memory/updateMemory.js +1 -1
- package/dist/tools/memory/updateMemory.js.map +1 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +38 -38
- package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
- package/dist/tools/semantic/findReferences.js +1 -1
- package/dist/tools/semantic/findReferences.js.map +1 -1
- package/dist/tools/semantic/findSymbol.js +1 -1
- package/dist/tools/semantic/findSymbol.js.map +1 -1
- package/dist/tools/time/getCurrentTime.js +1 -1
- package/dist/tools/time/getCurrentTime.js.map +1 -1
- package/dist/tools/ui/previewUiAscii.js +2 -2
- package/dist/tools/ui/previewUiAscii.js.map +1 -1
- package/hooks/hooks.json +11 -2
- package/hooks/scripts/llm-orchestrate.js +1 -1
- package/hooks/scripts/utils.js +31 -6
- package/languages/csharp-unity.md +82 -83
- package/languages/dart-flutter.md +89 -88
- package/languages/go.md +76 -75
- package/languages/java-spring.md +85 -84
- package/languages/kotlin-android.md +64 -63
- package/languages/python-django.md +83 -82
- package/languages/python-fastapi.md +82 -81
- package/languages/rust.md +75 -74
- package/languages/swift-ios.md +73 -72
- package/languages/typescript-electron.md +70 -71
- package/languages/typescript-nextjs.md +93 -92
- package/languages/typescript-node.md +64 -63
- package/languages/typescript-nuxt.md +113 -112
- package/languages/typescript-react-native.md +82 -81
- package/languages/typescript-react.md +76 -75
- package/languages/typescript-tauri.md +74 -75
- package/languages/typescript-vue.md +73 -72
- package/package.json +1 -1
- package/skills/git-worktree.md +25 -25
- package/skills/multi-llm-orchestration.md +4 -6
- package/skills/priority-todos.md +39 -39
- package/skills/vibe-capabilities.md +2 -2
- package/vibe/config.json +2 -2
package/languages/rust.md
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Rust Quality Rules
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Core Principles (inherited from core)
|
|
4
4
|
|
|
5
5
|
```markdown
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
# Core Principles (inherited from core)
|
|
7
|
+
Single Responsibility (SRP)
|
|
8
|
+
No Duplication (DRY)
|
|
9
|
+
Reusability
|
|
10
|
+
Low Complexity
|
|
11
|
+
Function <= 30 lines
|
|
12
|
+
Nesting <= 3 levels
|
|
13
|
+
Cyclomatic complexity <= 10
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
## Rust
|
|
16
|
+
## Rust Specific Rules
|
|
16
17
|
|
|
17
|
-
### 1.
|
|
18
|
+
### 1. Error Handling (Result, Option)
|
|
18
19
|
|
|
19
20
|
```rust
|
|
20
|
-
//
|
|
21
|
+
// Bad: Overusing unwrap()
|
|
21
22
|
let content = fs::read_to_string("config.json").unwrap();
|
|
22
23
|
|
|
23
|
-
//
|
|
24
|
+
// Good: ? operator with proper error handling
|
|
24
25
|
fn read_config(path: &str) -> Result<Config, ConfigError> {
|
|
25
26
|
let content = fs::read_to_string(path)
|
|
26
27
|
.map_err(|e| ConfigError::IoError(e))?;
|
|
@@ -31,39 +32,39 @@ fn read_config(path: &str) -> Result<Config, ConfigError> {
|
|
|
31
32
|
Ok(config)
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
//
|
|
35
|
+
// Good: Custom error type (thiserror)
|
|
35
36
|
use thiserror::Error;
|
|
36
37
|
|
|
37
38
|
#[derive(Error, Debug)]
|
|
38
39
|
pub enum AppError {
|
|
39
|
-
#[error("
|
|
40
|
+
#[error("Cannot read config file: {0}")]
|
|
40
41
|
ConfigError(#[from] std::io::Error),
|
|
41
42
|
|
|
42
|
-
#[error("
|
|
43
|
+
#[error("Invalid request: {0}")]
|
|
43
44
|
BadRequest(String),
|
|
44
45
|
|
|
45
|
-
#[error("
|
|
46
|
+
#[error("Resource not found: {resource} (ID: {id})")]
|
|
46
47
|
NotFound { resource: String, id: String },
|
|
47
48
|
|
|
48
|
-
#[error("
|
|
49
|
+
#[error("Database error: {0}")]
|
|
49
50
|
DatabaseError(#[from] sqlx::Error),
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
//
|
|
53
|
+
// Good: Easy error handling with anyhow (application level)
|
|
53
54
|
use anyhow::{Context, Result};
|
|
54
55
|
|
|
55
56
|
fn process_file(path: &str) -> Result<String> {
|
|
56
57
|
let content = fs::read_to_string(path)
|
|
57
|
-
.context(format!("
|
|
58
|
+
.context(format!("Cannot read file: {}", path))?;
|
|
58
59
|
|
|
59
60
|
Ok(content)
|
|
60
61
|
}
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
### 2.
|
|
64
|
+
### 2. Structs and Traits
|
|
64
65
|
|
|
65
66
|
```rust
|
|
66
|
-
//
|
|
67
|
+
// Good: Struct definition
|
|
67
68
|
use chrono::{DateTime, Utc};
|
|
68
69
|
use serde::{Deserialize, Serialize};
|
|
69
70
|
use uuid::Uuid;
|
|
@@ -90,7 +91,7 @@ impl User {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
//
|
|
94
|
+
// Good: Trait definition
|
|
94
95
|
#[async_trait]
|
|
95
96
|
pub trait UserRepository: Send + Sync {
|
|
96
97
|
async fn find_by_id(&self, id: Uuid) -> Result<Option<User>, AppError>;
|
|
@@ -100,7 +101,7 @@ pub trait UserRepository: Send + Sync {
|
|
|
100
101
|
async fn delete(&self, id: Uuid) -> Result<(), AppError>;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
//
|
|
104
|
+
// Good: Trait implementation
|
|
104
105
|
pub struct PostgresUserRepository {
|
|
105
106
|
pool: PgPool,
|
|
106
107
|
}
|
|
@@ -119,14 +120,14 @@ impl UserRepository for PostgresUserRepository {
|
|
|
119
120
|
Ok(user)
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
// ...
|
|
123
|
+
// ... other method implementations
|
|
123
124
|
}
|
|
124
125
|
```
|
|
125
126
|
|
|
126
|
-
### 3. Actix-web / Axum
|
|
127
|
+
### 3. Actix-web / Axum Handlers
|
|
127
128
|
|
|
128
129
|
```rust
|
|
129
|
-
//
|
|
130
|
+
// Good: Axum handler
|
|
130
131
|
use axum::{
|
|
131
132
|
extract::{Path, State, Json},
|
|
132
133
|
http::StatusCode,
|
|
@@ -141,7 +142,7 @@ pub async fn get_user(
|
|
|
141
142
|
.find_by_id(id)
|
|
142
143
|
.await?
|
|
143
144
|
.ok_or(AppError::NotFound {
|
|
144
|
-
resource: "
|
|
145
|
+
resource: "User".to_string(),
|
|
145
146
|
id: id.to_string(),
|
|
146
147
|
})?;
|
|
147
148
|
|
|
@@ -158,7 +159,7 @@ pub async fn create_user(
|
|
|
158
159
|
Ok((StatusCode::CREATED, Json(created)))
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
//
|
|
162
|
+
// Good: Actix-web handler
|
|
162
163
|
use actix_web::{web, HttpResponse, Result};
|
|
163
164
|
|
|
164
165
|
pub async fn get_user(
|
|
@@ -170,7 +171,7 @@ pub async fn get_user(
|
|
|
170
171
|
.find_by_id(id)
|
|
171
172
|
.await?
|
|
172
173
|
.ok_or(AppError::NotFound {
|
|
173
|
-
resource: "
|
|
174
|
+
resource: "User".to_string(),
|
|
174
175
|
id: id.to_string(),
|
|
175
176
|
})?;
|
|
176
177
|
|
|
@@ -178,21 +179,21 @@ pub async fn get_user(
|
|
|
178
179
|
}
|
|
179
180
|
```
|
|
180
181
|
|
|
181
|
-
### 4.
|
|
182
|
+
### 4. Ownership and Lifetimes
|
|
182
183
|
|
|
183
184
|
```rust
|
|
184
|
-
//
|
|
185
|
+
// Bad: Unnecessary clone
|
|
185
186
|
fn process(data: &Vec<String>) -> Vec<String> {
|
|
186
|
-
let cloned = data.clone(); //
|
|
187
|
+
let cloned = data.clone(); // Unnecessary
|
|
187
188
|
cloned.iter().map(|s| s.to_uppercase()).collect()
|
|
188
189
|
}
|
|
189
190
|
|
|
190
|
-
//
|
|
191
|
+
// Good: Use references
|
|
191
192
|
fn process(data: &[String]) -> Vec<String> {
|
|
192
193
|
data.iter().map(|s| s.to_uppercase()).collect()
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
//
|
|
196
|
+
// Good: Explicit lifetimes
|
|
196
197
|
pub struct UserService<'a> {
|
|
197
198
|
repo: &'a dyn UserRepository,
|
|
198
199
|
cache: &'a dyn CacheRepository,
|
|
@@ -207,16 +208,16 @@ impl<'a> UserService<'a> {
|
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
|
|
210
|
-
//
|
|
211
|
-
fn take_ownership(s: String) { /*
|
|
212
|
-
fn borrow(s: &str) { /* s
|
|
213
|
-
fn borrow_mut(s: &mut String) { /*
|
|
211
|
+
// Good: Ownership transfer vs borrowing
|
|
212
|
+
fn take_ownership(s: String) { /* Takes ownership of s */ }
|
|
213
|
+
fn borrow(s: &str) { /* Borrows s */ }
|
|
214
|
+
fn borrow_mut(s: &mut String) { /* Mutably borrows s */ }
|
|
214
215
|
```
|
|
215
216
|
|
|
216
|
-
### 5.
|
|
217
|
+
### 5. Async Processing (Tokio)
|
|
217
218
|
|
|
218
219
|
```rust
|
|
219
|
-
//
|
|
220
|
+
// Good: Async function
|
|
220
221
|
use tokio::time::{sleep, Duration};
|
|
221
222
|
|
|
222
223
|
pub async fn fetch_with_retry<T, F, Fut>(
|
|
@@ -242,7 +243,7 @@ where
|
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
245
|
|
|
245
|
-
//
|
|
246
|
+
// Good: Concurrent execution
|
|
246
247
|
use futures::future::join_all;
|
|
247
248
|
|
|
248
249
|
pub async fn fetch_users(ids: Vec<Uuid>) -> Vec<Result<User, AppError>> {
|
|
@@ -254,7 +255,7 @@ pub async fn fetch_users(ids: Vec<Uuid>) -> Vec<Result<User, AppError>> {
|
|
|
254
255
|
join_all(futures).await
|
|
255
256
|
}
|
|
256
257
|
|
|
257
|
-
//
|
|
258
|
+
// Good: Task creation with tokio::spawn
|
|
258
259
|
pub async fn background_job() {
|
|
259
260
|
tokio::spawn(async {
|
|
260
261
|
loop {
|
|
@@ -265,7 +266,7 @@ pub async fn background_job() {
|
|
|
265
266
|
}
|
|
266
267
|
```
|
|
267
268
|
|
|
268
|
-
### 6.
|
|
269
|
+
### 6. Testing
|
|
269
270
|
|
|
270
271
|
```rust
|
|
271
272
|
#[cfg(test)]
|
|
@@ -274,7 +275,7 @@ mod tests {
|
|
|
274
275
|
use mockall::predicate::*;
|
|
275
276
|
use mockall::mock;
|
|
276
277
|
|
|
277
|
-
//
|
|
278
|
+
// Good: Mock creation
|
|
278
279
|
mock! {
|
|
279
280
|
pub UserRepo {}
|
|
280
281
|
|
|
@@ -285,12 +286,12 @@ mod tests {
|
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
288
|
|
|
288
|
-
//
|
|
289
|
+
// Good: Unit test
|
|
289
290
|
#[tokio::test]
|
|
290
291
|
async fn test_get_user_success() {
|
|
291
292
|
let mut mock_repo = MockUserRepo::new();
|
|
292
293
|
let user_id = Uuid::new_v4();
|
|
293
|
-
let expected_user = User::new("test@example.com".into(), "
|
|
294
|
+
let expected_user = User::new("test@example.com".into(), "Test".into());
|
|
294
295
|
|
|
295
296
|
mock_repo
|
|
296
297
|
.expect_find_by_id()
|
|
@@ -304,7 +305,7 @@ mod tests {
|
|
|
304
305
|
assert_eq!(result.unwrap().email, "test@example.com");
|
|
305
306
|
}
|
|
306
307
|
|
|
307
|
-
//
|
|
308
|
+
// Good: Error case test
|
|
308
309
|
#[tokio::test]
|
|
309
310
|
async fn test_get_user_not_found() {
|
|
310
311
|
let mut mock_repo = MockUserRepo::new();
|
|
@@ -322,10 +323,10 @@ mod tests {
|
|
|
322
323
|
}
|
|
323
324
|
```
|
|
324
325
|
|
|
325
|
-
### 7.
|
|
326
|
+
### 7. Dependency Injection
|
|
326
327
|
|
|
327
328
|
```rust
|
|
328
|
-
//
|
|
329
|
+
// Good: Constructor injection
|
|
329
330
|
pub struct UserService {
|
|
330
331
|
repo: Arc<dyn UserRepository>,
|
|
331
332
|
cache: Arc<dyn CacheRepository>,
|
|
@@ -340,7 +341,7 @@ impl UserService {
|
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
343
|
|
|
343
|
-
//
|
|
344
|
+
// Good: Builder pattern
|
|
344
345
|
#[derive(Default)]
|
|
345
346
|
pub struct ServerBuilder {
|
|
346
347
|
port: Option<u16>,
|
|
@@ -377,7 +378,7 @@ impl ServerBuilder {
|
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
380
|
|
|
380
|
-
//
|
|
381
|
+
// Usage
|
|
381
382
|
let server = ServerBuilder::new()
|
|
382
383
|
.port(3000)
|
|
383
384
|
.host("0.0.0.0")
|
|
@@ -385,41 +386,41 @@ let server = ServerBuilder::new()
|
|
|
385
386
|
.build();
|
|
386
387
|
```
|
|
387
388
|
|
|
388
|
-
##
|
|
389
|
+
## File Structure
|
|
389
390
|
|
|
390
|
-
```
|
|
391
|
+
```text
|
|
391
392
|
project/
|
|
392
393
|
├── src/
|
|
393
|
-
│ ├── main.rs #
|
|
394
|
-
│ ├── lib.rs #
|
|
395
|
-
│ ├── config.rs #
|
|
396
|
-
│ ├── error.rs #
|
|
397
|
-
│ ├── domain/ #
|
|
394
|
+
│ ├── main.rs # Entry point
|
|
395
|
+
│ ├── lib.rs # Library root
|
|
396
|
+
│ ├── config.rs # Configuration
|
|
397
|
+
│ ├── error.rs # Error definitions
|
|
398
|
+
│ ├── domain/ # Domain models
|
|
398
399
|
│ │ ├── mod.rs
|
|
399
400
|
│ │ └── user.rs
|
|
400
|
-
│ ├── handlers/ # HTTP
|
|
401
|
+
│ ├── handlers/ # HTTP handlers
|
|
401
402
|
│ │ ├── mod.rs
|
|
402
403
|
│ │ └── user.rs
|
|
403
|
-
│ ├── services/ #
|
|
404
|
+
│ ├── services/ # Business logic
|
|
404
405
|
│ │ ├── mod.rs
|
|
405
406
|
│ │ └── user.rs
|
|
406
|
-
│ ├── repositories/ #
|
|
407
|
+
│ ├── repositories/ # Data access
|
|
407
408
|
│ │ ├── mod.rs
|
|
408
409
|
│ │ └── user.rs
|
|
409
|
-
│ └── middleware/ #
|
|
410
|
-
├── tests/ #
|
|
411
|
-
├── migrations/ # DB
|
|
410
|
+
│ └── middleware/ # Middleware
|
|
411
|
+
├── tests/ # Integration tests
|
|
412
|
+
├── migrations/ # DB migrations
|
|
412
413
|
├── Cargo.toml
|
|
413
414
|
└── Cargo.lock
|
|
414
415
|
```
|
|
415
416
|
|
|
416
|
-
##
|
|
417
|
+
## Checklist
|
|
417
418
|
|
|
418
|
-
- [ ] unwrap()/expect()
|
|
419
|
-
- [ ] thiserror/anyhow
|
|
420
|
-
- [ ]
|
|
421
|
-
- [ ] Clone
|
|
422
|
-
- [ ] async/await
|
|
423
|
-
- [ ] clippy
|
|
424
|
-
- [ ] cargo fmt
|
|
425
|
-
- [ ] #[cfg(test)]
|
|
419
|
+
- [ ] Minimize unwrap()/expect(), use ? operator
|
|
420
|
+
- [ ] Handle errors with thiserror/anyhow
|
|
421
|
+
- [ ] Abstract with traits, use dependency injection
|
|
422
|
+
- [ ] Minimize Clone, use references
|
|
423
|
+
- [ ] Use async/await appropriately
|
|
424
|
+
- [ ] Resolve clippy warnings
|
|
425
|
+
- [ ] Apply cargo fmt
|
|
426
|
+
- [ ] Write tests in #[cfg(test)] module
|