Skip to content

chore: fix package.json, add dev tooling, and configure API proxy - #32

Merged
KarenZita01 merged 1 commit into
EquipChain:mainfrom
CodingBabe-1:chore/fix-package-json-add-dev-tooling
Jul 26, 2026
Merged

chore: fix package.json, add dev tooling, and configure API proxy#32
KarenZita01 merged 1 commit into
EquipChain:mainfrom
CodingBabe-1:chore/fix-package-json-add-dev-tooling

Conversation

@CodingBabe-1

@CodingBabe-1 CodingBabe-1 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR addresses Issue #29, fixing developer tooling gaps and improving the developer experience for the EquipChain frontend.

Changes

package.json

  • Added npm scripts:
    • format / format:check — Prettier formatting for consistency
    • typecheck — TypeScript type checking (tsc --noEmit)
    • clean — Remove build artifacts (.next and node_modules)
    • analyze — Bundle analysis with ANALYZE=true next build
    • validate — Full validation pipeline: typecheck → lint → build
    • test — Test placeholder (no tests configured yet)
    • storybook / build-storybook — Storybook integration scripts (for future use)
    • gen:api — OpenAPI TypeScript client generation
    • gen:contracts — Soroban contract type generation
    • dev:proxy — Dev server with API proxy (uses concurrently)
    • postinstall — Husky hook setup
  • Added devDependencies:
    • concurrently — Run multiple commands in parallel
    • husky — Git hooks for pre-commit validation
    • openapi-typescript — API client type generation
    • prettier — Code formatting
    • tsx — TypeScript execution (for scripts)

next.config.ts

  • Added rewrites() configuration to proxy /api/* requests to http://localhost:3001/api/* during development

New Files

  • .prettierrc — Prettier configuration (no semicolons, double quotes, trailing commas)
  • .nvmrc — Pins Node.js to version 20.x for consistent development environments
  • .vscode/launch.json — VS Code debug configurations for Next.js server, client, full-stack, typecheck, and validate
  • scripts/generate-contract-types.ts — TypeScript script that reads Soroban contract spec JSON and generates TypeScript type definitions
  • scripts/dev-proxy.ts — Scaffold for custom development proxy behavior

Git Hooks

  • Set up Husky with a pre-commit hook that runs typecheck and lint before every commit

.gitignore

  • Added contract-specs/ to prevent local contract specs from being committed

Verification

All CI checks pass locally:

  • npm install — No warnings or errors
  • npm run typecheck — Zero TypeScript errors
  • npm run lint — Zero ESLint errors or warnings
  • npm run build — Next.js production build succeeds

Closes

Closes #29

Closes #29

- Add npm scripts: format, format:check, typecheck, clean, analyze, validate,
  storybook, build-storybook, gen:api, gen:contracts, dev:proxy, test, postinstall
- Add devDependencies: concurrently, husky, openapi-typescript, prettier, tsx
- Add API proxy rewrites in next.config.ts for /api/* → localhost:3001
- Create scripts/generate-contract-types.ts for Soroban contract type generation
- Create scripts/dev-proxy.ts as a dev proxy scaffold
- Add .nvmrc pinning Node.js 20.x for consistent development
- Add .vscode/launch.json with debug configurations for Next.js and validation
- Add .prettierrc for consistent code formatting
- Set up Husky with pre-commit hook running typecheck + lint
- Update .gitignore with contract-specs/ entry

Closes EquipChain#29
@KarenZita01
KarenZita01 merged commit e96d823 into EquipChain:main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] Fix Package.json Errors, Add Dev Tooling, and Configure API Proxy for Development

2 participants