chore: integrate firestore for particles (#32)

* plumb for firestore

* chore: cleanup orion api to only include essentials

* setup boilerplate for data and rendering

This includes zod types creation for API response validation, and
exploration of path based resolution of rendering particles.

* chore: structure container particles for rendering children

* wire firestore crud for particles

* integrate visibility to particles

* docs: explain particle view resolver
This commit was merged in pull request #32.
This commit is contained in:
Arjun Patel
2026-03-17 19:52:31 -07:00
committed by GitHub
parent 377537b892
commit 51857bed63
25 changed files with 1585 additions and 2372 deletions
+1 -24
View File
@@ -106,37 +106,14 @@ func main() {
mux.Handle("POST /auth/sign-out", withAuth(h.SignOut))
mux.Handle("GET /auth/me", withAuth(h.GetCurrentHuman))
// Bootstrap startup data
mux.Handle("GET /startup", withAuth(h.StartupData))
// Networks
mux.Handle("POST /networks", withAuth(h.CreateNetwork))
mux.Handle("GET /networks", withAuth(h.ListNetworks))
mux.Handle("GET /networks/{id}", withAuth(h.GetNetwork))
mux.Handle("POST /networks/{id}/members", withAuth(h.AddMembersToNetwork))
// TODO: what about members who are part of streams visibility within this network?
mux.Handle("DELETE /networks/{id}/members/{email}", withAuth(h.RemoveMemberFromNetwork))
mux.Handle("PUT /networks/{id}/capacity", withAuth(h.SetOpenStreamCapacity))
// Streams
mux.Handle("POST /networks/{network_id}/streams", withAuth(h.CreateStream))
mux.Handle("GET /streams/{id}", withAuth(h.GetStream))
mux.Handle("PATCH /streams/{id}", withAuth(h.UpdateStream))
mux.Handle("POST /streams/{id}/particles", withAuth(h.CreateStreamParticle))
mux.Handle("POST /streams/{id}/open", withAuth(h.OpenStream))
mux.Handle("POST /streams/{id}/close", withAuth(h.CloseStream))
mux.Handle("POST /streams/{id}/members", withAuth(h.AddMembers))
mux.Handle("DELETE /streams/{id}/members", withAuth(h.RemoveMembers))
// Particles
mux.Handle("GET /networks/{network_id}/particles", withAuth(h.ListParticles))
mux.Handle("GET /particles/{id}", withAuth(h.GetParticle))
mux.Handle("PATCH /particles/{id}", withAuth(h.UpdateParticle))
mux.Handle("DELETE /particles/{id}", withAuth(h.DeleteParticle))
mux.Handle("POST /particles/{id}/seen", withAuth(h.MarkSeen))
mux.Handle("POST /particles/{id}/ack", withAuth(h.AckParticle))
mux.Handle("GET /particles/{id}/download", withAuth(h.DownloadParticle))
mux.Handle("POST /particles/seen", withAuth(h.MarkSeenBatch))
mux.Handle("GET /particles/{id}/download", withAuth(h.DownloadParticleMedia))
// Depot
mux.Handle("POST /depot/upload", withAuth(h.PrepareUpload))