By Lustra.news - The Civic Evolution Initiative
Civic Drafter is a local-first, zero-backend, AI-powered legislative drafting tool. It allows citizens to translate social problems into strictly formatted, constitutionally sound legal frameworks (LDS-1 Standard).
Built as a single-file SPA (Single Page Application) to ensure absolute transparency and zero operational costs.
- BYOK (Bring Your Own Key): Runs entirely in your browser using the Google Gemini 2.5 Flash API. Your API key never leaves your
sessionStorage. - Constitutional Filter: Pre-scans the user's objective against US Constitutional law before drafting begins.
- AI Tribunal (Auditor): Ruthlessly evaluates the generated draft for structural integrity, loopholes, and emotional bias.
- Auto-Fixer: The AI can directly apply audit feedback to the live document.
- Zero-Backend Export: Generates downloadable
.htmlfiles locally or routes the draft to your local email client.
- Vanilla HTML / JavaScript
- Tailwind CSS (via CDN)
- Google Gemini REST API
You don't need a server to run this.
- Clone the repository.
- Open
index.htmlin your browser. - Get an API Key from Google AI Studio.
- Start drafting.
This project is licensed under the MIT License.
You are free to use, modify, and distribute this software. Our goal is to arm citizens with tools to comprehend and write the laws that govern them. If you build something cool with it, let us know.