the layout
prerequisites
- node 22+ (we test on 22.11)
- bun 1.3+ (dev runtime; production uses node)
- docker (for postgres)
- a wallet with some BSC testnet BNB if you want to test end-to-end
dev setup
bun run dev starts:
- web on http://localhost:3000
- api on http://localhost:3001
- indexer + workers in the background
running the contract test suite
branching
mainis the production tag tip. every commit onmainis deployeddevelopis the integration branch. PRs targetdevelop- feature branches use
feat/<short-slug>, fixes usefix/<short-slug>, chores usechore/<short-slug>, docs usedocs/<short-slug>
code style
- biome handles formatting + linting. run
bun run lintbefore pushing - typescript strict mode everywhere
- contracts compile with viaIR + 200 optimizer runs. EIP-170 size budget is non-negotiable; if a function pushes a contract over the limit, factor it out
- no
any, no// @ts-ignore. useunknownand narrow if you must - prefer named exports over default exports
copy + brand voice
if you touch user-facing copy or docs:- lowercase by default (TPOT voice)
- no em-dashes, ever. use commas, periods, or restructure
- brand names CAPITALIZED in body copy (WAIFU, FLAP, STEWARD, ELIZA CLOUD, PCS, BSC)
- examples > explanations
- short > long
tests
new code must have tests. minimum bar:- contracts: hardhat tests in
packages/contracts-evm/test/. unit and integration both. - api: vitest unit tests in
apps/api/src/**/*.test.ts - indexer: integration tests that feed fixture logs through the decoder
- web: component tests with vitest + testing-library
CI
every PR runs:- biome lint
- typecheck
- contract suite (forked BSC mainnet)
- api unit tests
- web build
- docs build (mintlify lint)
docs PRs
docs live atdocs/ in this repo. mintlify renders them. local preview:
docs/mint.json under the
appropriate nav group. orphaned pages will be flagged by CI.
reporting issues
GitHub issues at github.com/waifufun/waifu.fun/issues. for security issues, do not file a public issue. emailsecurity@waifu.fun or DM on twitter
@waifudotfun.

