mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
9581e32e06e9917737cbcdadd686d0116312c46a
NovaMD
Yet another markdown editor. Work in progress
Features
- Markdown editing with syntax highlighting
- File tree navigation
- Git integration for version control
- Dark and light theme support
- Multiple workspaces
- Math equation support (KaTeX)
- Code syntax highlighting
Prerequisites
- Go 1.23 or later
- Node.js 20 or later
- gcc (for go-sqlite3 package)
Setup
Set the following environment variables:
CGO_ENABLED=1: This is necessary for the go-sqlite3 packageNOVAMD_DB_PATH: Path to the SQLite database file (default: "./sqlite.db")NOVAMD_WORKDIR: Directory for storing Markdown files (default: "./data")NOVAMD_STATIC_PATH: Path to the frontend build files (default: "../frontend/dist")NOVAMD_PORT: Port to run the server on (default: "8080")NOVAMD_ADMIN_EMAIL: Admin user emailNOVAMD_ADMIN_PASSWORD: Admin user passwordNOVAMD_ENCRYPTION_KEY: 32-byte key for encrypting sensitive data
To generate a secure encryption key you can use openssl:
openssl rand -base64 32
Running the Backend
- Navigate to the
backenddirectory - Ensure all environment variables are set
- Run the server:
go run cmd/server/main.go
Running the Frontend
- Navigate to the
frontenddirectory - Install dependencies:
npm install - Start the development server:
The frontend will be available at
npm starthttp://localhost:3000
Building for Production
- Build the frontend:
cd frontend npm run build - Build the backend:
cd backend go build -o novamd ./cmd/server - Set the
NOVAMD_STATIC_PATHenvironment variable to point to the frontend build directory - Run the
novamdexecutable
Docker Support
A Dockerfile is provided for easy deployment. To build and run the Docker image:
- Build the image:
docker build -t novamd . - Run the container:
docker run -p 8080:8080 -v /path/to/data:/app/data novamd
Description
Languages
TypeScript
63.7%
Go
35.8%
JavaScript
0.2%
SCSS
0.1%
Shell
0.1%