No description
Find a file
2026-04-02 18:11:10 -04:00
docs/plans Merge origin/docs/readme into phase1-cli-init-skeleton 2026-04-02 18:07:28 -04:00
packages cleanup: remove app-ini generator (Forgejo provisioning out of scope) 2026-04-02 18:11:10 -04:00
.gitignore Add CLI scaffold and config generators 2026-03-30 16:34:35 -04:00
package.json refactor: rename Myst and narrow CLI setup flow 2026-04-01 14:12:56 -04:00
pnpm-lock.yaml refactor: rename Myst and narrow CLI setup flow 2026-04-01 14:12:56 -04:00
pnpm-workspace.yaml Bootstrap pnpm monorepo workspace 2026-03-30 16:32:04 -04:00
README.md Merge origin/docs/readme into phase1-cli-init-skeleton 2026-04-02 18:07:28 -04:00
tsconfig.base.json refactor: rename Myst and narrow CLI setup flow 2026-04-01 14:12:56 -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.

Architecture

flowchart TB
    subgraph VPS["VPS / Self-Hosted"]
        subgraph Docker["Docker Network"]
            Forgejo["Forgejo (Git Server)"]
            Postgres["PostgreSQL (2 Databases)"]
            Myst["Myst (This Service)"]
            Traefik["Traefik (Reverse Proxy)"]
        end
        Tailscale["Tailscale (Admin Access)"]
    end

    subgraph External["External"]
        Owner["Repo Owner"]
        Viewer["Link Recipient"]
    end

    Owner -->|"Login via Forgejo Session"| Myst
    Owner -->|"Create View Link (PAT)"| Forgejo
    Myst -->|"Read-only API (PAT)"| Forgejo
    Myst -->|"Store Grants"| Postgres
    Forgejo -->|"Sessions"| Postgres
    Myst -->|"Public Viewer"| Viewer
    Myst -->|"Admin UI (Protected)"| Owner
    Tailscale -->|"Private Admin Access"| Myst
    Traefik -->|"Route HTTPS Traffic"| Myst

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 Service Account 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 init

myst init

Prompts for:

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

2. Configure Service Account

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

  • read:user
  • read:repository

3. Deploy

Deploy via Dokploy, Coolify, or your preferred platform.

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_SERVICE_ACCOUNT_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 init)
  • Config generation (.env, myst.config.json)
  • Service foundation (FastAPI + PostgreSQL)
  • myst forgejo bootstrap — verify Forgejo connectivity
  • myst doctor — validate configuration
  • myst config print — show current config
  • Forgejo session authentication
  • Repo ownership verification
  • Private link creation (email-verified)
  • Public link creation (time-expired)
  • Web-based code viewer (Jinja2 + HTMX)
  • User dashboard
  • SMTP configuration UI
  • Access logs

Resources