A lightweight, file-based markdown editor and collaboration platform built using minimal tooling and standard file formats. This project demonstrates how to build a functional SaaS application with simple technologies.
This project is a Markdown Editor and collaboration platform that allows users to:
- Create, edit, and save markdown documents
- Track document history using Git
- Toggle between light and dark themes
- Work offline with service worker support
- Store user data and documents in a structured way
- Collaborate on documents (multi-user support)
-
Clone the repository
git clone https://github.com/yourusername/markdown-editor.git cd markdown-editor -
Start the application
make start
-
Access the application Open your browser and navigate to: http://localhost:3000
- Python 3.6+
- Git
- Bash shell (or Git Bash on Windows)
- Web browser with JavaScript enabled
markdown-editor/
├── data/ # Data storage directory
│ └── docs/ # User documents
├── public/ # Static web assets
│ ├── app.js # Application JavaScript
│ ├── index.html # Main HTML
│ ├── styles.css # CSS styles
│ └── ... # Other assets
├── scripts/ # Shell scripts
│ ├── start.sh # Cross-platform starter
│ └── backup.sh # Backup utility
├── .vscode/ # VS Code configuration
├── .cursor/ # Cursor IDE configuration
├── Makefile # Command shortcuts
└── .env # Environment configuration
This project includes configurations for both VS Code and Cursor to ensure consistent development across different environments.
The .vscode directory contains configurations for VS Code:
settings.json: Editor settingsextensions.json: Recommended extensionslaunch.json: Debug configurations
The .cursor directory contains settings specific to the Cursor IDE.
The .env file contains configuration parameters:
PORT: HTTP server port (default: 3000)HOST: Server host (default: 0.0.0.0)DEBUG: Debug mode toggleDOCS_DIR: Document storage locationDB_PATH: SQLite database path
The Makefile provides convenient commands:
make start: Start the application servermake stop: Stop the running servermake restart: Restart the application servermake clean: Clean temporary filesmake backup: Create a backup of user datamake setup: Set up the application environmentmake help: Display available commands
The application includes a service worker that enables offline functionality. Once you've visited the site while online, many features will continue to work without an internet connection.
The application is designed to work across different operating systems:
- macOS
- Linux
- Windows (using Git Bash or similar)
- This is a demonstration project and not production-ready
- User authentication is simplified for demonstration purposes
- Data is stored locally without encryption
This application uses Git for document versioning in a specific way:
- Project Repository: Contains application code, configuration, and structure
- User Document Repositories: Each user's documents are versioned in their own separate Git repository
- Located in
data/docs/user_X/where X is the user ID - Each document edit creates a commit with metadata stored in the database
- Document history can be viewed through the UI or Git directly
- Located in
This two-level Git architecture allows for clean separation between application code and user content, while still providing robust versioning capabilities for documents.
.git: Document versioning and history.json/.csv: Structured data.sqlite: Relational database
.sh: Automation and server scripts.html + .wasm: Frontend execution
.html: Frontend structure.md: Content storage
.log: History tracking.bash_history: Task replay
.tar: Data packaging.git: Cloud storage/distribution
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.