From 2072030de8f8be2d79ce786616d79ccdee26b5f1 Mon Sep 17 00:00:00 2001 From: Yash Dewasthale Date: Wed, 2 Dec 2026 15:19:36 +0530 Subject: [PATCH] chore: update documentation and scripts for improved setup and contribution guidelines - Revised AGENTS.md to clarify application commands and structure. - Enhanced CONTRIBUTING.md with clearer instructions for contributions and setup processes. - Updated README.md to reflect changes in database client generation and installation steps. - Added CODEOWNERS and MAINTAINING.md for better repository management and ownership clarity. - Introduced CI workflows for automatic labeling of pull requests based on modified areas. - Improved package.json scripts for database generation and migration processes. --- .github/CODEOWNERS | 2 + .github/ISSUE_TEMPLATE/bug_report.md | 3 +- .github/MAINTAINING.md | 34 +++ .github/PULL_REQUEST_TEMPLATE.md | 15 +- .github/workflows/ci.yml | 10 +- .github/workflows/pr-area-labels.yml | 54 +++++ AGENTS.md | 20 +- CONTRIBUTING.md | 304 +++++---------------------- README.md | 13 +- package.json | 3 + 10 files changed, 169 insertions(+), 289 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/MAINTAINING.md create mode 100644 .github/workflows/pr-area-labels.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d539035e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Default repository owner. Add area owners as maintainers accept responsibility. +* @yashdev9274 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 570d3515..94fb2be2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -19,12 +19,13 @@ Steps to reproduce the behavior: A clear and concise description of what you expected to happen. **Screenshots / Logs** -If applicable, add screenshots or log output to help explain your problem. +If applicable, add screenshots or log output. Remove access tokens, personal information, and other secrets first. Report security vulnerabilities privately as described in SECURITY.md. **Environment (please complete the following information):** - OS: [e.g. macOS 14.5, Ubuntu 22.04] - Supercode version: [e.g. 0.1.31] +- Application or package: [e.g. Nova Desktop, web, CLI, Jarvis] - Shell: [e.g. zsh, bash] - Node/Bun version: [e.g. Bun 1.2.21] diff --git a/.github/MAINTAINING.md b/.github/MAINTAINING.md new file mode 100644 index 00000000..b884a9af --- /dev/null +++ b/.github/MAINTAINING.md @@ -0,0 +1,34 @@ +# Maintainer playbook + +This is a working process, not a service-level guarantee. Keep ownership and labels accurate as the team changes; contributors should be able to tell who needs to act next. + +## Issue triage + +Review new issues and pull requests regularly, ideally weekly. Search for duplicates, acknowledge the report, and ask for a reproducible example or missing environment details. Confirm the affected application and expected behavior before marking work ready. Link duplicates and explain closure decisions; never ask for credentials or private user data in public. + +Use a small, consistent label vocabulary. Existing labels may coexist during migration: + +- `kind:bug`, `kind:feature`, `kind:docs`, `kind:maintenance` +- `area:web`, `area:cli`, `area:nova-desktop`, `area:supercode-desktop`, `area:jarvis`, `area:api`, `area:docs`, `area:marketplace`, `area:superdesign`, `area:nova-agent`, `area:packages`, `area:ci` +- `status:needs-triage`, `status:needs-info`, `status:ready`, `status:blocked` +- `priority:high`, `priority:medium`, `priority:low`; reserve `good first issue` for scoped, actionable work with context and a reviewer. + +The PR label workflow creates and applies area labels based on changed paths. Labels do not imply a review, priority, or approval. Maintainers should apply issue, status, and priority labels as appropriate and periodically remove stale status labels. + +## Review and ownership + +`CODEOWNERS` identifies the default reviewer for repository changes; update it when maintainers explicitly take responsibility for a component. Maintainers should check the linked issue, behavior, relevant tests and documentation, compatibility across consumers of shared packages, and security implications. Request screenshots or a recording where appropriate. Be specific and respectful in review, state who should act next, and close out abandoned or out-of-scope work with an explanation. Automated labels and passing checks do not replace review. + +Configure branch protection or rulesets in GitHub to require an appropriate review and passing, reliable checks before merging; repository files alone cannot enforce these settings. Check that fork PRs have safe, secret-free CI and do not run untrusted code in privileged workflows. + +## CI and dependencies + +Keep root and application-specific instructions aligned with actual scripts and runtime versions. Required CI should fail if prerequisites or generation fail. Investigate flaky checks before making them required; disclose placeholder checks instead of treating them as coverage. Review Dependabot updates, particularly runtime and framework changes, with the relevant focused tests. Changes to shared packages may require checks in multiple applications. + +## Releases + +Each application can have its own release process. Follow the applicable workflow and application README; the Supercode Desktop workflow builds and verifies an artifact and creates a draft release for clean-install review. Before publishing any release, identify the commit and version, run applicable platform tests and smoke checks, verify artifacts, write user-facing notes with links to changes and known issues, and identify a rollback path. Never assume a draft artifact has been published or live-tested. + +## Regular health review + +Periodically review untriaged issues, PRs waiting on maintainers, CI failures and flaky tests, outdated setup docs, dependency updates, release readiness, and area ownership. Useful measures include age of untriaged reports, time to first human response, and PRs awaiting maintainer action; use them to improve the process rather than reward raw activity. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2468c7c8..32a0594d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,8 @@ ## Description -Please include a summary of the change and which issue is fixed. +Describe the problem, the change, and its effect on users or contributors. For non-trivial changes, link the issue or discussion where the approach was agreed. -Fixes #(issue) +Related issue: # ## Type of change @@ -14,17 +14,14 @@ Fixes #(issue) ## How Has This Been Tested? -Please describe the tests that you ran to verify your changes. +List the commands you ran and their results, including focused tests. Explain any checks you could not run and why. For UI changes, add before/after screenshots; include a recording for motion or interaction changes. -- [ ] `bun test` passes -- [ ] `bun run typecheck` passes -- [ ] `bun run lint` passes (if applicable) +- [ ] Relevant tests and checks are described above ## Checklist: - [ ] My code follows the project's style guidelines - [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation +- [ ] I have updated documentation where needed - [ ] My changes generate no new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have added appropriate tests or explained why they are not needed diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e3d1cc3..94ec71ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: typecheck: name: TypeScript Check @@ -20,6 +23,7 @@ jobs: with: bun-version: 1.2.21 - run: bun install --frozen-lockfile + - run: bun run db:generate:all - run: bun run typecheck lint: @@ -31,6 +35,7 @@ jobs: with: bun-version: 1.2.21 - run: bun install --frozen-lockfile + - run: bun run db:generate:all - run: bun run lint test: @@ -42,8 +47,5 @@ jobs: with: bun-version: 1.2.21 - run: bun install --frozen-lockfile - - run: bun run db:generate - env: - DATABASE_URL: postgresql://localhost:5432/supercode - continue-on-error: true + - run: bun run db:generate:all - run: bun test diff --git a/.github/workflows/pr-area-labels.yml b/.github/workflows/pr-area-labels.yml new file mode 100644 index 00000000..ca99a4a4 --- /dev/null +++ b/.github/workflows/pr-area-labels.yml @@ -0,0 +1,54 @@ +name: Label pull request areas + +# Only reads PR metadata and labels; never checks out or executes PR code. +on: + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const areas = { + "area:web": ["apps/web/"], + "area:cli": ["apps/supercode-cli/"], + "area:nova-desktop": ["apps/nova-desktop/"], + "area:supercode-desktop": ["apps/supercode-desktop/"], + "area:jarvis": ["apps/jarvis/"], + "area:api": ["apps/api/"], + "area:docs": ["apps/docs/", "docs/"], + "area:marketplace": ["apps/marketplace/"], + "area:superdesign": ["apps/superdesign/"], + "area:nova-agent": ["apps/nova-agent/"], + "area:packages": ["packages/"], + "area:ci": [".github/"], + } + const { owner, repo } = context.repo + const files = await github.paginate(github.rest.pulls.listFiles, { + owner, repo, pull_number: context.issue.number, per_page: 100, + }) + const labels = Object.entries(areas) + .filter(([, prefixes]) => files.some(file => prefixes.some(prefix => file.filename.startsWith(prefix)))) + .map(([label]) => label) + for (const name of labels) { + try { + await github.rest.issues.getLabel({ owner, repo, name }) + } catch (error) { + if (error.status !== 404) throw error + try { + await github.rest.issues.createLabel({ owner, repo, name, color: "1d76db" }) + } catch (createError) { + if (createError.status !== 422) throw createError + } + } + } + if (labels.length) { + await github.rest.issues.addLabels({ owner, repo, issue_number: context.issue.number, labels }) + } diff --git a/AGENTS.md b/AGENTS.md index 4fec39cf..8f568d48 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ bun run typecheck # Run TypeScript checks across all packages # Individual app/package commands bun run dev:web # Start only web app (Next.js) bun run dev:api # Start only API app -bun run dev:cli # Start only CLI app +bun run supercode # Run the CLI from source # Package-specific commands (run from package directory) cd packages/db && bun run db:generate # Generate Prisma client @@ -92,18 +92,10 @@ bun test --watch ### Monorepo Structure ``` -apps/ - web/ # Next.js 16 web app (main) - api/ # API app (scaffolded) - supercode-cli/ # CLI app (scaffolded) -packages/ - db/ # Prisma database client - auth/ # Better-Auth authentication - secrets/ # Infisical secrets wrapper (@super/secrets) - ui/ # Shared UI components (empty) - sdk/ # SDK package (empty) - config/ # Shared config (empty) - dashboard/ # Dashboard components +apps/ # Web, CLI, desktop, docs, API, and other applications +packages/ # Shared runtimes, database clients, SDKs, and components + +See CONTRIBUTING.md for the application and package inventory. ``` ### Environment Variables @@ -123,7 +115,7 @@ packages/ - Run: `bun run lint` (from root) or `bun run lint` (from web directory) ### Git -- Branch naming: `supercli-#` +- Use a descriptive branch name, such as `fix/short-description` or `feat/short-description` - No pre-commit hooks configured yet ## Key Dependencies diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d857cf3..e52a2676 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,284 +1,80 @@ # Contributing to Supercode -Thank you for your interest in contributing! This guide will help you get the repo running locally and navigate the codebase. +Thanks for helping improve Supercode. This repository contains several applications and shared packages; contributions to documentation, tests, accessibility, reliability, and all application areas are welcome. -## Quick Start +## Before you start + +- Small bug fixes, documentation, and focused maintenance changes are welcome directly as pull requests. +- For a new application or provider, a large feature, an architectural change, a new service dependency, or a breaking change, open an issue first and agree on the approach with a maintainer before investing in implementation. +- Search existing issues and pull requests for related work. Describe what you plan to do so others can coordinate with you. Do not include secrets or personal data in reports. +- Report vulnerabilities privately using [the security policy](.github/SECURITY.md). Follow the [code of conduct](.github/CODE_OF_CONDUCT.md). + +## Setup + +The root pins Bun 1.2.21 in `package.json` and `.bun-version`; `.node-version` specifies Node 22. Some applications have additional requirements: check their own README and CI workflow. In particular, Nova Desktop's preview workflow currently uses Bun 1.4.5, and Nova Agent documents Node 24 or newer. Native macOS applications require Xcode. + +For dashboard development: ```bash -# 1. Prerequisites: Git, Bun 1.2+, Docker Desktop (recommended) git clone https://github.com/yashdev9274/supercli.git cd supercli - -# 2. Install dependencies (Bun is pinned to v1.2.21 — run via bunx if needed) bun install - -# 3. Set up environment +bun run db:generate:all cp apps/web/.env.example apps/web/.env.local - -# 4. Start PostgreSQL (Docker) — or use any PostgreSQL provider +# Set DATABASE_URL and the authentication settings in apps/web/.env.local. docker compose up -d - -# 5. Run database migrations bun run db:migrate - -# 6. Start the dashboard bun run dev:web -# → http://localhost:3003 ``` -## Prerequisites +The dashboard runs at http://localhost:3003. Docker supplies local PostgreSQL; an existing PostgreSQL instance also works. Configure GitHub OAuth and other credentials only for the features you need. The web development command also runs generation and migration. Never commit `.env.local` or real credentials. -| Tool | Version | Purpose | -|------|---------|---------| -| [Bun](https://bun.sh) | 1.2.21 (pinned) | Runtime & package manager | -| [Docker Desktop](https://docker.com) | Latest | Local PostgreSQL (optional) | -| Git | Any | Version control | +The postinstall script attempts to generate database clients but logs failures as warnings. Run `bun run db:generate:all` explicitly after installation and after schema changes so failures are visible. Dashboard migrations use the web environment; for terminal migrations configure `DATABASE_URL_TERMINAL` and run `bun run --cwd packages/db-terminal db:migrate`. -The project's `packageManager` field in `package.json` pins Bun to 1.2.21. Bun automatically uses the right version when installed via the official installer. +## Find your application -If you use an external PostgreSQL provider (Neon, Supabase, Railway), skip Docker and set your `DATABASE_URL` in `apps/web/.env.local`. +Commands are run from the repository root. The table identifies directories in this checkout, not a promise that every application is production-ready. Consult the linked README or package scripts for prerequisites and current limitations. -## Project Structure +| Area | Directory | Start or build | Focused checks / details | +| --- | --- | --- | --- | +| Dashboard and Nova Web | `apps/web` | `bun run dev:web` | `bun run --cwd apps/web typecheck`; `bun run --cwd apps/web lint` | +| CLI agent and server | `apps/supercode-cli/server` | `bun run supercode` or `bun run dev:terminal-server` | `bun test path/to/file.test.ts`; [server README](apps/supercode-cli/server/README.md) | +| Terminal web client | `apps/supercode-cli/client` | `bun run dev:terminal` | `bun run --cwd apps/supercode-cli/client typecheck`; [client README](apps/supercode-cli/client/README.md) | +| Nova Desktop | `apps/nova-desktop` | `bun run --cwd apps/nova-desktop tauri dev` | [Desktop README](apps/nova-desktop/README.md); desktop preview CI includes native and sidecar checks | +| Supercode Desktop | `apps/supercode-desktop` | Generate the Xcode project as described in its README | [Desktop README](apps/supercode-desktop/README.md); macOS/Xcode required | +| Jarvis | `apps/jarvis` | Build the Jarvis Xcode scheme | [Jarvis README](apps/jarvis/ReadMe.md); macOS/Xcode required | +| Nova Agent | `apps/nova-agent` | `bun run --cwd apps/nova-agent dev` | `bun run --cwd apps/nova-agent test`; [agent README](apps/nova-agent/README.md) | +| API | `apps/api` | `bun run dev:api` | `bun run --cwd apps/api typecheck` | +| Docs site | `apps/docs` | `bun run dev:docs` | `bun run --cwd apps/docs typecheck` | +| Marketplace | `apps/marketplace` | `bun run dev:marketplace` | `bun run --cwd apps/marketplace typecheck`; [README](apps/marketplace/README.md) | +| Superdesign | `apps/superdesign` | `bun run dev:superdesign` | `bun run --cwd apps/superdesign typecheck` | -``` -supercli/ -├── apps/ -│ ├── web/ # Dashboard → supercli.com -│ ├── docs/ # MDX documentation site -│ ├── supercode-cli/ -│ │ ├── client/ # Terminal web UI -│ │ └── server/ # AI CLI agent (published as `supercode`) -│ ├── api/ # Shared API server (scaffolded) -│ └── video/ # Remotion video generation -├── packages/ -│ ├── db/ # Prisma schema + client (dashboard) -│ ├── db-terminal/ # Prisma schema + client (terminal CLI) -│ ├── auth/ # Better-Auth configuration -│ ├── ui/ # Shared UI components -│ ├── sdk/ # Internal SDK -│ ├── claude-sdk/ # Claude/Antrop provider wrapper -│ ├── embeddings-sdk/ # Embeddings provider wrapper -│ └── skills/ # Shared AI agent skills -├── scripts/ -│ ├── postinstall.ts # Runs after bun install -│ └── setup.ts # Automated setup wizard -└── package.json # Root workspace config -``` +`packages/` contains shared code: agent, provider, Codex and Nova runtimes; auth, billing, secrets and WhatsApp integrations; dashboard, design and UI components; SDKs and skills; and the `db`, `db-terminal` and `superdesign-db` database packages. Check each package's `package.json` and README where present before changing its public interface. Changes to shared packages can affect several applications. -## Available Scripts - -Run from the **repo root** unless noted. - -### Development - -| Command | What it starts | -|---------|---------------| -| `bun run dev` | All dev servers (Turborepo) | -| `bun run dev:web` | Dashboard and Nova Web (port 3003) | -| `bun run dev:docs` | Docs site (port 3001) | -| `bun run dev:terminal` | Terminal web client | -| `bun run dev:terminal-server` | CLI agent dev loop | -| `bun run dev:api` | API server | -| `bun run dev:video` | Remotion studio | -| `bun run supercode` | Run the CLI in dev mode | - -### Quality - -| Command | What it checks | -|---------|---------------| -| `bun run check` | lint + typecheck + test (mirrors CI) | -| `bun run lint` | ESLint across all packages | -| `bun run typecheck` | TypeScript type checking | -| `bun test` | Run all tests | - -### Database - -| Command | What it does | -|---------|-------------| -| `bun run db:generate` | Generate Prisma client (dashboard) | -| `bun run db:migrate` | Deploy migrations (dashboard) | -| `bun run db:generate:terminal` | Generate Prisma client (terminal) | -| `bun run db:studio:terminal` | Open Prisma Studio (terminal) | - -Create migrations from the package directory: +## Checks ```bash -cd packages/db -bunx prisma migrate dev --name your_migration_name -cd - +bun run db:generate:all # generate the dashboard and terminal Prisma clients +bun test path/to/file.test.ts # focused Bun test +bun run lint # workspace lint scripts +bun run typecheck # workspace typecheck scripts +bun test # root Bun test discovery ``` -The terminal CLI has its **own** database schema under `packages/db-terminal/`. - -## Environment Variables - -Copy `apps/web/.env.example` to `apps/web/.env.local` and fill in the values. +`bun run check` runs lint, typecheck and root Bun test discovery sequentially. CI runs these as separate jobs and explicitly generates both Prisma clients. Turbo runs scripts only where workspaces define them; some lint and typecheck scripts are currently placeholders. Passing these commands therefore does not mean every application, native target, or integration was checked. Run the relevant application-specific checks as well, and state any limitations in the PR. Desktop workflows run additional platform-specific checks. -The template is annotated with dependency tiers: -- **🔴 Required** — app won't start without it -- **🟡 Required for feature** — needed for auth, AI, etc. -- **⚪ Optional** — skip if you don't need the feature +When modifying `packages/db/prisma/schema.prisma` or `packages/db-terminal/prisma/schema.prisma`, create and review the appropriate migration and regenerate the corresponding client. Do not run a migration against a database you do not intend to change. -Example for local development: - -```env -DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres" -BETTER_AUTH_SECRET="your-secret" # openssl rand -hex 32 -BETTER_AUTH_URL="http://localhost:3003" -GITHUB_CLIENT_ID="your-github-client-id" # from github.com/settings/developers -GITHUB_CLIENT_SECRET="your-github-secret" -``` - -## Development Workflow - -### 1. Pick an Issue - -Check [open issues](https://github.com/yashdev9274/supercli/issues) — good first issues are tagged. Comment to let others know you're working on it. - -### 2. Create a Branch - -```bash -git checkout -b feat/your-feature-name -``` - -Branch naming: -- `feat/` — new features -- `fix/` — bug fixes -- `docs/` — documentation -- `refactor/` — code refactoring - -### 3. Make Changes - -- Follow the code style (see below) -- Add tests for new functionality -- Keep changes scoped to the issue - -### 4. Run Checks - -```bash -bun run check -``` - -This runs linting, TypeScript checks, and tests — same checks as CI. - -### 5. Commit - -```bash -git add . -git commit -m "feat(scope): concise description" -``` - -Format: `(): ` - -Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` - -### 6. Push and Create a PR - -```bash -git push origin feat/your-feature-name -``` - -PR requirements: -- Clear description of changes -- Reference related issues -- Pass all CI checks -- Screenshots for UI changes - -## Code Style - -- **No semicolons** at end of statements -- **Double quotes** for strings -- **2-space indentation** -- **Trailing commas** in multi-line objects/arrays - -### Imports (grouped by category) - -```typescript -import { useState } from "react" -import { useRouter } from "next/navigation" - -import { useQuery } from "@tanstack/react-query" -import { z } from "zod" - -import { Button } from "@/components/ui/button" -import { auth } from "@super/auth" - -import { LocalComponent } from "./local-component" -``` - -### Components - -- **Server Components by default** (Next.js App Router) -- `'use client'` only when hooks or browser APIs are needed -- Destructure props in function parameters -- Use `cn()` from `@/lib/utils` for conditional Tailwind classes -- Follow CVA (class-variance-authority) pattern for variants - -### Naming - -| Type | Convention | Example | -|------|-----------|---------| -| Components | PascalCase | `Button.tsx` | -| Non-component files | kebab-case | `utils.ts` | -| Functions | camelCase | `getSession` | -| Types/Interfaces | PascalCase | `UserSession` | -| Constants | UPPER_SNAKE_CASE | `MAX_RETRIES` | - -## Database Changes - -Both databases share one PostgreSQL instance but have separate schemas. - -### Dashboard Schema (`packages/db/`) - -```bash -cd packages/db -# Edit prisma/schema.prisma -bunx prisma migrate dev --name your_migration_name -bun run db:generate -cd - -``` - -### Terminal Schema (`packages/db-terminal/`) - -```bash -cd packages/db-terminal -# Edit prisma/schema.prisma -bunx prisma migrate dev --name your_migration_name -bun run db:generate -cd - -``` - -## Testing - -Uses Bun's built-in test runner. Test files use `.test.ts` convention and sit next to the code they test. - -```bash -# Run all tests -bun test - -# Single file -bun test path/to/file.test.ts - -# Watch mode -bun test --watch -``` - -```typescript -import { test, expect, describe } from "bun:test" - -describe("my feature", () => { - test("works correctly", () => { - expect(1 + 1).toBe(2) - }) -}) -``` +## Pull requests -## Need Help? +1. Create a descriptive branch, for example `fix/terminal-auth` or `docs/desktop-setup`. +2. Keep the change focused. Add tests for meaningful behavior and update documentation when the workflow or interface changes. +3. Run the relevant checks. In the PR, list the actual commands and results and explain any checks you could not run. +4. Link the issue or discussion, describe the problem and solution, and include before/after screenshots for UI changes or a short recording when interaction or motion matters. +5. Respond to review feedback. Maintainers may ask to narrow a change, request more evidence, or close work that does not fit the project's direction; an early issue helps avoid wasted effort. -- Open a [GitHub issue](https://github.com/yashdev9274/supercli/issues) -- Ask in existing discussions -- Tag maintainers on your PR +Use the existing code style and conventions in the area you change. Conventional commits such as `fix(cli): handle expired sessions` are encouraged. Do not commit generated secrets or unrelated changes. ---- +## Maintainers -Thank you for contributing! +See [the maintainer playbook](.github/MAINTAINING.md) for triage, review, ownership, CI and release practices. For help, use an existing issue or [Discussions](https://github.com/yashdev9274/supercli/discussions). diff --git a/README.md b/README.md index 3290206a..a22f944e 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ bun run dev:web # start the dashboard > **Dashboard / Nova Web** → http://localhost:3003 / http://nova.localhost:3003 -No database? Set one up later — `bun install` skips Prisma client generation gracefully when `DATABASE_URL` isn't set. +Client generation runs during installation. If it fails, run `bun run db:generate:all` after installing dependencies to see the error. --- @@ -248,7 +248,7 @@ bun run dev:terminal-server # run the CLI dev loop ```bash bun install ``` - Prisma client generation runs automatically if `DATABASE_URL` is configured, or skips gracefully if not. + The postinstall script attempts Prisma client generation. Run `bun run db:generate:all` to verify both clients were generated successfully. 3. **Set up environment variables** ```bash @@ -388,7 +388,6 @@ Run from the **repo root** unless otherwise noted. | `bun run dev:terminal` | Terminal web client only | | `bun run dev:terminal-server` | CLI agent dev loop | | `bun run dev:api` | API server only | -| `bun run dev:video` | Remotion studio | | `bun run supercode` | Run the published CLI in dev mode | | `bun run supercode:prod` | Run the built CLI from `dist/` | @@ -404,8 +403,8 @@ Run from the **repo root** unless otherwise noted. |--------|--------------| | `bun run db:generate` | Generate Prisma client (dashboard) | | `bun run db:migrate` | Deploy migrations (dashboard) | -| `bun run db:terminal:generate` | Generate Prisma client (terminal) | -| `bun run db:terminal:migrate` | Deploy migrations (terminal) | +| `bun run db:generate:terminal` | Generate Prisma client (terminal) | +| `bun run --cwd packages/db-terminal db:migrate` | Deploy migrations (terminal) | Create new migrations from the package directory: @@ -427,8 +426,8 @@ cd - | Script | What it does | |--------|--------------| -| `bun run test` | Run all tests across the monorepo | -| `bun run lint` | Run ESLint across all packages | +| `bun test` | Run Bun tests from the repository root | +| `bun run lint` | Run workspace lint scripts (some are placeholders) | | `bun run typecheck` | Run TypeScript checks | ## Environment Variables diff --git a/package.json b/package.json index b0b2235a..1a1193bb 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,10 @@ "postinstall": "bun run scripts/postinstall.ts", "check": "bun run lint && bun run typecheck && bun test", "dev:web": "turbo dev --filter=web", + "db:generate": "bun run --cwd packages/db db:generate", + "db:migrate": "bun run --cwd apps/web db:migrate", "db:generate:terminal": "bun run --cwd packages/db-terminal db:generate", + "db:generate:all": "bun run db:generate && bun run db:generate:terminal", "db:studio:terminal": "bun run --cwd packages/db-terminal db:studio", "dev:api": "turbo dev --filter=api", "dev:terminal": "turbo dev --filter=supercode-cli-client",