Evan Reichard 2a9e793971 feat: implement WYSIWYG markdown editor with Go backend and React frontend
Implements full markdown editor application with:

Backend (Go):
- Cobra CLI with --data-dir, --port, --host flags
- REST API for CRUD operations on markdown files
- File storage on disk with flat structure
- Logrus logging for all operations
- Static asset serving for frontend
- Comprehensive tests for CRUD and static assets

Frontend (React + TypeScript + Tailwind):
- Markdown editor with live GFM preview
- File management UI (list, create, open, save, delete)
- Theme system (Dark, Light, System) with persistence
- Responsive design (320px to 1920px)
- Component tests for core functionality

Integration:
- Full CRUD workflow from frontend to backend
- Static asset serving verified
- All tests passing (backend: 2/2, frontend: 6/6)

Files added:
- Backend: API handler, logger, server, tests
- Frontend: Components, tests, config files
- Build artifacts: compiled backend binary and frontend dist
- Documentation: README and implementation summary
2026-02-06 21:09:35 -05:00
2026-02-05 16:06:54 -05:00
2026-02-05 16:06:54 -05:00

WYSIWYG Markdown Editor

A markdown editor with live preview, file management, and theme switching.

Features

  • Markdown Editor: Write markdown with live GitHub Flavored Markdown preview
  • File Management: Create, open, save, and delete markdown files
  • Theme System: Dark, Light, and System themes
  • Responsive Design: Works on desktop and mobile devices

Running the Application

Prerequisites

  • Node.js (v18+)
  • Go (v1.21+)
  • npm or yarn

Backend

# Build the backend
cd backend
make build

# Run the backend
./bin/markdown-editor

# Or with custom flags
./bin/markdown-editor --data-dir ./my-data --port 3000 --host 0.0.0.0

Frontend

# Install dependencies
cd frontend
npm install

# Build the frontend
npm run build

# Run in development mode
npm run dev

Running Both

  1. Build the frontend:

    cd frontend
    npm run build
    
  2. Run the backend (it will serve the built frontend):

    cd backend
    ./bin/markdown-editor
    
  3. Open your browser to http://localhost:8080

Development

Running Tests

# Backend tests
cd backend
make test

# Frontend tests
cd frontend
npm test

Project Structure

backend/
  cmd/
    backend/
      main.go
  internal/
    api/
      api.go
    logger/
      logger.go
    server/
      server.go
  tests/
    api_test.go
  go.mod
  go.sum
  Makefile

frontend/
  src/
    App.tsx
    main.tsx
    index.css
    setupTests.ts
    App.test.tsx
  package.json
  vite.config.ts
  tailwind.config.js
  postcss.config.js
  tsconfig.json
  index.html

Makefile
README.md
SPEC.md

API Endpoints

  • GET /api/{filename}.md - Get markdown file content
  • POST /api/{filename}.md - Create a new markdown file
  • PUT /api/{filename}.md - Update an existing markdown file
  • DELETE /api/{filename}.md - Delete a markdown file

License

MIT

Description
No description provided
Readme 33 MiB
Languages
Shell 64.1%
Nix 35.9%