The app
The App is the public website at vimcolorschemes.com. It displays colorschemes discovered by the Worker and renders their generated preview data.
Repository: vimcolorschemes/vimcolorschemes
Responsibilities
Section titled “Responsibilities”- Render colorscheme detail pages and listing pages.
- Read repository, colorscheme, and highlight group data from SQLite/libSQL.
- Provide the filters, sorting, and navigation used by visitors.
- Render code preview templates with colors generated by the Worker.
Where to touch code
Section titled “Where to touch code”Start with the smallest area that owns the behavior you want to change.
| Change | Start here |
|---|---|
| Homepage, listing route, static listing params | src/app/(index)/i/[...filters]/page.tsx |
| Repository detail page | src/app/r/[owner]/[name]/page.tsx |
| Repository modal route | src/app/@modal/(.)r/[owner]/[name]/page.tsx |
| Repository database reads, caching, DTO assembly | src/services/repositoriesServer.ts |
| Database client setup | src/services/database.ts |
| Sort options | src/lib/sort.ts, src/helpers/query.ts |
| Filter options and filter URLs | src/lib/filter.ts, src/helpers/filter.ts, src/helpers/indexRoute.ts |
| Explore command UI | src/components/exploreCommandInput/ |
| Repository grid and cards | src/components/repositories/, src/components/repositoryCard/ |
| Repository detail content | src/components/repositoryPageContent/, src/helpers/repositoryPage.ts |
| Preview markup and highlight CSS | src/components/preview/, src/app/vim.css |
| Public repositories API | src/app/api/repositories/route.ts |
The app uses generated static params for listing and repository routes. If you add a new route dimension, update both the route helper and the static params that enumerate valid paths.
Frontend-only work
Section titled “Frontend-only work”Frontend changes that use existing data do not require running Worker jobs. The app repository includes a local example database at database/vimcolorschemes.db:
DATABASE_URL=file:./database/vimcolorschemes.dbUse this setup for UI, routing, styling, and display work that does not require new generated data.
Run the app checks before opening a pull request:
pnpm checkUse narrower commands while developing:
pnpm testpnpm tcpnpm lint.checkpnpm format.checkWhen app changes become full stack
Section titled “When app changes become full stack”Treat an app change as full stack work when it changes:
- Database columns or table relationships.
- The shape of generated colorscheme preview data.
- Assumptions about which repositories are eligible.
- The deploy or publish flow.
In those cases, read The Worker and Data Flow before changing code.