feat(markdown-editor): implement wysiswyg markdown editor with live preview

- Build Go backend with Cobra CLI and REST API
  - CRUD operations for markdown files (GET, POST, PUT, DELETE)
  - File storage with flat .md file structure
  - Comprehensive logrus logging with JSON format
  - Static asset serving for frontend

- Build React/TypeScript frontend with Tailwind CSS
  - Markdown editor with live GFM preview
  - File management UI (list, create, open, delete)
  - Theme system (Dark/Light/System) with persistence
  - Responsive design (320px mobile, 1920px desktop)

- Add comprehensive test coverage
  - Backend: API, storage, and logger tests (13 tests passing)
  - Frontend: Editor and App component tests

- Setup Nix development environment with Go, Node.js, and TypeScript
This commit is contained in:
2026-02-05 17:48:23 -05:00
parent 78f33053fb
commit 5b67cb61d2
31 changed files with 2010 additions and 0 deletions

33
backend/test.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Create temporary directory for test data
TEST_DIR=$(mktemp -d)
echo "Test directory: $TEST_DIR"
# Test file storage
echo "Testing file storage..."
# Create test files
echo "# Test Heading" > "$TEST_DIR/test1.md"
echo "# Another Test" > "$TEST_DIR/test2.md"
# List files
ls "$TEST_DIR"/*.md
# Read file
CONTENT=$(cat "$TEST_DIR/test1.md")
echo "File content: $CONTENT"
# Delete file
rm "$TEST_DIR/test1.md"
# Check if file was deleted
if [ -f "$TEST_DIR/test1.md" ]; then
echo "ERROR: File was not deleted"
else
echo "SUCCESS: File was deleted"
fi
# Cleanup
rm -rf "$TEST_DIR"
echo "Test completed successfully"