You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Updating a page meant deleting it and re-creating it under the same name. Add PUT /api/pages/:slug, which replaces an existing page's content while keeping its URL, owner, trust flag, and created_at. Authorized to owner-or-admin (core::origin::can_replace, same rule as delete) *and* can_upload, so a revoked uploader can't keep pushing content to pages they already own. The replace can't roll back the way create does — R2 has no multi-object transaction and the previous bytes aren't retained — so the ordering bounds the damage instead: new objects are written before any old key is deleted (a viewer mid-update sees old-or-new per file, never a blank page), stale keys are pruned last and best-effort (a failure only orphans an object), and the D1 stats are refreshed only once R2 succeeds. Design §4.6b covers the reasoning; §5's "no page overwrite" scope cut is retired. In the UI, the always-visible upload card becomes a modal driven by two entry points: "+ New Page" (create) and a per-row "Update" (replace, with the slug pre-filled and read-only). Verified end to end against wrangler dev with local D1/R2 — create, serve, replace, stale assets pruned, stats/trust/ownership preserved, plus the 401/403/404/400/413 paths — and the UI driven in jsdom (37 assertions). 152 unit + 19 doctests, both-target clippy clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
1 week ago | |
|---|---|---|
| .beans | 4 months ago | |
| .claude | 4 months ago | |
| .gitea/workflows | 4 months ago | |
| edu | 4 months ago | |
| pages | 1 week ago | |
| quotesdb | 4 months ago | |
| scripts | 4 months ago | |
| .beans.yml | 4 months ago | |
| .envrc | 5 months ago | |
| .gitattributes | 5 months ago | |
| .gitignore | 5 months ago | |
| CLAUDE.md | 4 months ago | |
| LICENSE-APACHE | 5 months ago | |
| LICENSE-MIT | 5 months ago | |
| PROJECTS.md | 4 months ago | |
| README.md | 1 week ago | |
| TODO.md | 5 months ago | |
| flake.lock | 4 months ago | |
| flake.nix | 4 months ago | |
README.md
Vibed
A mono-repo of CLI tools and self-contained HTTP web services built in Rust, targeting Cloudflare's edge platform.
- Backend services run on Cloudflare Workers (via workers-rs + Axum).
- Frontend applications compile to Wasm with Yew and deploy to Cloudflare Pages.
- Data is stored in Cloudflare D1 (SQLite-compatible), with Turso for local development.
- Infrastructure is managed with OpenTofu and the Cloudflare provider.
Services
| Service | Description |
|---|---|
common |
Shared library crate — types, utilities, and definitions used across services |
pages |
Micro static-site host at pages.elijah.run — upload an .html/.zip, served sandboxed at /<name>/ (Cloudflare Workers + R2 + D1, Rust→wasm, GitHub OAuth) |
Services will be listed here as they are added.
Getting Started
Prerequisites
- Nix with Flakes enabled
Setup
# Clone the repository
git clone https://gitea.elijah.run/pop/vibed.git
cd vibed
# Enter the dev shell (installs Rust, Trunk, OpenTofu, wrangler, etc.)
nix develop
The dev shell provides everything needed to build, test, and deploy all services.
Running a Service
# Backend
cd <service>
cargo run
# Frontend
cd <service>
trunk serve
Validation
Run from within a service directory, in order:
cargo fmt # formatting
cargo check # compilation
cargo clippy # lints
cargo test # tests
Repository Layout
vibed/
├── CLAUDE.md # conventions and instructions for Claude Code
├── README.md # this file
├── LICENSE-APACHE
├── LICENSE-MIT
├── flake.nix # base Nix flake
├── common/ # shared library crate
└── <service>/ # each service is an independent Rust crate
├── src/
├── tests/ # integration tests
├── docs/ # PLANNING.md, ARCHITECTURE.md
└── infra/ # OpenTofu infrastructure
See CLAUDE.md for full conventions, code style, and project documentation requirements.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Disclaimer
This software is developed with the assistance of Claude Code by Anthropic.