IDE setup

The repo intentionally does not check in .vscode/ — different devs prefer different debuggers, and a shared settings.json tends to fight Windows / macOS path conventions. Instead, paste the snippets below into your own .vscode/ folder once per repo.

VSCode is the recommended editor. JetBrains WebStorm / IntelliJ Ultimate also works well — see JetBrains notes at the bottom.

VSCode

Extensions

Install these in any order. The first four are required to match team formatting and avoid PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. schema errors.

ExtensionIDWhy
ESLintdbaeumer.vscode-eslintLints on save; matches CI lint rules
Prettieresbenp.prettier-vscodeFormats on save; same config as CI
PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma.Prisma.prismaSchema syntax, formatting, and “go to definition” for models
EditorConfigEditorConfig.EditorConfigEnforces tab/space + line-ending conventions
Dockerms-azuretools.vscode-dockerInspect running containers without leaving the editor
GitLenseamodio.gitlensInline blame; useful when tracing why a line exists
Tailwind CSS IntelliSensebradlc.vscode-tailwindcssAutocomplete for utility classes in hivecfm-core
Gogolang.goOnly if you’re editing the HubHubThe Go service that owns background processing, integrations, and the admin API. Sibling to Core. natively

One-shot install via the CLI:

code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension Prisma.prisma
code --install-extension EditorConfig.EditorConfig
code --install-extension ms-azuretools.vscode-docker
code --install-extension eamodio.gitlens
code --install-extension bradlc.vscode-tailwindcss
  • Expected: Each line prints Installing extensions... Extension <id> v<x> was successfully installed.
  • Verify: open Extensions panel (Ctrl+Shift+X) and search “@installed” — all of the above appear.
  • If code is not recognised: in VSCode, open the command palette (Ctrl+Shift+P) → “Shell Command: Install ‘code’ command in PATH”.
  • search-hint: vscode code command not in path windows

settings.json

Create hivecfm-core/.vscode/settings.json and paste:

.vscode/settings.json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "[prisma]": {
    "editor.defaultFormatter": "Prisma.prisma",
    "editor.formatOnSave": true
  },
  "typescript.tsdk": "node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true,
  "eslint.workingDirectories": [{ "mode": "auto" }],
  "files.exclude": {
    "**/node_modules": true,
    "**/.next": true,
    "**/dist": true
  }
}
  • Expected: On the next save of any .ts / .tsx / .prisma file, formatting and ESLint auto-fix run.
  • Verify: open a .ts file, add a trailing space, save — the space disappears.
  • If formatting does nothing: check the bottom-right status bar for “Prettier” — if it shows a warning, click it to see the error. Most often: the project’s node_modules aren’t installed yet; run pnpm install.
  • search-hint: vscode prettier format on save not working

Repeat the same file in hivecfm-hub/.vscode/settings.json if you also open the Go repo in a separate window.

launch.json — Next.js debugger

Create hivecfm-core/.vscode/launch.json and paste:

.vscode/launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Next.js: dev (server + client)",
      "type": "node-terminal",
      "request": "launch",
      "command": "pnpm dev",
      "cwd": "${workspaceFolder}"
    },
    {
      "name": "Next.js: attach to running server",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "skipFiles": ["<node_internals>/**"]
    }
  ]
}
  • Expected: F5 launches pnpm dev inside the integrated terminal and attaches the debugger.
  • Verify: set a breakpoint in any API route under apps/web/app/api/, hit the endpoint, breakpoint fires.
  • If breakpoints stay hollow: the source map is mid-build. Wait until the terminal prints compiled in <Nms> then try again.
  • For attach mode: start the server with NODE_OPTIONS='--inspect' pnpm dev first, then use “attach to running server”.
  • search-hint: next.js vscode breakpoint not binding

launch.json — Go Hub debugger

If you installed Go and run the HubHubThe Go service that owns background processing, integrations, and the admin API. Sibling to Core. natively, add to hivecfm-hub/.vscode/launch.json:

hivecfm-hub/.vscode/launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Hub: run main",
      "type": "go",
      "request": "launch",
      "mode": "auto",
      "program": "${workspaceFolder}/cmd/hub",
      "env": { "PORT": "8090" }
    }
  ]
}
  • Expected: F5 starts the Hub on port 8090 with delve attached.
  • Verify: curl http://localhost:8090/health returns {"status":"ok"}.
  • If port already in use: the Docker Hub container is still running. Stop it with docker compose stop hivecfm-hub-api.

JetBrains notes

WebStorm / IntelliJ Ultimate need no extra plugins for TypeScriptTypeScriptJavaScript with a static type system. Every HiveCFM Node service, the frontend, and the dev hub are written in it. or PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. (built-in). Install only:

  • Prisma ORM plugin (JetBrains marketplace, free).
  • EnvFile plugin if you want .env autocompletion in run configurations.

Format-on-save lives under Settings → Tools → Actions on Save → “Reformat code”. Pick Prettier as the formatter under Languages & Frameworks → JavaScript → Prettier (point it at node_modules/prettier).

Done — what’s next

→ Read the Dev loop — when to hot-reload, when to rebuild Docker.