refactor: streamline README per create-readme skill guidelines
- Use blockquote for tagline - Simplify architecture diagram labels - Remove redundant sections (Setup, Example Config, License) - Keep checklist as primary tracking mechanism - Use tables for features and auth - Reduce verbosity throughout
This commit is contained in:
parent
c6ae37e517
commit
d3f7e9f620
1 changed files with 37 additions and 70 deletions
107
README.md
107
README.md
|
|
@ -1,8 +1,8 @@
|
||||||
# Myst
|
# Myst
|
||||||
|
|
||||||
My stuff, kept private.
|
> My stuff, kept private.
|
||||||
|
|
||||||
Myst is a companion service for Forgejo that lets repo owners create expiring, revocable, read-only share links for private code snapshots.
|
Myst is a companion service for Forgejo that lets repo owners create expiring, revocable, read-only share links for code snapshots.
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
|
@ -10,31 +10,28 @@ Myst is a companion service for Forgejo that lets repo owners create expiring, r
|
||||||
flowchart TB
|
flowchart TB
|
||||||
subgraph VPS["VPS / Self-Hosted"]
|
subgraph VPS["VPS / Self-Hosted"]
|
||||||
subgraph Docker["Docker Network"]
|
subgraph Docker["Docker Network"]
|
||||||
Forgejo["Forgejo<br/>(Git Server)"]
|
Forgejo["Forgejo (Git Server)"]
|
||||||
Postgres["PostgreSQL<br/>(2 Databases)"]
|
Postgres["PostgreSQL (2 Databases)"]
|
||||||
Myst["Myst<br/>(This Service)"]
|
Myst["Myst (This Service)"]
|
||||||
Traefik["Traefik<br/>(Reverse Proxy)"]
|
Traefik["Traefik (Reverse Proxy)"]
|
||||||
end
|
end
|
||||||
|
Tailscale["Tailscale (Admin Access)"]
|
||||||
Tailscale["Tailscale<br/>(Admin Access)"]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph External["External"]
|
subgraph External["External"]
|
||||||
Owner["Repo Owner<br/>(Browser)"]
|
Owner["Repo Owner"]
|
||||||
Viewer["Viewer<br/>(Link Recipient)"]
|
Viewer["Link Recipient"]
|
||||||
end
|
end
|
||||||
|
|
||||||
Owner -->|"Login via Forgejo<br/>Session"| Myst
|
Owner -->|"Login via Forgejo Session"| Myst
|
||||||
Owner -->|"Create View Link<br/>API calls w/ PAT"| Forgejo
|
Owner -->|"Create View Link (PAT)"| Forgejo
|
||||||
Myst -->|"Read-only API<br/>Service Account PAT"| Forgejo
|
Myst -->|"Read-only API (PAT)"| Forgejo
|
||||||
Myst -->|"Store Grants<br/>Own Database"| Postgres
|
Myst -->|"Store Grants"| Postgres
|
||||||
Forgejo -->|"Sessions"| Postgres
|
Forgejo -->|"Sessions"| Postgres
|
||||||
|
Myst -->|"Public Viewer"| Viewer
|
||||||
Myst -->|"Public Viewer<br/>share.example.com"| Viewer
|
Myst -->|"Admin UI (Protected)"| Owner
|
||||||
Myst -->|"Admin UI<br/>admin.example.com<br/>(Protected)"| Owner
|
Tailscale -->|"Private Admin Access"| Myst
|
||||||
|
Traefik -->|"Route HTTPS Traffic"| Myst
|
||||||
Tailscale -->|"Private Admin<br/>Access"| Myst
|
|
||||||
Traefik -->|"Route HTTPS<br/>Traffic"| Myst
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
@ -46,63 +43,51 @@ flowchart TB
|
||||||
| **Private** | Email verification code required | Share with specific individuals |
|
| **Private** | Email verification code required | Share with specific individuals |
|
||||||
| **Public** | No verification, time-expired | Job applications, portfolios |
|
| **Public** | No verification, time-expired | Job applications, portfolios |
|
||||||
|
|
||||||
### Security Model
|
### Security
|
||||||
|
|
||||||
- Share links are **pinned to `commit_sha`** — immutable, not moving branches
|
- Links pinned to immutable `commit_sha` — not moving branches
|
||||||
- **Email-verified links** prevent unauthorized access
|
- Email verification prevents unauthorized access
|
||||||
- **Time-expiration and revocation** give owners control
|
- Time-expiration and revocation give owners control
|
||||||
- **No public repo listing** — anti-scraping by design
|
- No public repo listing — anti-scraping by design
|
||||||
- Admin access protected by **upstream controls** (Tailscale, VPN, Cloudflare Access)
|
- Admin access protected upstream (Tailscale, VPN, Cloudflare Access)
|
||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
Myst uses two mechanisms:
|
| Purpose | Method |
|
||||||
|
|---------|--------|
|
||||||
|
| User Identity | Forgejo Sessions |
|
||||||
|
| Data Access | Service Account PAT |
|
||||||
|
|
||||||
| Purpose | Method | Who |
|
## Quick Start
|
||||||
|---------|--------|-----|
|
|
||||||
| User Identity | Forgejo Sessions | Repo owners log in via Forgejo |
|
|
||||||
| Data Access | Service Account PAT | Myst fetches code from Forgejo API |
|
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
- Forgejo instance (self-hosted or managed)
|
|
||||||
- PostgreSQL database
|
|
||||||
- Domain names for viewer and admin
|
|
||||||
- SMTP server for email verification
|
|
||||||
|
|
||||||
### 1. Run `myst init`
|
### 1. Run `myst init`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# On your VPS, in the deployment directory
|
|
||||||
myst init
|
myst init
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll be prompted for:
|
Prompts for:
|
||||||
|
|
||||||
- Public viewer URL (e.g., `share.example.com`)
|
- Public viewer URL (`share.example.com`)
|
||||||
- Private admin URL (e.g., `admin.example.com`)
|
- Private admin URL (`admin.example.com`)
|
||||||
- Forgejo base URL (e.g., `git.example.com`)
|
- Forgejo base URL (`git.example.com`)
|
||||||
- PostgreSQL connection string
|
- PostgreSQL connection string
|
||||||
- Forgejo service account username and PAT
|
- Forgejo service account username and PAT
|
||||||
- Grant token secret
|
- Grant token secret
|
||||||
|
|
||||||
### 2. Configure Service Account
|
### 2. Configure Service Account
|
||||||
|
|
||||||
Create a dedicated Forgejo user (e.g., `myst-bot`) and generate a PAT with:
|
Create a dedicated Forgejo user (e.g., `myst-bot`) with a PAT:
|
||||||
|
|
||||||
- `read:user`
|
- `read:user`
|
||||||
- `read:repository`
|
- `read:repository`
|
||||||
|
|
||||||
### 3. Deploy
|
### 3. Deploy
|
||||||
|
|
||||||
Deploy the Myst container using Dokploy, Coolify, or your preferred platform.
|
Deploy via Dokploy, Coolify, or your preferred platform.
|
||||||
|
|
||||||
## Example Configuration
|
## Example Configuration
|
||||||
|
|
||||||
### `.env` (generated)
|
|
||||||
|
|
||||||
```env
|
```env
|
||||||
MYST_PUBLIC_URL="https://share.example.com"
|
MYST_PUBLIC_URL="https://share.example.com"
|
||||||
MYST_ADMIN_URL="https://admin.example.com"
|
MYST_ADMIN_URL="https://admin.example.com"
|
||||||
|
|
@ -110,27 +95,14 @@ DATABASE_URL="postgresql://myst:secret@localhost:5432/myst"
|
||||||
FORGEJO_BASE_URL="https://git.example.com"
|
FORGEJO_BASE_URL="https://git.example.com"
|
||||||
FORGEJO_SERVICE_ACCOUNT_USERNAME="myst-bot"
|
FORGEJO_SERVICE_ACCOUNT_USERNAME="myst-bot"
|
||||||
FORGEJO_PAT="fgp_xxxxxxxxxxxxxxxxxxxx"
|
FORGEJO_PAT="fgp_xxxxxxxxxxxxxxxxxxxx"
|
||||||
GRANT_TOKEN_SECRET="generate-or-paste-a-secret"
|
GRANT_TOKEN_SECRET="your-secret-here"
|
||||||
```
|
```
|
||||||
|
|
||||||
### `myst.config.json` (generated)
|
## Phase 1 Progress
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"publicUrl": "https://share.example.com",
|
|
||||||
"adminUrl": "https://admin.example.com",
|
|
||||||
"forgejoBaseUrl": "https://git.example.com",
|
|
||||||
"forgejoServiceAccountUsername": "myst-bot"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Phase 1 Checklist
|
|
||||||
|
|
||||||
- [x] Project renamed from Embargo to Myst
|
- [x] Project renamed from Embargo to Myst
|
||||||
- [x] CLI scaffold (`myst init`)
|
- [x] CLI scaffold (`myst init`)
|
||||||
- [x] Config generation (`.env`, `myst.config.json`)
|
- [x] Config generation (`.env`, `myst.config.json`)
|
||||||
- [x] URL validation and normalization
|
|
||||||
- [x] Docker Compose generator removed (out of scope)
|
|
||||||
- [ ] `myst forgejo bootstrap` — verify Forgejo connectivity
|
- [ ] `myst forgejo bootstrap` — verify Forgejo connectivity
|
||||||
- [ ] `myst doctor` — validate configuration
|
- [ ] `myst doctor` — validate configuration
|
||||||
- [ ] `myst config print` — show current config
|
- [ ] `myst config print` — show current config
|
||||||
|
|
@ -144,13 +116,8 @@ GRANT_TOKEN_SECRET="generate-or-paste-a-secret"
|
||||||
- [ ] SMTP configuration UI
|
- [ ] SMTP configuration UI
|
||||||
- [ ] Access logs
|
- [ ] Access logs
|
||||||
|
|
||||||
## Links
|
## Resources
|
||||||
|
|
||||||
- [Forgejo Docs](https://forgejo.org/docs/)
|
- [Forgejo Docs](https://forgejo.org/docs/)
|
||||||
- [API Usage](https://forgejo.org/docs/latest/user/api-usage/)
|
- [API Usage](https://forgejo.org/docs/latest/user/api-usage/)
|
||||||
- [Token Scopes](https://forgejo.org/docs/latest/user/token-scope/)
|
- [Token Scopes](https://forgejo.org/docs/latest/user/token-scope/)
|
||||||
- [Repo Permissions](https://forgejo.org/docs/latest/user/repo-permissions/)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Apache 2.0
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue