Inspiration
In my country Indonesia, Urban and regional policy formulation is often disconnected from the daily realities of the citizens it affects. Public consultation processes are frequently slow, expensive, and underrepresented, leaving minority segments, marginalized workers, and vulnerable demographics without a voice. and inspired by project Mirofish to use AI to simulate real world problem. I built this paltform Digitalsociety Lab.
What it does
Digitalsociety Lab is an interactive, full-stack decision-making platform for city councils and regional governments to draft, weigh, and optimize public policies against real-world demographic realities:
- Regional Context Ingestion: Policymakers can analyze regional data such as CSV tables (I take the data from Indonesia National Statistic Center) representing poverty, density, healthcare reliance, labor market status, and school participant trends. Under the hood, Gemini processes this data to contextually prime the system.
- Empathetic Citizen Weighing: When a user inputs a policy draft (or uploads a policy document), the system simulates a wide assembly of citizen personas (e.g., smallholders, rideshare drivers, traditional market vendors, students, seniors) to evaluate the draft. Detailed Impact Reports & Citizen Scores: The platform generates first-person, empathetic citizen feedback, provides a detailed markdown impact report, and assigns a balanced "Citizen Score" out of 10.
- Logical Systemic Connection Mapping: It diagrams visual interdependencies showing how changes in one sector (such as Transport or Small Business) cascade to affect another (such as Healthcare or Local Agriculture), illuminating secondary and tertiary consequences.
- The Policy Architect Workbench: A collaborative space where policymakers can directly consult an AI Consultant using LLM grounding. Policymakers can ask the "Policy Architect" questions like "How can we modify this education subsidy draft so it doesn't hurt local farmers?", receiving 3 specific, data-driven suggestions.
- Robust Core Hub: A fully-fledged Firebase-backed portal incorporating Secure Accounts, Google Single Sign-On, draft storage, and customized security-hardened workspaces.
How we built it
To deliver a high-performance, responsive, and visually stunning client experience, we developed Digitalsociety Lab using the following stack:
- Frontend Ecosystem: Built on a modular React 18 and Vite architecture with TypeScript for strict type safety. We applied custom Tailwind CSS guidelines to design an immersive, high-contrast, elite-aesthetic dark slate canvas.
- Fluid Animations: Leveraged motion/react (Framer Motion) to orchestrate smooth layout transitions, micro-interactions, and staggered entry sequences when loading policy results.
- Visual Network Graphs: Integrated interactive visualization tools and customized charting components to map the cascading social connections and sector impact scores dynamically. Intelligence Engine: Implemented the state-of-the-art @google/genai TypeScript SDK to interface with Google's robust Gemini 3.5 Flash models, orchestrating multi-faceted JSON parsing, inline document uploads, and contextual reasoning.
- Datastore & Security Rules: Provisions a persistent backend utilizing Firebase (Firestore and Auth) with standard email credentials and native Google Sign-In, reinforced by robust, secure firestore.rules custom configurations.
Challenges we ran into
- Complex Structured Outputs: Persuading an LLM to consistently return valid, deeply-nested JSON schemas with strict numeric sector scores and interdependent logical pairs (from/to/reason) proved challenging. We resolved this by defining specific schema rules and taking advantage of Gemini's native JSON schema parsing interfaces (responseMimeType: "application/json").
- Preserving Authenticated Tenant Boundaries: Keeping regional datasets, policies, and analyses compartmentalized within secure workspaces without sacrificing public consultation potential. This required meticulous tuning of firestore database schemas and security rules to allow access check passes for correct owners.
- Balancing Data Density with Visual Clarity: Translating complicated demographic graphs and dozens of systemic citizen opinions into a clean dashboard without clutter. We applied visual hierarchy principles, focusing heavily on negative space, bold scannable typography, and interactive disclosure states.
Accomplishments that we're proud of
- Humanizing Hard Data: Turning static, complex spreadsheets and demographic metrics into vivid, first-person narrative feedback from citizens who feel genuinely represented (e.g., "As a taxi driver, I feel the infrastructure tax burden will directly cut my daily take-home pay by 15%...").
- Cohesive, Custom Aesthetic: Designing a highly refined, premium "Digitalsociety Deep Slate" UI theme that feels incredibly professional, modern, and serious, perfectly complementing the complexity of civic policy engineering.
- Comprehensive Interactive Workbench: Crafting an AI Policy Consultant that doesn't just evaluate errors, but immediately collaborates to fix and improve drafted legislation by drafting alternative socio-economic clauses.
What we learned
- Simulated Consultation is a Powerful Pre-Flight Tool: While AI personas can never replace genuine human consultation, they are an extraordinarily rapid and low-cost tool to filter out obvious structural policy flaws before spending resources on large-scale public surveys.
- Structured Systemic Thinking over Linear Evaluation: Policies never exist in a vacuum. Visualizing secondary links (e.g. how a trade restriction implicitly reduces school attendance because of youth labor demands) changes the way policymakers approach legislative text structures.
What's next for Digitalsociety Lab
- Live PDF Legislation Importer: Upgrading document ingestion to seamlessly pull full-length government drafts and extract key sub-sections automatically.
- Multi-Region Modeling Comparison: Enabling policymakers to evaluate the same policy across different cities concurrently to see which demographic settings yield the highest aggregate citizen scores.
- Public Verification Portal: Allowing real citizens to vote on simulated feedback logs to verify whether the AI accurately predicted their concerns or left out specific local nuances.
Team Details & Roles
Satrio Brahmantoro Adi Subagio – Lead Full-Stack Architect, AI Integrations Engineer, and Product Designer. Solo Dev :) Role: Engineered the frontend interface, integrated Firebase Firestore and authentication mechanisms, programmed the Gemini 2.0-Flash prompt pipeline, and curated the interactive user workbench experience.
Log in or sign up for Devpost to join the conversation.