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
-
Build the frontend:
cd frontend npm run build -
Run the backend (it will serve the built frontend):
cd backend ./bin/markdown-editor -
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 contentPOST /api/{filename}.md- Create a new markdown filePUT /api/{filename}.md- Update an existing markdown fileDELETE /api/{filename}.md- Delete a markdown file
License
MIT
Description
Languages
Shell
64.1%
Nix
35.9%