📈 GH Trending Explorer 🎲 Surprise me

← all repos

joelhooks / potion-calendar

git clone https://github.com/joelhooks/potion-calendar.git

🧪 Potion Calendar: a clean-room Google Calendar app. Effect 4, Alchemy and Foldkit on Cloudflare Workers.

+1
stars, 24h · #23,337
+27
stars, 7 days · #6,624
+27
stars, 30 days · #21,528
27
★ total · +27% this week
1
forks · 0 open issues

Star history (as recorded here)

2026-10-21 · 26 ★ 2026-10-23 · 27 ★
LanguageTypeScript
LicenseMIT
Created2026-10-20 (3d ago)
Last pushtoday
Watchers0
OwnerUser

Links

README excerpt
# 🧪 Potion Calendar
A personal Google Calendar app for Joel: one week view over every linked Google account, behind an allowlisted Google sign-in. Calendar behavior comes from the read-only `spec/` corpus.
The screenshot is the development build against the in-process Google fake. The accounts and events are fixtures.
## Run locally
 [code] 
Development runs the actual Worker, D1 migrations, and per-person Durable Objects in Miniflare. An in-process Google fake checks state, one-use codes, callback URLs, and PKCE. Outbound requests terminate in that fake; no live Google connection or application secrets are needed.
The first session starts with `joel@example.test` and linked `second@example.test`. Each account has two calendars. Sign out to exercise sign-in again. Use **Add Google account** to link an account, or choose `refused@example.test` to exercise refusal. D1 and Durable Object data reset when the dev server restarts.
`portless list` shows the named route for this checkout. If no shared proxy is running, use the loopback-only fallback:
 [code] 
Do not start or reconfigure a shared proxy just to run this checkout. Client HMR stays enabled. Restart `pnpm dev` after changing server code, development adapters, or SQL migrations; the Worker bundle is built once at startup.
### Simulate an external Google change
Open the signed-in calendar first so its live connection registers Google watches. Send this request to the same development origin printed by Vite, or to its existing Portless route:
 [code] 
The fake patches its provider event, then sends a Google-shaped notification through `/google/push`. The real Durable Object drains the job and publishes a calendar invalidation after the cursor/version commit. The response reports accepted notifications and HTTP statuses. Expect `{"delivered":1,"statuses":[200]}` once watches are registered. This endpoint exists only in development.
## What is in the stack
| Component | Pin |
| ---------------------------- | ---------------- |
| Node | `>=24.18.0` |
| pnpm | `11.3.0` |
| Effect and platform packages | `4.0.0` |
| XState | `6.0.0-alpha.69` |
| `@xstate/effect` | `1.0.0-alpha.8` |
| Alchemy | `2.0.0-beta.83` |
| Better Auth | `1.6.2` |
| Foldkit | `0.167.0` |
| TypeScript | `7.0.2` |
| `@effect/tsgo` | `0.51.1` |
| Oxlint | `1.88.0` |
| Oxfmt | `0.68.0` |
| Ultracite | `7.12.0` |
| Turborepo | `2.11.2` |
| varlock | `1.23.0` |
Dependencies stay exact. The compiler, typed lint, behavioral tests, and Git hooks form the fence.
## Modules
| Path | Job |
| --- | --- |
| `apps/web` | Foldkit account shell and its single Worker |
| `apps/infra` | `Calendar` Alchemy Stack, production stage `CalendarProd` |
| `packages/core` | Shared session contract and fence tests |
| `packages/auth` | Google OAuth, allowlist, encrypted tokens, person-scoped token adapter, dev-only fakes |
| `packages/database` | D1 migrations and database ports |
| `packages/capability` | Contracts and their projections |
| `packages/devt