LocalCodeGen turns your database schema into production-ready CRUD layers, BDO structures, and form definitions — powered by a locally running LLM. No API keys. No data leaves your machine.
Your schema, your code, your models. No cloud connection required. Nothing leaves localhost — ever.
Generate a full CRUD layer from a PostgreSQL table in under 3 seconds. No round-trips, no rate limits.
Works with any Ollama model — llama3.1, codellama, mistral, phi-3. Swap models per generation type.
Reads live PostgreSQL schemas to produce accurate column names, types, nullable constraints, and PKs.
BDO, CRUD, form fields, route handlers — each is a configurable template you can override or extend.
All batch operations are wrapped in a single transaction. Any failure rolls back the entire generation run.
Supply a database connection and table name. LCG inspects column types, constraints, and relationships.
Pick from built-in targets: CRUD helpers, BDO config, Express routes, or a full-stack form definition.
Generated files land in your /src/gen output folder. Review the diff, then import.
Reads live table metadata from your database, then builds a structured schema object for the prompt context.
Prompt builder + Ollama adapter. Sends a schema-grounded prompt to your local model and streams the response.
Parses the model response, validates it against the template contract, and writes clean files to your project.
Install LocalCodeGen in under a minute. Requires Node.js 18+ and Ollama with at least one model pulled.