FrontAge

An open-source generator that turns a few business details into a polished starter site for local businesses, portfolios and dashboards, with optional AI-written copy and a one-click ZIP export.

Status
Open source, working
Stack
React, Vite, Flask, SQLite, Jinja2
Makes
Business, portfolio and dashboard sites
License
MIT

The problem

Most local businesses do not need a platform. They need an address, opening hours, a map, a way to message them on WhatsApp, and a page that looks like someone cared. A pharmacy, a salon and a dentist all need roughly the same ten things, in slightly different words.

Starting every one of those from a blank folder is slow, and it is easy to forget the unglamorous parts: meta tags, Open Graph, structured data, focus states.

The idea

Business details in. A polished site out.

FrontAge describes a site once: its kind, its type, its identity, its colours and its details. From that it produces the first version of a real site, with the copy written, the SEO basics in place and nothing proprietary in the way. The result is plain HTML and CSS, ready to edit or hand over.

How it works

The frontend collects the details and shows a live preview. The backend owns the configuration, writes the copy, renders the site and keeps the drafts.

  1. Pick a kindBusiness, portfolio or dashboard, then one of 14 types
  2. Add detailsIdentity, a palette, and the kind-specific details
  3. Write the copyAn AI provider if one is configured, curated copy if not
  4. RenderOne Jinja2 template, rendered twice
  5. ExportA ZIP with index.html, style.css and a README

The template is rendered twice. The preview gets its CSS inline so it works inside an iframe, and the export links an external stylesheet. Both come from the same source, so what you see is what you download.

What it offers

14 types in three kinds
Business (restaurant, medical store or pharmacy, dentist, salon, retail, real estate, education and general services), portfolio (developer, designer, freelancer) and dashboard (SaaS analytics, admin panel, e-commerce).
Optional AI copy
Bring a key for Claude, GPT or Gemini. FrontAge auto-detects whichever is set, preferring Anthropic, then OpenAI, then Gemini, or you can force one with AI_PROVIDER. With no key at all, every type still ships with solid curated copy.
A real design system
Eight curated palettes, or custom colours for every CSS variable. Logos are resized and embedded in the export as a data URI, and a monogram favicon is generated when there is no logo.
Local business essentials
Address, hours, an embedded map, meta description, Open Graph tags and schema.org JSON-LD mapped per type. WhatsApp links normalize local Pakistani number formats.
Dashboard mockups
Sidebar, stat cards, a weekly trend chart and an activity feed, all static and clearly labelled as sample data.
Draft history
Every generation is saved to a local SQLite database. Regenerating the copy updates the same draft instead of piling up duplicates.
Accessible by default
Skip links, visible focus states, alt text and semantic landmarks in every export.

Decisions and challenges

A missing key must not break a draft
The AI layer sits behind a small provider interface. If no key is set, or a call fails, the draft falls back to curated copy. Model output is asked for as strict JSON, stripped of code fences, and checked for the required keys before it is used.
Prompts that refuse to invent
The prompts explicitly forbid making up prices, addresses, phone numbers or achievements, so a generated site does not quietly contain claims the business never made.
Copy that sounds local
A language option writes mostly English with a few common Roman Urdu phrases, which suits many businesses in Pakistan.
Store inputs, not output
Drafts keep the details and the copy, not the rendered HTML. They are re-rendered when opened, so improvements to a template reach old drafts too.
Structured data stays safe
JSON-LD is escaped so user-entered text cannot break out of its script tag, whatever the template autoescaping does.
Honest sample numbers
Dashboard figures are generated from the labels you enter, so the same draft always shows the same numbers, and they are marked as sample data.
A self-test that covers everything
selftest.py generates every type across all three kinds and works with or without an API key.

Status and links

FrontAge is open source under the MIT license. It was built as a local, single-user tool, so it has no authentication or rate limiting, and the README says to put it behind auth before exposing it to a network. The roadmap includes multi-page export, direct deploy to Vercel or Netlify, an image gallery, a bilingual English and Urdu export with right-to-left support, and Docker Compose.

You can try the live demo, or run it yourself:

git clone https://github.com/LwkMoon/FrontAge
cd FrontAge/backend
python3 -m venv venv && . venv/bin/activate
pip install -r requirements.txt
python selftest.py      # optional sanity check
python app.py           # http://localhost:5000

# in a second terminal
cd FrontAge/frontend
npm install && npm run dev   # http://localhost:5173

More case studies.