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
+24
View File
@@ -0,0 +1,24 @@
import { useMutation } from "@tanstack/react-query";
import { createParticle } from "@/lib/firestore-particles";
import type { ParticleType, ParticlePropertiesMap } from "@/api/types";
interface CreateParticleParams<T extends ParticleType = ParticleType> {
collectionPath: string;
type: T;
properties: ParticlePropertiesMap[T];
createdByEmail: string;
visibleTo: string[];
}
export function useCreateParticle() {
return useMutation({
mutationFn: (params: CreateParticleParams) =>
createParticle(
params.collectionPath,
params.type,
params.properties,
params.createdByEmail,
params.visibleTo,
),
});
}