Back to Portfolio
AI Product

Planacle

"Where should we meet?" Eleven messages in, someone drops a map pin. Thirty messages in, the date is still unconfirmed and half the group has stopped reading. Most plans don't get decided — they dissolve.

A real-time social planning application that streamlines group coordination through dynamic scheduling, voting, and location-based discovery.

Problem

Group coordination is often fragmented across multiple chat apps, causing critical details like time, location, and votes to be lost in conversation history. This fragmentation leads to planning friction and participant drop-off.

Solution

A real-time coordination system that centralizes the entire planning workflow. From venue discovery to optimistic voting, it ensures every participant has an instant, unified view of the event's current state.

Architecture

Planacle System Architecture

Serverless Architecture: Real-time Firebase Backend with Google Gemini AI & Agentic Flows

Real-time Coordination Engine

Built on a serverless Firebase architecture using Firestore's push-based synchronization. State updates (votes, availability, venue likes) propagate to all participants in under 200ms, creating a live collaborative environment.

Agentic Planning (Genkit)

Implemented advanced solo-planning modes using Google Genkit. This enables agentic flows that can autonomously query location APIs, resolve preference conflicts, and synthesize a cohesive itinerary based on natural language prompts. The Gemini pipeline follows a retrieval-augmented planning flow: external APIs supply place and event context, which is injected into the model's prompt to ground itinerary synthesis in real-world data. Genkit is a Google-first orchestration framework equivalent to LangChain/LangGraph.

Schulze Voting Algorithm [Applied ML]

Implemented the Schulze method (Condorcet voting) from scratch, an applied machine learning-adjacent algorithm for group preference ranking. When participants vote across multiple venue candidates, the algorithm resolves pairwise preference cycles and surfaces the Condorcet winner, the option most participants genuinely prefer.

Event-Driven AI Triggers

Utilized Firebase Cloud Functions (v2) to automate complex computations. When event status reaches "Finalizing", backend triggers autonomously aggregate all participant data and call Gemini 2.0 Flash to generate the final plan.

Secure-by-Default Architecture

Governed by rigorous Firestore Security Rules and custom RBAC. Sensitive logic and API secrets (Gemini, Ticketmaster) are isolated within Cloud Functions, never exposing keys to the client SPA.

Gale-Shapley Stable Matching [Applied ML]

Built the Gale-Shapley stable matching algorithm from scratch, a classical applied ML and combinatorial optimisation algorithm for optimal participant-venue assignment. It guarantees a stable pairing where no participant-venue pair would mutually prefer each other over their current assignment, removing coordination regret.

// Optimistic UI State Management
const submitVote = async (venueId) => { // 1. Instantly update local state optimisticUpdate(venueId); try { // 2. Push to Firestore in background await firestore.doc(`events/${id}`).update({ [`votes.${venueId}`]: increment(1) }); } catch (err) { // 3. Revert on failure revertLocalState(); }

Data Flow: Collaborative to AI

Participant Input → Aggregator Function → preferenceMatrix → Gemini 2.0 Flash → Final Itinerary JSON → Firestore Real-time Sync.

Published security review

Cloud authorization and AI consumption controls

I reviewed Planacle’s event lifecycle across Firebase Authentication, Firestore and Storage rules, authenticated Cloud Functions, ranked voting, and the Gemini planning pipeline. The case study shows how membership, destructive actions, ballot integrity, rate limits, concurrency, timeouts, sanitisation, and structured output controls are enforced at the real trust boundaries.

Transactional, server-controlled event joining
Host-only destructive actions
Participant-authorized, bounded AI execution
Known and accepted risks recorded openly
Read the full Planacle security case study

Key Decisions

01Condorcet voting instead of counting hands

ConsideredA simple tally: most votes wins. Easy to build, easy to explain.

ChoseImplementing the Schulze method from scratch, plus Gale-Shapley stable matching for participant-venue assignment. Plurality surfaces the loudest option; pairwise preference resolution surfaces the one the group genuinely prefers.

Trade-offReal algorithmic complexity — preference cycles, pairwise matrices. The win: a result no subgroup regrets, which is the whole product.

02Serverless real-time over a custom backend

ConsideredA Node + WebSocket server with full control over the sync protocol.

ChoseFirebase's push-based Firestore synchronization: sub-200ms propagation of votes, availability, and venue likes with no server fleet to operate.

Trade-offThe security burden moves into Firestore rules — which is why every rule was threat-modeled and covered by a rules-level test suite.

03Optimistic UI with rollback

ConsideredWaiting for server confirmation before reflecting each vote — simple, always consistent, visibly laggy.

ChoseInstant local updates pushed to Firestore in the background, with state reverted on failure.

Trade-offRollback paths to design and test. The win: an interface that feels live, which is what keeps a whole group engaged.

Technology

React 19Firebase (v2 functions)Google Gemini 2.0 FlashGoogle GenkitGoogle Maps/Places APITicketmaster APITypeScript

Outcome

Before

Plans scattered across chat threads, map links, and polls nobody tallies.

After

One live view of the plan — votes, venues, timing — synced to every participant in under 200ms.

Planacle successfully resolved the fragmentation issues inherent in group planning by merging real-time coordination with agentic AI. The system delivered a production-grade experience for 100+ beta testers, demonstrating that automated preference resolution and location discovery can eliminate the friction of social coordination.