Thanks for wanting to contribute! flompt is open-source and MIT licensed — PRs, bug reports, and feature ideas are all welcome.
- Getting started
- Project structure
- Development workflow
- Code style
- Adding a block type
- Adding a language
- Submitting a PR
Requirements: Node.js 18+, Python 3.12+
# 1. Fork and clone
git clone https://github.com/YOUR_USERNAME/flompt.git
cd flompt
# 2. Start the backend
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # optional: add your Anthropic/OpenAI key
uvicorn app.main:app --reload --port 8000
# 3. Start the frontend (new terminal)
cd app
npm install
npm run dev # → http://localhost:5173The heuristic decomposer works without an API key — you don't need one to develop most features.
flompt/
├── app/ # React 18 + Vite frontend (TypeScript)
│ └── src/
│ ├── components/ # UI components
│ ├── i18n/ # 10 locale JSON files
│ ├── lib/ # assemblePrompt, analytics, platform
│ ├── services/ # HTTP client (axios)
│ ├── store/ # Zustand state
│ └── types/ # TypeScript types (blocks.ts)
├── backend/ # FastAPI backend (Python)
│ └── app/
│ ├── routers/ # decompose, compile
│ └── services/ # ai_service, compiler, decomposer
├── blog/ # Next.js blog (static export)
├── extension/ # Chrome / Firefox / Safari MV3 extension
├── docs/ # GitBook documentation
└── landing/ # Static landing page
For a deeper dive, read CLAUDE.md — it covers design rules, block ordering, CSS conventions, and deployment architecture.
-
Create a branch from
master:git checkout -b feat/my-feature
-
Make your changes — keep commits focused and atomic.
-
Test locally before opening a PR:
- Frontend:
npm run buildinapp/should succeed with no errors - Backend: your new route/service should handle edge cases gracefully
- If you touched the extension: test on at least one browser
- Frontend:
-
Open a PR — the template will guide you.
- TypeScript everywhere in the frontend. New types go in
app/src/types/blocks.ts. - No inline styles — use CSS classes. New design tokens go in
:rootinapp/src/styles.css. - No
console.login production code paths. - English only in source code (comments, variable names, function names). UI strings live in i18n JSON files.
- Backend: we use Ruff for linting. Run
ruff check app/before committing.
Block types are defined in two places:
app/src/types/blocks.ts— add the new type literal toBlockTypeapp/src/lib/assemblePrompt.ts— add it toTYPE_PRIORITY(controls XML ordering) andXML_TAG_MAP(controls the output XML tag)backend/app/services/compiler.py— add the XML tag mappingbackend/app/services/decomposer.py— add keyword heuristics for auto-detection- All 10 i18n files in
app/src/i18n/— addblockType.<newType>label and description
Read
docs/block-types.mdto understand the existing block taxonomy before adding a new one.
- Copy
app/src/i18n/en.jsontoapp/src/i18n/<locale>.json - Translate all string values (keep keys in English)
- Add the locale to
SUPPORTED_LOCALESinapp/src/i18n/LocaleContext.tsx - Add a blog translation folder:
blog/content/posts/<locale>/ - Add the locale to
blog/src/i18n/config.ts
- Target the
masterbranch - Keep PRs focused — one feature or fix per PR
- The CI will run lint + build checks automatically
- A maintainer will review and merge
If you're working on something large, open an issue first to discuss the approach before investing a lot of time.
Open a GitHub Discussion or drop a message in an issue. We're friendly.