A beautiful, real-time markdown preview editor built with Rust (Axum) backend and Next.js 15 frontend.
- β¨ Real-time markdown preview
- π¨ Beautiful syntax highlighting
- π± Responsive design
- β‘ Fast rendering with Rust backend
- π§ Dark/Light mode toggle
- π€ Export to PDF and Word
- π³ Docker support
- π Easy deployment
- βοΈ Dokploy compatible
The easiest way to deploy the entire application:
# Development environment
./deploy.sh dev
# Staging environment
./deploy.sh staging
# Production environment
./deploy.sh production
# Build only
./deploy.sh build
# Run tests
./deploy.sh test
# Check status
./deploy.sh status
# Cleanup
./deploy.sh cleanupFor Dokploy deployment, set the environment variable and run:
# Enable Dokploy mode
export DOKPLOY_ENABLED=true
export DOKPLOY_APP_NAME=your-app-name
export DOKPLOY_DOMAIN=your-domain.com
# Deploy to production
./deploy.sh productionThis will create a dokploy.yaml configuration file ready for deployment.
- Rust (latest stable)
- Node.js 18+
- Docker & Docker Compose (optional for Dokploy)
- npm or yarn
# Build and run backend
cargo build --release
cargo runBackend will be available at http://localhost:3001
cd frontend
npm install
npm run devFrontend will be available at http://localhost:3000
# Build and run with Docker Compose
docker-compose up --build| Command | Description |
|---|---|
dev |
Start development servers (backend + frontend) |
staging |
Deploy to staging environment |
production |
Deploy to production environment |
build |
Build backend and frontend |
test |
Run all tests |
docker |
Build Docker images |
deploy |
Deploy with Docker Compose |
status |
Show deployment status |
cleanup |
Clean up build artifacts |
Create a .env file based on env.example:
# Backend
RUST_LOG=info
RUST_ENV=production
BACKEND_PORT=3001
# Frontend
NODE_ENV=production
NEXT_PUBLIC_API_URL=http://localhost:3001
FRONTEND_PORT=3000
# Docker
DOCKER_REGISTRY=
DOCKER_IMAGE_TAG=latest
# Dokploy
DOKPLOY_ENABLED=false
DOKPLOY_APP_NAME=markdown-preview
DOKPLOY_DOMAIN=The project includes a dokploy.yaml file for easy deployment to Dokploy:
app: markdown-preview
services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "3001:3001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
domains:
- markdown-preview.dokploy.comGET /health- Health checkPOST /api/convert- Convert markdown to HTML
markdown-preview/
βββ src/ # Rust backend source
βββ frontend/ # Next.js frontend
β βββ app/ # App router pages
β βββ components/ # React components
β βββ ...
βββ docker-compose.yml # Docker services
βββ dokploy.yaml # Dokploy configuration
βββ deploy.sh # Deployment script
βββ nginx.conf # Nginx configuration
βββ ...
# Run with hot reload
cargo watch -x run
# Run tests
cargo test
# Check formatting
cargo fmt
# Lint code
cargo clippycd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Lint code
npm run lint# Build and deploy
./deploy.sh production
# Or manually
docker-compose up --build -d# Start development environment
docker-compose -f docker-compose.dev.yml upThe application includes health checks and monitoring:
- Backend health:
http://localhost:3001/health - Frontend status:
http://localhost:3000 - Docker status:
./deploy.sh status
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
./deploy.sh test - Submit a pull request
MIT License - see LICENSE file for details.
For issues and questions, please open an issue on GitHub.