···11# Contributing Guidelines
2233-For creating new cards see [here](CustomCards.md) (and check out [existing card ideas](CardIdeas.md))
33+For new cards see [CustomCards](CustomCards.md) and [CardIdeas](CardIdeas.md).
4455-## Development
55+## Setup
6677-```
77+```sh
88git clone https://github.com/flo-bit/blento.git
99cd blento
1010-cp .env.example .env
1110pnpm install
1212-pnpm run dev
1111+pnpm env:setup-dev # creates .env, fills COOKIE_SECRET + CLIENT_ASSERTION_KEY
1212+```
1313+1414+In `wrangler.jsonc`, flip the `DB` binding's `"remote": true` to `false` if not already set to false (don't commit that). Otherwise `pnpm dev` and `pnpm backfill` write to production and need cloudflare credentials.
1515+1616+```sh
1717+pnpm dev # site falls back to PDS when D1 is empty — no backfill needed
1818+pnpm backfill # populates local D1 via contrail; needed only for /xrpc/* paths and the UpdatedBlentos card
1319```
14201515-## AI assisted development
2121+`pnpm backfill` is resumable, takes a few minutes the first time.
16221717-You can submit PRs written with AI assistance but please make sure:
2323+## Before opening a PR
18241919-- there's no extra unnecessary changes/unnecessary verbose code (keep it simple)
2020-- you test everything yourself
2121- - in light/dark mode
2222- - with and without colored cards
2323- - in edit mode and not in edit mode
2424- - on mobile and desktop (note that there's two different mobile "modes", one dependent on screen size and one enabled when pointer: coarse)
2525+- `pnpm check` — must complete with 0 errors and 0 warnings (existing baseline excepted).
2626+- `pnpm format` — runs eslint --fix + prettier --write across the project.
25272628## Subpages
27292828-currently subpages exist but are not used yet, they are perfect for testing things though (as otherwise your profile on blento.app will show e.g. cards that dont exist on the deployed version yet), in the development verion go to `/your.handle/{pagename}/edit` to edit a subpage (where pagename can be any string that is not "edit" or "api") (note that currently when you login you always get redirected to your main page)
3030+In-progress changes go on a subpage so your live profile stays clean: `/your.handle/p/<page>/edit` (any `<page>` other than `edit` or `api`). Login redirects to the main page — navigate to the subpage URL manually.
3131+3232+## AI-assisted PRs
3333+3434+Welcome — please:
3535+3636+- Keep diffs minimal; no unrelated cleanup or verbose code
3737+- Test light/dark, colored cards, edit/view, desktop and both mobile modes (screen-size and `pointer: coarse`)
···11+// Auto-generated by @atmo-dev/contrail-lexicons. Do not edit.
22+// Pass `lexicons` to `createWorker(config, { lexicons })` to expose them
33+// at `/xrpc/<namespace>.lexicons` for consumer apps to typegen against.
44+55+import _0 from '../custom/app/blento/card.json';
66+import _1 from '../custom/app/blento/page.json';
77+import _2 from '../custom/app/blento/section.json';
88+import _3 from './app/blento/authFull.json';
99+import _4 from './app/blento/card/getRecord.json';
1010+import _5 from './app/blento/card/listRecords.json';
1111+import _6 from './app/blento/getCursor.json';
1212+import _7 from './app/blento/getOverview.json';
1313+import _8 from './app/blento/getProfile.json';
1414+import _9 from './app/blento/notifyOfUpdate.json';
1515+import _10 from './app/blento/page/getRecord.json';
1616+import _11 from './app/blento/page/listRecords.json';
1717+import _12 from './app/blento/section/getRecord.json';
1818+import _13 from './app/blento/section/listRecords.json';
1919+2020+export const lexicons: object[] = [_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13];
···88export * as AppBlentoPage from './types/app/blento/page.js';
99export * as AppBlentoPageGetRecord from './types/app/blento/page/getRecord.js';
1010export * as AppBlentoPageListRecords from './types/app/blento/page/listRecords.js';
1111+export * as AppBlentoSection from './types/app/blento/section.js';
1212+export * as AppBlentoSectionGetRecord from './types/app/blento/section/getRecord.js';
1313+export * as AppBlentoSectionListRecords from './types/app/blento/section/listRecords.js';