No description
Find a file
dependabot[bot] b04d7475ad
build(deps): bump idna in /web in the uv group across 1 directory (#13)
Bumps the uv group with 1 update in the /web directory: [idna](https://github.com/kjd/idna).


Updates `idna` from 3.11 to 3.15
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
  dependency-group: uv
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-26 22:50:49 -04:00
.vscode [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
.zed [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
docs [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
examples Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -04:00
packages feat(web): OAuth CSRF protection, refactor, and cleanup (#11) 2026-05-15 15:18:52 -04:00
web build(deps): bump idna in /web in the uv group across 1 directory (#13) 2026-05-26 22:50:49 -04:00
.dockerignore Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -04:00
.gitignore [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
agents.md [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
docker-compose.yml [codex] Update boilerplate UI design system (#12) 2026-05-26 22:50:25 -04:00
Dockerfile refactor(cli): restructure CLI with new command router and merge verify/doctor (#7) 2026-04-13 14:29:29 -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 feat(web): OAuth CSRF protection, refactor, and cleanup (#11) 2026-05-15 15:18:52 -04:00
tsconfig.base.json refactor(cli): restructure CLI with new command router and merge verify/doctor (#7) 2026-04-13 14:29:29 -04:00
tsconfig.json Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -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:

  • Forgejo API URL — Docker: http://forgejo:3000, bare metal: http://localhost:3000, cross-host: https://git.example.com
  • Forgejo PAT (with read:user and read:repository scopes)

2. Deploy with Docker Compose

cp examples/.env.example .env
# Edit .env with your FORGEJO_BASE_URL and FORGEJO_PAT
docker compose up -d

The DATABASE_URL is injected automatically by Docker Compose.

3. Alternative Deployments

For non-Docker deployments, you must supply DATABASE_URL yourself:

  • 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

Create a .env file with:

# Docker (same Compose network):
FORGEJO_BASE_URL=http://forgejo:3000
# Bare metal / non-container:
# FORGEJO_BASE_URL=http://localhost:3000
# Cross-host:
# FORGEJO_BASE_URL=https://git.example.com
FORGEJO_PAT=forgejo_pat_xxxxxxxxxxxx

When using the provided Docker Compose example, DATABASE_URL is injected automatically. For other deployment approaches (e.g., bare metal, Kubernetes), you must supply DATABASE_URL yourself.

4. Register an OAuth application in Forgejo

The web service authenticates users via Forgejo OAuth. You need to register Myst as an OAuth consumer:

  1. In Forgejo, go to Settings → Applications → Create OAuth2 Application

  2. Set the redirect URI to https://your-myst-domain.com/auth/callback/forgejo (or http://localhost:8000/auth/callback/forgejo for local dev)

  3. Copy the Client ID and Client Secret Forgejo gives you

  4. Generate a Fernet encryption key for OAuth token storage:

    python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
    
  5. Add these to your .env:

    FORGEJO_OAUTH_CLIENT_ID=your_client_id
    FORGEJO_OAUTH_CLIENT_SECRET=your_client_secret
    OAUTH_TOKEN_ENCRYPTION_KEY=your_fernet_key_from_step_4
    MYST_PUBLIC_BASE_URL=https://your-myst-domain.com  # omit trailing slash; omit for local dev
    

    MYST_PUBLIC_BASE_URL is used as the OAuth redirect URI base. In local development, the redirect URI is inferred from the request (Default: http://localhost:8000/auth/callback/forgejo). In production, set this to your public Myst domain.

Phase 1 Progress

  • Project renamed from Embargo to Myst
  • CLI scaffold (myst config init)
  • Config generation (.env)
  • Service foundation (FastAPI + PostgreSQL)
  • myst config verify — verify Forgejo connectivity
  • myst config verify --diagnostic — comprehensive diagnostics
  • 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