mirror of
https://github.com/lordmathis/lemma.git
synced 2025-12-22 17:44:25 +00:00
c095c4a049cacee376545ca2deebc871b248ead1
Bumps the minor-and-patch group in /server with 11 updates: | Package | From | To | | --- | --- | --- | | [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) | `5.2.2` | `5.2.3` | | [github.com/go-chi/cors](https://github.com/go-chi/cors) | `1.2.1` | `1.2.2` | | [github.com/go-chi/httprate](https://github.com/go-chi/httprate) | `0.14.1` | `0.15.0` | | [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | `5.13.1` | `5.16.3` | | [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) | `10.22.1` | `10.28.0` | | [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) | `5.2.2` | `5.3.0` | | [github.com/golang-migrate/migrate/v4](https://github.com/golang-migrate/migrate) | `4.18.2` | `4.19.0` | | [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | `1.14.23` | `1.14.32` | | [github.com/stretchr/testify](https://github.com/stretchr/testify) | `1.10.0` | `1.11.1` | | [github.com/swaggo/swag](https://github.com/swaggo/swag) | `1.16.4` | `1.16.6` | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.36.0` | `0.42.0` | Updates `github.com/go-chi/chi/v5` from 5.2.2 to 5.2.3 - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-chi/chi/compare/v5.2.2...v5.2.3) Updates `github.com/go-chi/cors` from 1.2.1 to 1.2.2 - [Release notes](https://github.com/go-chi/cors/releases) - [Commits](https://github.com/go-chi/cors/compare/v1.2.1...v1.2.2) Updates `github.com/go-chi/httprate` from 0.14.1 to 0.15.0 - [Release notes](https://github.com/go-chi/httprate/releases) - [Commits](https://github.com/go-chi/httprate/compare/v0.14.1...v0.15.0) Updates `github.com/go-git/go-git/v5` from 5.13.1 to 5.16.3 - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](https://github.com/go-git/go-git/compare/v5.13.1...v5.16.3) Updates `github.com/go-playground/validator/v10` from 10.22.1 to 10.28.0 - [Release notes](https://github.com/go-playground/validator/releases) - [Commits](https://github.com/go-playground/validator/compare/v10.22.1...v10.28.0) Updates `github.com/golang-jwt/jwt/v5` from 5.2.2 to 5.3.0 - [Release notes](https://github.com/golang-jwt/jwt/releases) - [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md) - [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.2...v5.3.0) Updates `github.com/golang-migrate/migrate/v4` from 4.18.2 to 4.19.0 - [Release notes](https://github.com/golang-migrate/migrate/releases) - [Changelog](https://github.com/golang-migrate/migrate/blob/master/.goreleaser.yml) - [Commits](https://github.com/golang-migrate/migrate/compare/v4.18.2...v4.19.0) Updates `github.com/mattn/go-sqlite3` from 1.14.23 to 1.14.32 - [Release notes](https://github.com/mattn/go-sqlite3/releases) - [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.23...v1.14.32) Updates `github.com/stretchr/testify` from 1.10.0 to 1.11.1 - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1) Updates `github.com/swaggo/swag` from 1.16.4 to 1.16.6 - [Release notes](https://github.com/swaggo/swag/releases) - [Changelog](https://github.com/swaggo/swag/blob/master/.goreleaser.yml) - [Commits](https://github.com/swaggo/swag/compare/v1.16.4...v1.16.6) Updates `golang.org/x/crypto` from 0.36.0 to 0.42.0 - [Commits](https://github.com/golang/crypto/compare/v0.36.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: github.com/go-chi/cors dependency-version: 1.2.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: github.com/go-chi/httprate dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/go-git/go-git/v5 dependency-version: 5.16.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/go-playground/validator/v10 dependency-version: 10.28.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/golang-jwt/jwt/v5 dependency-version: 5.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/golang-migrate/migrate/v4 dependency-version: 4.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/mattn/go-sqlite3 dependency-version: 1.14.32 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: github.com/stretchr/testify dependency-version: 1.11.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/swaggo/swag dependency-version: 1.16.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: golang.org/x/crypto dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Lemma
Yet another markdown editor. Work in progress
Features
- Editing & Content
- Rich Markdown Editing - Full-featured editor with syntax highlighting and live preview
- Wikilinks Support - Create interconnected notes with
[[wikilink]]syntax and smart autocomplete - Math Equations - Render beautiful mathematical expressions with MathJax support
- Code Highlighting - Syntax highlighting for code blocks in multiple languages
- Organization & Workflow
- File Tree Navigation - Organized folder structure with intuitive file management
- Multi-Workspace - Manage multiple projects and note collections in one place
- Git Integration - Built-in version control to track changes and collaborate safely
- Customization
- Theme Flexibility - Switch between dark and light modes to match your preference
Prerequisites
- Go 1.23 or later
- Node.js 20 or later
- gcc (for go-sqlite3 package)
Configuration
Lemma is configured using environment variables.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
LEMMA_ADMIN_EMAIL |
Yes | - | Email address for the admin account |
LEMMA_ADMIN_PASSWORD |
Yes | - | Password for the admin account |
LEMMA_ENV |
No | production | Set to "development" to enable development mode |
LEMMA_DB_URL |
No | sqlite://lemma.db |
Database connection string (supports sqlite://, sqlite3://, postgres://, postgresql:// prefixes) |
LEMMA_WORKDIR |
No | ./data |
Working directory for application data |
LEMMA_STATIC_PATH |
No | ../app/dist |
Path to static files |
LEMMA_PORT |
No | 8080 |
Port to run the server on |
LEMMA_DOMAIN |
No | - | Domain name for cookie authentication |
LEMMA_CORS_ORIGINS |
No | - | Comma-separated list of allowed CORS origins |
LEMMA_ENCRYPTION_KEY |
No | auto-generated | Base64-encoded 32-byte key for encrypting sensitive data |
LEMMA_JWT_SIGNING_KEY |
No | auto-generated | Key used for signing JWT tokens |
LEMMA_LOG_LEVEL |
No | DEBUG/INFO* | Logging level (*DEBUG in dev, INFO in production) |
LEMMA_RATE_LIMIT_REQUESTS |
No | 100 |
Number of allowed requests per window |
LEMMA_RATE_LIMIT_WINDOW |
No | 15m |
Duration of the rate limit window |
Security Keys
Security keys (LEMMA_ENCRYPTION_KEY and LEMMA_JWT_SIGNING_KEY) are automatically generated on first startup if not provided. Keys are stored in {LEMMA_WORKDIR}/secrets/.
Important: Back up the secrets directory!
Running the backend server
- Navigate to the
serverdirectory - 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
Running the frontend app
- Navigate to the
appdirectory - Install dependencies:
npm install - Start the development server:
The frontend will be available at
npm starthttp://localhost:3000
Building for production
- Build the frontend app:
cd app npm run build - Build the backend:
cd server go build -o lemma ./cmd/server - Set the
LEMMA_STATIC_PATHenvironment variable to point to the frontend build directory - Run the
lemmaexecutable
Docker Support
A Dockerfile is provided for easy deployment. To build and run the Docker image:
- Build the image:
docker build -t lemma . - Run the container:
docker run -p 8080:8080 -v /path/to/data:/app/data lemma
Upgrading
Before first stable release (1.0.0) there is not upgrade path. You have to delete the database file and start over.
Description
Languages
TypeScript
64.5%
Go
35%
JavaScript
0.2%
SCSS
0.1%
Shell
0.1%
