# Claude Development Notes for ObsWiki ## Commands to NEVER run ### Build and Run Commands - **NEVER** run `cargo run` - this will start the server and block the terminal - **NEVER** run `./target/debug/obswiki` without the `&` background operator - **NEVER** run `./target/release/obswiki` without the `&` background operator ### Safe Commands - ✅ `cargo build` - builds the project safely - ✅ `cargo test` - runs tests - ✅ `cargo check` - checks compilation without building - ✅ `./target/debug/obswiki &` - runs in background (if absolutely necessary) ## Development Guidelines ### Task Documentation - **ALWAYS** document new tasks in `TASK_LOG.md` with: - Timestamp - User request (exact quote) - Actions taken - Results/outcomes - Files modified ### File Structure - Wiki files are stored in `wiki/` directory - Static assets in `static/` directory - Source code in `src/` directory - Migrations in `migrations/` directory ### Key Features Implemented - ✅ Nested folder path support (fixed routing from `:path` to `*path`) - ✅ Markdown link processing (strips `.md` extensions) - ✅ File tree navigation component - ✅ Search functionality with proper URL encoding - ✅ Authentication system with multiple providers ### Recent Changes - Fixed Axum routing to capture full nested paths using `/*path` - Added file tree API endpoint at `/api/filetree` - Implemented recursive file tree rendering with folder expand/collapse - Fixed URL encoding in search results to preserve forward slashes - Updated markdown renderer to handle both wiki links `[[]]` and regular markdown links to `.md` files ### Architecture Notes - Uses Axum web framework with Rust - SQLite database for user management - pulldown-cmark for markdown processing - JWT-based authentication - File-based wiki storage with real-time caching ### Testing - Server runs on localhost:3000 by default - Test pages available at `/wiki/examples/getting-started` - File tree loads automatically on page load