Skip to content

Lakes#327

Merged
AlAfiz merged 4 commits into
BETAIL-BOYS:mainfrom
Lakes41:lakes
Jun 16, 2026
Merged

Lakes#327
AlAfiz merged 4 commits into
BETAIL-BOYS:mainfrom
Lakes41:lakes

Conversation

@Lakes41

@Lakes41 Lakes41 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

closes #258

PR Description

Summary

This PR implements three key improvements for developer experience, documentation, and workflow automation:

Changes Made

1. API Contract Documentation

  • Created docs/API_CONTRACT.md: Documents the exact API contract between frontend and backend for /invoices and /v1/risk endpoints
  • Updated types/api.ts: Added @see comments linking interfaces to the contract doc
  • Prevents breaking changes: Ensures backend team knows not to modify key names without coordination

2. Enhanced README

  • Added complete Quick Start guide: Step-by-step instructions to get up and running in under 5 minutes
  • Included prerequisites table: Node.js 20.x+, npm 10.x+
  • Added env variable guide: Clear descriptions for all .env.local options
  • Added troubleshooting section: Covers common Web3/Stellar setup errors
  • Added available scripts table

3. Pre-Commit Hook Setup

  • Installed prettier, husky, lint-staged
  • Created Prettier configs: .prettierrc and .prettierignore
  • Configured package.json: Added prepare script (auto-installs hooks after npm install) and lint-staged config
  • Set up pre-commit hook: Runs eslint --fix and prettier --write only on staged files; aborts commits if unfixable errors exist

Acceptance Criteria Met

  • ✅ API contract documented
  • ✅ README updated for 5-minute setup
  • ✅ Pre-commit hooks configured with Husky + lint-staged

This PR will make onboarding new developers easier, prevent lint/formatting errors from reaching CI, and protect against accidental breaking API changes! 🎉

Lakes41 and others added 4 commits June 16, 2026 19:46
add prettier configuration and ignore file, set up husky pre-commit hook that runs lint-staged, update package.json with new format and prepare scripts, and install required dev dependencies
remove these packages from package.json and all their transitive entries from package-lock.json
@AlAfiz AlAfiz merged commit dee5a85 into BETAIL-BOYS:main Jun 16, 2026
1 check passed

@AlAfiz AlAfiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean code

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.

Setup Husky pre-commit hooks to prevent bad commits

2 participants