docs: Bring all documentation up to date for v2.10.1

- architecture/: overview, technology stack, auth (OIDC + built-in
  IndieAuth), syndication (POSSE) rewritten; new database.md,
  deployment.md and indieweb-protocols.md; legacy stack marked historical
- decisions/: reconstructed ADR-060 and ADR-063; 31 status corrections
  (superseded auth ADRs, proposed -> accepted); INDEX rebuilt
- design/: reconstructed the v1.6.0 documents the webmention code cites;
  reports for 18 v2 releases without a design folder; INDEX rebuilt
- projectplan/: BACKLOG rewritten (shipped items removed, open issues from
  the reviews added); RELEASE.md for v2.0.0-v2.10.1; INDEX
- standards/: development setup (uv, tests, DEV_MODE), testing (CI test
  stage), git and release flow, versioning, coding standards, cookies
- README, CLAUDE.md, .env.example (every setting the code reads, with
  defaults) brought up to date
- 137 broken links repaired (old absolute paths, moved files); stale ADR
  references in code comments corrected (comments only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-03 12:40:19 -07:00
1 parent fa551de197
commit 0716984958
143 files changed
+6222 -8660

No files matched your search

+92 -183
View File
@@ -1,207 +1,116 @@
# StarPunk
A minimal, self-hosted IndieWeb CMS for publishing notes with RSS syndication.
**Current Version**: 1.2.0
## Versioning
StarPunk follows [Semantic Versioning 2.0.0](https://semver.org/):
- Version format: `MAJOR.MINOR.PATCH`
- Current: `1.2.0` (stable release)
- Check version: `python -c "from starpunk import __version__; print(__version__)"`
- See changes: [CHANGELOG.md](CHANGELOG.md)
- Versioning strategy: [docs/standards/versioning-strategy.md](docs/standards/versioning-strategy.md)
## Philosophy
A minimal, self-hosted, single-user IndieWeb site for publishing notes.
Flask, SQLite and markdown files; one container.
"Every line of code must justify its existence. When in doubt, leave it out."
StarPunk is designed for a single user who wants to:
- Publish short notes to their personal website
- Own their content (notes stored as portable markdown files)
- Syndicate via RSS
- Support IndieWeb standards (Micropub, IndieAuth)
- Run on minimal resources
The current version is in [`starpunk/__init__.py`](starpunk/__init__.py);
what changed in each release is in [CHANGELOG.md](CHANGELOG.md).
## Features
- **File-based storage**: Notes are markdown files, owned by you
- **OIDC admin login**: Sign in through your identity provider (e.g. Pocket ID)
- **Built-in IndieAuth server**: Approve Micropub apps without a separate auth service
- **Micropub support**: Full W3C Micropub specification compliance
- **Media attachments**: Upload and display images with your notes
- **Microformats2**: Full h-entry, h-card, and h-feed markup for IndieWeb compatibility
- **Author discovery**: Automatic profile discovery from your IndieWeb identity
- **RSS, ATOM, JSON Feed**: Multiple syndication formats with Media RSS support
- **Custom slugs**: Control your note permalinks
- **No database lock-in**: SQLite for metadata, files for content
- **Self-hostable**: Run on your own server
- **Minimal dependencies**: Core dependencies, no build tools
**Publishing**
- Notes in markdown, stored as plain files with metadata in SQLite
- Admin editor with drafts, custom slugs, tags and photo uploads
(resized variants, HEIC/MPO converted to JPEG, captions)
- Post types: notes, titled posts, replies, likes, reposts and bookmarks
- Full-text search (SQLite FTS5) and tag pages
## Requirements
**IndieWeb**
- [Micropub](https://www.w3.org/TR/micropub/): create, update, delete and
undelete; media endpoint; `q=config`, `source`, `syndicate-to`, `category`
- Built-in [IndieAuth](https://indieauth.spec.indieweb.org/) server for
Micropub apps (consent screen, tokens, revocation, Connected Apps page)
- Admin login through any OpenID Connect provider (e.g. Pocket ID)
- [Webmention](https://www.w3.org/TR/webmention/): receiving (verified,
moderated, rate-limited) and sending; replies, likes and reposts shown on
each note
- [WebSub](https://www.w3.org/TR/websub/) with a built-in hub, so readers get
new posts within seconds
- [Microformats2](https://microformats.org/wiki/h-entry): h-entry, h-feed and
an h-card discovered from your own site
- Python 3.11 or higher
- 500MB disk space
- Linux, macOS, or Windows with WSL2
**Syndication**
- Feeds: RSS 2.0 (with Media RSS), Atom 1.0, JSON Feed 1.1, content
negotiation at `/feed`, OPML export; tag pages and the likes page are
h-feeds readers can follow
- POSSE crossposting to GoToSocial/Mastodon, Bluesky and Threads, with
`u-syndication` links back; edits and deletes follow, native likes and
boosts where the target supports them
## Quick Start
**Operations**
- Migrations applied automatically at startup
- `/health` endpoint, admin metrics dashboard, structured logs
- Fetches of user-supplied URLs are limited to public addresses, size and
time
## Quick start
### Container
```bash
# Clone repository
git clone https://github.com/YOUR_USERNAME/starpunk.git
cd starpunk
# Install uv (package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment
uv venv .venv --python 3.11
# Install dependencies
uv pip install -r requirements.txt
# Configure
cp .env.example .env
# Edit .env and set ADMIN_ME, SESSION_SECRET and the OIDC_* values
# Initialize database
mkdir -p data/notes
.venv/bin/python -c "from starpunk.database import init_db; init_db()"
# Note: Database also auto-initializes on first run if not present
# Run development server
.venv/bin/flask --app app.py run --debug
# Visit http://localhost:5000
git clone https://git.thesatelliteoflove.com/phil/StarPunk.git && cd StarPunk
cp .env.example .env # set SITE_URL, ADMIN_ME, SESSION_SECRET, OIDC_*
docker build -t starpunk -f Containerfile .
docker run -d --name starpunk -p 127.0.0.1:8000:8000 --env-file .env \
-e FLASK_ENV=production -e FLASK_DEBUG=0 \
-v ./starpunk-data:/data starpunk
```
The container runs as UID 1000, so the data directory must be writable by
it. Release images are published by CI as
`git.thesatelliteoflove.com/phil/starpunk:vX.Y.Z`. Put a reverse proxy
with HTTPS in front (see `Caddyfile.example` or `nginx.conf.example`) and
set `TRUSTED_PROXY=true`. Register `<SITE_URL>/auth/callback` as the
redirect URI with your OIDC provider. Details:
[docs/architecture/deployment.md](docs/architecture/deployment.md).
### Local development
```bash
uv venv --python 3.11
uv pip install -r requirements-dev.txt
cp .env.example .env # set SESSION_SECRET; add DEV_MODE=true and DEV_ADMIN_ME
uv run flask --app app.py run --debug # http://localhost:5000
SESSION_SECRET=test uv run pytest # tests (about 6 minutes)
```
With `DEV_MODE=true`, `/dev/login` logs you in without OIDC. Never enable
it on a public server. Full guide:
[docs/standards/development-setup.md](docs/standards/development-setup.md).
## Configuration
All configuration is in the `.env` file. Required settings:
All settings are environment variables (or a `.env` file), each listed with
its default in [`.env.example`](.env.example). Required in production:
`SESSION_SECRET`, `SITE_URL`, `ADMIN_ME`, `OIDC_ISSUER`, `OIDC_CLIENT_ID`,
`OIDC_CLIENT_SECRET` and `OIDC_ADMIN_SUB`. Crossposting is enabled by
setting a target's credentials.
- `ADMIN_ME` - Your IndieWeb identity URL (e.g., https://yoursite.com)
- `SESSION_SECRET` - Random secret key (generate with `python3 -c "import secrets; print(secrets.token_hex(32))"`)
- `SITE_URL` - Public URL of your site
- `OIDC_ISSUER`, `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET` - OIDC client for admin login (callback: `<SITE_URL>/auth/callback`)
- `OIDC_ADMIN_SUB` - Subject ID of the one account allowed to log in
## Data and backups
See `.env.example` for all options.
Everything lives in the data directory (`/data` in the container): the
SQLite database, note files in `notes/`, uploaded media and logs. Back it
up regularly, and always before upgrading to a release with a migration.
## Project Structure
## Documentation
```
starpunk/
├── app.py # Application entry point
├── starpunk/ # Application code
├── data/ # Your notes and database (gitignored)
│ ├── notes/ # Markdown files
│ └── starpunk.db # SQLite database
├── static/ # CSS and JavaScript
├── templates/ # HTML templates
└── tests/ # Test suite
```
## Usage
### Publishing Notes
**Via Web Interface**:
1. Navigate to `/admin`
2. Login with your IndieWeb identity
3. Create notes in markdown
**Via Micropub Client**:
1. Configure client with your site URL
2. Sign in with your OIDC provider
3. Publish from any Micropub-compatible app
### Backing Up Your Data
Your notes are stored as plain markdown files in `data/notes/`. Back up this directory:
```bash
# Simple backup
tar -czf backup.tar.gz data/
# Or use rsync
rsync -av data/ /backup/starpunk/
```
## Development
See [docs/standards/development-setup.md](docs/standards/development-setup.md) for detailed setup.
```bash
# Install dev dependencies
uv pip install -r requirements-dev.txt
# Run tests
.venv/bin/pytest
# Format code
.venv/bin/black starpunk/ tests/
# Lint
.venv/bin/flake8 starpunk/ tests/
```
## Architecture
StarPunk uses a hybrid storage approach:
- **Notes content**: Markdown files (portable, human-readable)
- **Metadata**: SQLite database (fast queries)
This gives you both portability AND performance.
See [docs/architecture/](docs/architecture/) for complete documentation.
## IndieWeb Compliance
StarPunk implements:
- [Micropub](https://micropub.spec.indieweb.org/) - Publishing API
- [IndieAuth](https://www.w3.org/TR/indieauth/) - Authentication
- [Microformats2](http://microformats.org/) - h-entry, h-card, h-feed markup
- [RSS 2.0](https://www.rssboard.org/rss-specification) with Media RSS extensions
- [ATOM 1.0](https://validator.w3.org/feed/docs/atom.html) - Syndication format
- [JSON Feed 1.1](https://jsonfeed.org/version/1.1) - Modern feed format
## Deployment
### Production Setup
```bash
# Install gunicorn
uv pip install gunicorn
# Run with gunicorn
.venv/bin/gunicorn -w 4 -b 127.0.0.1:8000 app:app
# Configure nginx/Caddy for HTTPS
# Set up systemd for process management
# Enable regular backups of data/ directory
```
See [docs/standards/deployment-standards.md](docs/standards/deployment-standards.md) for details.
| Topic | Where |
|---|---|
| How the docs are organized | [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) |
| System overview | [docs/architecture/overview.md](docs/architecture/overview.md) |
| Technology stack | [docs/architecture/technology-stack.md](docs/architecture/technology-stack.md) |
| Database and migrations | [docs/architecture/database.md](docs/architecture/database.md) |
| Deployment | [docs/architecture/deployment.md](docs/architecture/deployment.md) |
| Authentication (OIDC, IndieAuth) | [docs/architecture/simplified-auth-architecture.md](docs/architecture/simplified-auth-architecture.md) |
| IndieWeb protocols | [docs/architecture/indieweb-protocols.md](docs/architecture/indieweb-protocols.md) |
| Feeds and crossposting | [docs/architecture/syndication-architecture.md](docs/architecture/syndication-architecture.md) |
| Decisions (ADRs) | [docs/decisions/INDEX.md](docs/decisions/INDEX.md) |
| Per-release designs and reports | [docs/design/](docs/design/) |
| Backlog | [docs/projectplan/BACKLOG.md](docs/projectplan/BACKLOG.md) |
| Development standards and release process | [docs/standards/INDEX.md](docs/standards/INDEX.md) |
## License
MIT License - see LICENSE file
## Credits
Built with:
- [Flask](https://flask.palletsprojects.com/) - Web framework
- [python-markdown](https://python-markdown.github.io/) - Markdown processing
- [feedgen](https://feedgen.kiesow.be/) - RSS generation
- [httpx](https://www.python-httpx.org/) - HTTP client
## Contributing
This is a personal project optimized for single-user use. If you want additional features, consider forking!
## Support
- Documentation: [docs/](docs/)
- Issues: GitHub Issues
- IndieWeb: [indieweb.org](https://indieweb.org/)
MIT, see [LICENSE](LICENSE).