Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.59 KB

File metadata and controls

57 lines (43 loc) · 1.59 KB

Contributing to Pluma

Prerequisites

Setup

# 1. Install dependencies
pnpm install

# 2. Start the database
cd packages/db
cp .env.example .env   # uses default credentials, fine for local dev
docker compose up -d

# 3. Apply migrations and seed
pnpm db:migrate:deploy
pnpm db:seed  # optional

# 4. Run the apps (each in its own terminal, from the repo root)
cd ../..
pnpm api:dev   # API  → http://localhost:2137
pnpm app:dev   # UI   → http://localhost:3000

Repository layout

Path Description
apps/api Fastify API server
apps/app Next.js 16 UI
packages/sdk npm SDK (@pluma-flags/sdk)
packages/db Prisma schema + migrations
packages/types Shared TypeScript types

Before opening a PR

pnpm lint    # ESLint across the monorepo
pnpm -r build  # type-check + build all packages
pnpm -r test   # Vitest suites (requires the DB to be running)

All three must pass. PRs that fail CI will not be merged.

Guidelines

  • Keep shared contracts in @pluma-flags/types; bump the package when types change.
  • Commit Prisma migration files (packages/db/prisma/migrations/) when the schema changes; never use db:push for changes meant for production.
  • Write or update tests for every behaviour change.
  • Keep functions under ~60 lines; validate all external inputs with Zod.