Production: https://www.echocode.digital/
Preview / development deploy: https://echocode-newsite.vercel.app/
- Node
20.19.6 - npm
11.7.0
npm run dev- run the local Next.js appnpm run test:lead-form-contract- run lead form contract and validation testsnpm run typecheck- run TypeScript validationnpm run lint- run ESLint validationnpm run openapi:lint- run OpenAPI validationnpm run check- required pre-commit validation (lead form contract test + typecheck + lint + openapi:lint + build)npm run test:firestore:rules- run Firestore Rules testsnpm run test:storage:rules- run Storage Rules tests
Run:
npm run checkThis covers:
- lead form contract tests
- TypeScript validation
- ESLint validation
- OpenAPI validation
- production build
Run:
npm run test:firestore:rules
npm run test:storage:rules- Merge feature branches into
develop. - Test the
developpreview deployment. - Run
npm run checkon the final branch state. - Merge
developintomainonly after preview verification passes.
Required fields:
firstNamecountryCodephoneemail
Optional fields:
descriptionimage
The frontend should send countryCode separately from the national phone value. The backend normalizes phone formatting and stores both phone digits and phoneE164.
- Swagger UI locally and in production:
/docs/api - Raw OpenAPI spec:
/api/docs/openapi/openapi.yaml
- Canonical locale URLs:
- English:
/en - Ukrainian:
/ua - German:
/de - Spanish:
/es - Polish:
/pl
- English:
/is a locale resolver. It redirects by saved/browser locale and falls back to/en./ukis a legacy Ukrainian alias and redirects permanently to/ua.- Contact modal routes are locale-aware:
/{locale}/contactand/{locale}/contact/success. - SEO canonical, hreflang and sitemap URLs must use the canonical locale prefixes above.
mainis the production branch and must always represent the current live state.developis the preview / staging branch for new features before production.- Feature branches are temporary task branches for isolated development.
- Create a new feature branch from the latest
develop. - Keep the feature branch up to date with
developandmainwhile working. - Open a PR from the feature branch into
develop. - Test and approve the change on the
developpreview deployment. - Open a PR from
developintomainonly after preview verification passes.
In short:
main = production
develop = preview / staging for new features
feature branches -> PR into develop -> test preview -> PR develop into main
developmay be ahead ofmainonly while new features are being tested.- If
mainis ahead ofdevelop, updatedevelopfrommainbefore starting or merging new work. - Feature branches must be kept current with the latest
developand productionmain. - No new feature should go directly to
main; every feature must be verified ondevelopfirst.
git pullnpm cion a fresh clone or after dependency changes- Make your changes
- If dependency-relevant
package.jsonfields changed, runnpm installto updatepackage-lock.json npm run checkgit add ...git commit -m "message"
If Firebase Rules changed, also run:
npm run test:firestore:rulesnpm run test:storage:rules
Husky pre-commit checks staged package.json changes against HEAD.
It blocks the commit only when dependency-relevant fields changed and package-lock.json is not staged. These fields include dependencies, devDependencies, optionalDependencies, peerDependencies, overrides, workspaces, engines, packageManager, and package version/name metadata.
Script-only changes in package.json do not require a lockfile update.
If that happens:
npm installgit add package-lock.json- Commit again
This prevents CI failures caused by dependency mismatch.