Contributing
Internal guide for developing the evjs monorepo.
Project Identity
- Name: evjs (fullstack framework),
@evjs/*(package scope) - Repository: evaijs/evjs
- CLI command:
ev(binary from@evjs/cli) - Linter: Biome (
npx biome check --write) - Module type: ESM-only (
"type": "module"in all packages)
Setup
git clone https://github.com/evaijs/evjs.git
cd evjs
npm install
Commands
npm run build # Build all packages + examples
npm run test # Unit tests (vitest)
npm run test:e2e # E2E tests (playwright)
npm run dev # Dev mode (turborepo)
npx biome check --write # Fix lint/format
Coding Rules
- Imports — All imports at top of file. Use
import typefor type-only imports - Linting — Biome enforced; no
any, noimport * asunless necessary - Server functions — Must start with
"use server";, use.server.tsorsrc/api/ - Server function exports — Named async function exports only (no default exports)
- Config file — Named
ev.config.ts(notevjs.config.ts)
Common Tasks
Add a new server function
- Create
src/api/[name].server.ts - Add
"use server";at the top - Export named async functions
- Import and use in client with
query()ormutation()
Add a new route
- Define route in
routes.tsxwithcreateRoute() - Add to route tree via
parentRoute.addChildren([newRoute])
Add a new example
- Create directory under
examples/ - Add
package.jsonwith"@evjs/cli": "*"as devDep - Add
src/main.tsx+index.html - Create symlink in
packages/cli/templates/ - Add an e2e test in
e2e/cases/
Release a new version
- Create a GitHub Release with a tag like
v0.1.0 - The release workflow automatically syncs versions and publishes to npm
- Do NOT bump versions locally — the codebase uses
"*"for internal deps