2.0 KiB
2.0 KiB
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/obswikiwithout the&background operator - NEVER run
./target/release/obswikiwithout 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.mdwith:- 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
:pathto*path) - ✅ Markdown link processing (strips
.mdextensions) - ✅ 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.mdfiles
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