No description
Find a file
2026-04-12 23:06:17 -04:00
docs remove myst.config.json generation, rely on .env for container deployments 2026-04-08 14:52:11 -04:00
packages refactor(verify): simplify by extracting functions and removing duplication 2026-04-12 23:06:17 -04:00
.dockerignore feat(cli): add config print, verify, and doctor commands for config validation 2026-04-09 20:40:55 -04:00
.gitignore Phase 1: CLI init skeleton and deployment plan (#5) 2026-04-07 13:27:19 -04:00
Dockerfile feat(cli): add config print, verify, and doctor commands for config validation 2026-04-09 20:40:55 -04:00
package.json Phase 1: CLI init skeleton and deployment plan (#5) 2026-04-07 13:27:19 -04:00
pnpm-lock.yaml Phase 1: CLI init skeleton and deployment plan (#5) 2026-04-07 13:27:19 -04:00
pnpm-workspace.yaml Bootstrap pnpm monorepo workspace 2026-03-30 16:32:04 -04:00
README.md docs: update README with current CLI commands 2026-04-12 18:19:55 -04:00
tsconfig.base.json Phase 1: CLI init skeleton and deployment plan (#5) 2026-04-07 13:27:19 -04:00
tsconfig.json Bootstrap pnpm monorepo workspace 2026-03-30 16:32:04 -04:00

Myst

My stuff, kept private.

Myst is a companion service for Forgejo that lets repo owners create expiring, revocable, read-only share links for code snapshots.

System Diagram

This diagram shows how traffic moves through the public internet, the VPS or self-hosted server, the host firewall, the platform router, Myst, Forgejo, and Postgres.

Myst system routing diagram

Click the diagram to open the full-size SVG.

Features

Type Verification Use Case
Private Email verification code required Share with specific individuals
Public No verification, time-expired Job applications, portfolios

Security

  • Links pinned to immutable commit_sha — not moving branches
  • Email verification prevents unauthorized access
  • Time-expiration and revocation give owners control
  • No public repo listing — anti-scraping by design
  • Admin access protected upstream (Tailscale, VPN, Cloudflare Access)

Authentication

Purpose Method
User Identity Forgejo Sessions
Data Access Dedicated Forgejo User PAT

Tech Stack

  • Backend: Python + FastAPI
  • Frontend: Jinja2 templates + HTMX (no build step)
  • Database: PostgreSQL

HTMX provides interactivity (filtering, form submissions) with minimal JavaScript. Jinja2 handles server-side rendering for fast page loads.

Quick Start

1. Run myst config init

myst config init

Prompts for:

  • Public viewer URL (share.example.com)
  • Private admin URL (admin.example.com)
  • Forgejo base URL (git.example.com)
  • PostgreSQL connection string
  • Dedicated Forgejo username and PAT
  • Grant token secret

2. Configure Dedicated Forgejo User

Create a dedicated Forgejo user (e.g., myst-bot) with a PAT:

  • read:user
  • read:repository

3. Deploy

Deploy Myst anywhere you can run a normal web app beside Forgejo. Phase 1 should explicitly support both of these examples:

  • VPS deployment: Hostinger or another VPS with Dokploy, Traefik, UFW, Myst, Forgejo, and a shared Postgres instance that contains separate forgejo and myst databases.
  • Self-hosted server deployment: a home server, mini PC, NAS, or other self-hosted Linux machine running Myst with Docker, Podman, Docker Compose, Coolify, Caddy, Nginx, or another reverse proxy.

Myst should not assume a VPS-only environment. The requirement is an existing Forgejo instance, Myst's own database, and a way to route the public and admin hostnames to the Myst app.

Example Configuration

MYST_PUBLIC_URL="https://share.example.com"
MYST_ADMIN_URL="https://admin.example.com"
DATABASE_URL="postgresql://myst:secret@localhost:5432/myst"
FORGEJO_BASE_URL="https://git.example.com"
FORGEJO_BOT_USERNAME="myst-bot"
FORGEJO_PAT="fgp_xxxxxxxxxxxxxxxxxxxx"
GRANT_TOKEN_SECRET="your-secret-here"

Phase 1 Progress

  • Project renamed from Embargo to Myst
  • CLI scaffold (myst config init)
  • Config generation (.env)
  • Service foundation (FastAPI + PostgreSQL)
  • myst verify — verify Forgejo connectivity
  • myst verify --diagnostic — validate configuration
  • myst config view — show current config
  • Forgejo session authentication
  • Repo ownership verification
  • Private link creation (email-verified)
  • Public link creation (time-expired)
  • Web-based code viewer
  • User dashboard
  • SMTP configuration UI
  • Access logs

Resources