feat: Add SOLID principles and TDD reference documentation

- Created solid.md to document the SOLID principles for clean code practices.
- Created tdd.md to outline Test Driven Development principles and practices.
- Added kana-rust-backend-best-practice.md as a reference guide for building a Rust backend using Axum and SeaORM.
- Established push-flow-convention.md to enforce pre-commit and pre-push hooks with versioning rules.
- Introduced AGENTS.md to provide guidance on best practices and available commands for Kilo.
- Configured kilo.json to include new skills and agents for enhanced functionality.
- Added lefthook.yml for managing git hooks to ensure code quality and adherence to conventions.
This commit is contained in:
asepharyana
2026-07-21 07:10:17 +07:00
parent d615090dcd
commit 55677dd671
23 changed files with 2110 additions and 33 deletions
+12 -9
View File
@@ -3,21 +3,24 @@
use tower_http::cors::{AllowHeaders, AllowOrigin, CorsLayer};
/// Return a permissive CorsLayer for local daemon IPC.
///
/// All method and header names are static strings guaranteed to be valid
/// HTTP tokens — `.parse()` is infallible here.
pub fn default_cors_layer() -> CorsLayer {
CorsLayer::new()
.allow_origin(AllowOrigin::any())
.allow_methods([
"GET".parse().unwrap(),
"POST".parse().unwrap(),
"PUT".parse().unwrap(),
"DELETE".parse().unwrap(),
"PATCH".parse().unwrap(),
"OPTIONS".parse().unwrap(),
"GET".parse().expect("static HTTP method"),
"POST".parse().expect("static HTTP method"),
"PUT".parse().expect("static HTTP method"),
"DELETE".parse().expect("static HTTP method"),
"PATCH".parse().expect("static HTTP method"),
"OPTIONS".parse().expect("static HTTP method"),
])
.allow_headers(AllowHeaders::any())
.expose_headers([
"Content-Type".parse().unwrap(),
"X-Session-Id".parse().unwrap(),
"X-Request-Id".parse().unwrap(),
"Content-Type".parse().expect("static HTTP header"),
"X-Session-Id".parse().expect("static HTTP header"),
"X-Request-Id".parse().expect("static HTTP header"),
])
}