Thanks for helping with ado.fan. Small fixes, better writing, design work, documentation, and code are all useful. For website or lyric translations, read TRANSLATING.md first.
- Use GitHub Discussions for questions and early ideas.
- Look through open issues and discussions before starting work.
- For an outside contribution, make a fork and a short branch name such as
fix/lyrics-searchordocs/translation-guide. - Follow the local setup guide before you begin.
Note
Bun is the usual workflow for this project. You may use another modern
package manager, but please do not use npm or commit another lockfile.
- Start from
developunless a maintainer asks for a different branch. - Make the smallest change that solves the problem.
- Update related text, translations, or documentation.
- Run the checks for your change.
- Open a pull request against
develop.
Commit messages are easiest to read when they explain the change. The project
often uses prefixes such as fix:, feat:, and docs:.
Important
Keep one pull request about one problem. If you find another problem while working, open a new issue or pull request for it.
| Path | What belongs there |
|---|---|
app/ |
Routes, layouts, route handlers, and page metadata. |
features/<domain>/ |
Feature-specific components, hooks, and logic. |
shared/ |
Reusable components, i18n, providers, schemas, and utilities. |
server/db/ |
Database access and serialization. |
types/ |
Shared domain types. |
prisma/ |
Schema, migrations, and generated client. |
Use the project aliases instead of deep relative imports:
@/components,@/lib,@/hooks,@/i18n@/providers,@/schemas,@/constants@/db,@/types
For a small section, keep one file at the feature level. When it grows to two or more files, give it its own folder.
Important
Keep routes in app/, feature code in features/, and shared code in
shared/. This makes the project easier to navigate.
The project uses strict TypeScript. Please keep types useful instead of using
any to get past an error.
- Reuse an existing type before adding a new one.
- Validate form, route, and outside-service data with the existing Zod schemas.
- Return early instead of adding deep nested conditions.
- Remove unused imports, variables, and dead code.
- Use Tailwind CSS v4 and the semantic variables in
styles/globals.css. - Avoid TailwindCSS hardcoded values such as
text-[10px], hardcoded colors, and inline SVGs icons. - Reuse shadcn/ui and Radix primitives when they fit.
- Use
lucide-reactfor UI icons and@icons-pack/react-simple-iconsfor brand icons. - Use
cnfrom@/lib/utilsfor conditional classes. - Respect reduced-motion settings. Use GSAP only when animation adds value.
For song themes, you may use the shared/lib/color.ts helper.
getContrastColor(hex)picks"white"or"black"text from a six-digit hex color. It uses WCAG lightness. Light colors get black text and dark colors get white text.getThemeSurface(hex)creates a calmeroklch()background from the same color. It keeps the hue and limits strong saturation.
Website text needs a Lingui macro so it can be translated:
- Use
<Trans>for JSX text. - Use
t`...`for attributes and inline text. - Use
msgfor text declared outside a component, then render it withi18n._.
After changing website text:
- Run
bun run i18n:extract. - Update the changed
.pofiles. - Run
bun run i18n:compile. - Do not commit generated
messages.tsfiles.
See TRANSLATING.md for the full translation flow.
If you change prisma/schema.prisma:
- Make the schema change.
- Run
bun run db:devto create and apply a local migration. - Read the SQL in
prisma/migrations/. - Run
bun run db:generate. - Include the schema and migration in the pull request.
Warning
Do not edit prisma/generated/ or change a migration that is already merged.
Create a new migration for later database changes.
Before opening a pull request, run:
bun run lint
bun prettier --check .
bun run buildRun these too when they apply:
-
For website text or translations:
bun run i18n:extract bun run i18n:compile
-
For a database schema change:
bun run db:dev bun run db:generate
Important
bun run build also generates the Prisma client and Lingui files. It needs a
valid .env with DATABASE_URL and NEXT_PUBLIC_CDN_URL set.
A pull request is easier to review when it has:
- A short summary of the problem and solution.
- Links to related issues or discussions.
- Screenshots or a short recording for UI changes, including mobile when it matters.
- Migration details for database changes.
- Translation context, source language, and credit when needed.
Warning
Do not include credentials, generated files, unrelated refactors, or repository-wide formatting changes in a pull request.
Reply to review feedback with follow-up commits. Do not force-push away review context unless someone asks you to.
By contributing, you agree that original code uses GPL-3.0 and original non-code assets use CC BY-NC-SA 4.0. See LICENSE for details. This is an unofficial fan project, so please respect the rights of Ado, other rights holders, translators, and contributors.