Skip to content
Code Insights
Documentation

Contributing

Set up the Code Insights development environment, understand the monorepo structure (CLI, dashboard, server), and submit your first contribution.

Repository structure

Code Insights is a pnpm workspace monorepo at github.com/melagiri/code-insights.

code-insights/
├── cli/           # Node.js CLI (Commander.js, SQLite, providers)
├── dashboard/     # Vite + React SPA (embedded dashboard)
└── server/        # Hono API server (serves dashboard + REST API)

Prerequisites

  • Node.js 18+
  • pnpm (npm install -g pnpm)

Setup

git clone https://github.com/melagiri/code-insights
cd code-insights
pnpm install

Development

# CLI (watch mode)
cd cli && pnpm dev
 
# Dashboard (Vite dev server)
cd dashboard && pnpm dev
 
# Server
cd server && pnpm dev

Building

# Build all packages from repo root
pnpm build

Testing the CLI locally

cd cli
pnpm build
npm link
code-insights --version

Project conventions

  • TypeScript strict mode, ES Modules
  • CLI binary: code-insights
  • npm package: @code-insights/cli
  • Dashboard uses shadcn/ui (New York style) + Tailwind CSS 4
  • SQLite schema changes require versioned migrations in cli/src/db/

Submitting changes

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit changes with descriptive messages
  4. Push and open a pull request

All PRs require a passing pnpm build across the workspace.