Every eventhog.cc Signup Gets Its Own Private Team
One Worker now hosts many teams. A signup starts a team of its own and invites teammates with add_person; Edviro's data stays where it was.
Why Care?
The eventhog.cc desk points at Edviro's Worker, so a signup used to join Edviro's workspace, and add_person could only add people to Edviro. Now a signup gets a private team: its own events, contacts, slides and database, which no other team on the server can see.
What's New?
SELF_SERVE: "teams". A fresh landing-page key starts a new team, and that person is its admin.whoamiandget_startedsay which team you're in."open"still joins the home team, and unset is still invite-only.Invites stay in the inviter's team.
add_personmakes a connector on the inviter's team. Someone who already has a team of their own gets a second URL; both keep working and nothing is merged.Edviro is the home team, untouched: same database, same repos, same media, and
enrich_peoplestill on. Teams can't useenrich_people(it spends Edviro's context.dev credits); the tool tells them how to deploy their own.delete_team, for admins on the home team only: lists teams, shows what deleting one would remove, and withconfirmerases its repos, files and database and locks its connectors out.Limits: 20 events and 25 connectors per team, and at most 50 new teams a day (
MAX_NEW_TEAMS_PER_DAY).The
PEOPLEsecret is retired on Edviro's deployment: its three people were copied intoconnector_people(key hashes only) and the secret deleted. The code still readsPEOPLEif one is set.
Under the Hood
Each team runs in its own SQLite-backed Durable Object (
Team,src/team-do.ts). The Worker resolves the key in D1, then hands the team's whole MCP call, capture post or upload to that object in one RPC. The object runs the same handlers with a scoped env:CRMis a D1-shaped adapter over its own SQLite (CRM migrations applied in the constructor), repos aretm-<id>-*, the kit istm-<id>-kit(bundled until first write), and media goes underteams/<id>/.open()andrepoFor()refuse repos outside the caller's team; home refusestm-names.list_eventslists a team's ownevent_instances, and home skipstm-repos.0011_teams.sqladdsteamsandteam_id,adminand profile columns onconnector_people.query_crmrefusesteamsas well as the key tables.src/worker.tsis the new entry module. Once a Durable Object class is exported, workerd rejects named exports that aren't handlers, such asCONTACTS_CSVfromindex.ts. This also fixeswrangler dev.scripts/isolation-test.mjs: two teams with the same event slug, 52 checks, ending withdelete_team. It passed locally and on production.
