Skip to main content

/install — codebase setup

General installation and local setup guide for this codebase. Use when onboarding a machine, setting up dependencies, env files, translations, Husky, local dev server, Cypress, agent mirrors, MCP, or optional RTK/GitHub CLI tooling for this repo.

Source: .agents/skills/install/SKILL.md

Metadata

  • name: install
  • disable-model-invocation: true

Content

/install — codebase setup

Set up this repo for local development. Source of truth: README.md, package.json, AGENTS.md, and .agents/.

Goal

Install runtime/tooling, dependencies, env, translations, hooks, test tooling, and shared agent files. Keep special agent tooling optional; do not make RTK/MCP/GitHub CLI required for normal app work.


1. Prerequisites

Required for app development:

  • Node: 22.x
  • Bun: >= 1.1.17
  • Vercel access: needed for .env

Useful checks:

node --version
bun --version

Optional:

  • GitHub CLI: PR workflows only.
  • Cypress binary: E2E tests only.
  • MCP / RTK: agent workflows only.

2. Fresh clone

README one-liner:

git clone https://github.com/Nas-Company/nas-fe.git && cd nas-fe && bun install && npx vercel link && npx vercel env pull .env && bun fetch-translations && bash husky.sh

Already cloned:

bun install
npx vercel link
npx vercel env pull .env
bun fetch-translations
bash husky.sh

Notes:

  • Use Bun for package install/scripts.
  • Do not edit public/locales/*.json; translations come from bun fetch-translations.
  • Ask team for Vercel access/env access if env pull fails.

3. Run app

Dev:

bun run dev

HTTPS dev:

bun run dev-https

Build/start:

bun run build
bun run start

If dev page has hydration issues, README recommends build/start flow.


4. Checks

Common:

bun run lint
bun run lint-fix
bun run format

Jest:

bun run test-watch
bun run test-coverage

Cypress setup:

bun install
npx cypress install

Then create cypress.env.json with team-provided values.

Cypress run:

bun run cypress
bun run cypress-run
bun run cypress:dev
bun run cypress-run:dev

5. Agent repo alignment

Before substantive code work:

bun run sync-agents

This mirrors .agents/ into .cursor, .claude, .codex, and .agent.

Also read:

  • AGENTS.md
  • .agents/rules/*.mdc
  • .agents/skills/feature-context/SKILL.md before feature work
  • .agents/skills/implement-feature/SKILL.md for coordinated implementation with master checklist, subagents, worktrees, QA, and code review
  • .agents/references/coding-standard/ for shared React/Figma/page-structure standards
  • .agents/references/coding-standard/vercel-react-best-practices/REPO-GUIDANCE.md for React/Next performance in src/
  • .agents/references/features/ for domain prompt context
  • .agents/references/implementation/ for master checklist, worktree, subagent, QA, and review protocols

After editing .agents/, run bun run sync-agents again.


6. Optional MCP

Canonical MCP config: .agents/mcp.json. It syncs to .cursor, .claude, .codex, and .agent.

Shared servers:

ServerTransportConfig
Context7HTTPhttps://mcp.context7.com/mcp
FigmaHTTPhttps://mcp.figma.com/mcp
SentryHTTPhttps://mcp.sentry.dev/mcp
Serenastdioserena start-mcp-server --project-from-cwd --context=ide

Rules:

  • Do not commit tokens/private headers.
  • Put auth in local user/tool config.
  • If serena not on PATH, install Serena or use full executable path.
  • Client-specific Serena contexts may be better: claude-code, codex, antigravity, or ide.

7. Optional RTK

RTK = Rust Token Killer from rtk-ai, not Redux Toolkit. It is optional and only helps agent command-output compression.

Install/verify:

rtk --version
rtk init --help

Typical agent init, only for tools user uses:

rtk init -g --codex
rtk init -g --agent cursor
rtk init --agent antigravity

Preview first when unsure:

rtk init --dry-run

8. Optional GitHub CLI

PR skills need gh auth:

gh auth status
gh auth login -h github.com

Verification checklist

  • node --version satisfies 22.x
  • bun --version satisfies >= 1.1.17
  • bun install complete
  • .env pulled via Vercel when app needs real env
  • bun fetch-translations complete
  • bash husky.sh complete when hooks needed
  • bun run dev or bun run build && bun run start works
  • bun run sync-agents prints sync-agents: done
  • Feature work loads the relevant .agents/references/features/*.md pack before implementation
  • Coordinated implementation loads .agents/skills/implement-feature/SKILL.md
  • Cypress installed/configured only when E2E needed
  • Optional: MCP/RTK/gh configured only when workflow needs them