Yet another markdown editor. Work in progress
- Markdown editing with syntax highlighting
- File tree navigation
- Git integration for version control
- Dark and light theme support
- Multiple workspaces
- Math equation support (MathJax)
- Code syntax highlighting
- Go 1.23 or later
- Node.js 20 or later
- gcc (for go-sqlite3 package)
NovaMD can be configured using environment variables. Here are the available configuration options:
NOVAMD_ADMIN_EMAIL
: Email address for the admin accountNOVAMD_ADMIN_PASSWORD
: Password for the admin accountNOVAMD_ENCRYPTION_KEY
: Base64-encoded 32-byte key used for encrypting sensitive data
NOVAMD_ENV
: Set to "development" to enable development modeNOVAMD_DB_PATH
: Path to the SQLite database file (default: "./novamd.db")NOVAMD_WORKDIR
: Working directory for application data (default: "./data")NOVAMD_STATIC_PATH
: Path to static files (default: "../app/dist")NOVAMD_PORT
: Port to run the server on (default: "8080")NOVAMD_APP_URL
: Full URL where the application is hostedNOVAMD_CORS_ORIGINS
: Comma-separated list of allowed CORS originsNOVAMD_JWT_SIGNING_KEY
: Key used for signing JWT tokens (autogenerated if not set)NOVAMD_RATE_LIMIT_REQUESTS
: Number of allowed requests per window (default: 100)NOVAMD_RATE_LIMIT_WINDOW
: Duration of the rate limit window (default: 15m)
The encryption key must be a base64-encoded 32-byte value. You can generate a secure encryption key using OpenSSL:
# Generate a random 32-byte key and encode it as base64
openssl rand -base64 32
Store the generated key securely - it will be needed to decrypt any data encrypted by the application. If the key is lost or changed, previously encrypted data will become inaccessible.
- Navigate to the
server
directory - Install dependecies:
go mod tidy
- Ensure all environment variables are set
- Additionally set
CGO_ENABLED=1
(needed for sqlite3) - Run the server:
go run cmd/server/main.go
- Navigate to the
app
directory - Install dependencies:
npm install
- Start the development server:
The frontend will be available at
npm start
http://localhost:3000
- Build the frontend app:
cd app npm run build
- Build the backend:
cd server go build -o novamd ./cmd/server
- Set the
NOVAMD_STATIC_PATH
environment variable to point to the frontend build directory - Run the
novamd
executable
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
Before first stable release (1.0.0) there is not upgrade path. You have to delete the database file and start over.