Skip to content

Harden backend and contracts, add tests, CI and docs - #4

Merged
Phantom8420 merged 3 commits into
mainfrom
polish/ten-out-of-ten
Oct 6, 2026
Merged

Phantom8420 merged 3 commits into
mainfrom
polish/ten-out-of-ten

Conversation

@Phantom8420

Copy link
Copy Markdown
Owner

What changed

Demo and docs (frontend)

  • Entering the demo token 0xde70a11ce0000001 in the Verify search bar now works on any host, even with demo mode off. The record opens as a freshly minted item with a guided journey: ship, receive, shelve, sell, then verify ownership with no wallet.
  • Byline under the hero headline, an in-app Docs page, and GitHub links in the nav and footer.
  • Vitest tests, ESLint, and cleanup of leftover hardhat deps.

Backend

  • Repository layer with MongoDB and in-memory implementations (the Mongo models were unused before and the API only ran on a module-level object).
  • Lifecycle rules, GS1 check-digit validation, and a 409 for an existing token ID (it used to be overwritten).
  • Wallet sign-in with roles, role-checked writes, and signed ownership proofs instead of a string compare.
  • Rate limiting, structured errors, graceful shutdown. The always-true ZK stub is removed.

Contracts

  • RoleManager is now the shared source of roles. AuthenTickNFT derives token ids with abi.encode (the old concatenation could collide), and can revoke products. OwnershipRegistry checks the token exists, enforces one step at a time with the matching role, and freezes revoked products.

Repo

  • Untracked committed node_modules, dist, artifacts and deployments. Removed the dead apps/, src/, server.ts and Firebase scaffolding.
  • Accurate README and docs, MIT license, CI workflow, Docker updates.

Testing

  • Contracts: 14 tests. Backend: 29 tests, plus 4 MongoDB repository tests that run in CI against a Mongo service. Frontend: 14 tests.
  • Ran the guided demo end to end against the real API with demo mode off.

Not run locally: the MongoDB repository tests (no Docker daemon) and the Docker build.

Backend: repository layer (MongoDB or in-memory), lifecycle rules, GS1 check digit, duplicate protection, wallet sign-in with roles, signed ownership proofs, rate limiting. Contracts: shared RoleManager, collision-free token ids, revocation, role-gated registry. Frontend: demo token works from the search bar with a guided journey, docs page, byline, GitHub links, tests and lint. Repo: untrack generated files, drop dead legacy code, accurate docs, MIT license, CI.
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
authen-tick Ready Ready Preview Oct 6, 2026 7:13am UTC

@Phantom8420
Phantom8420 merged commit eb76011 into main Oct 6, 2026
6 checks passed
@Phantom8420
Phantom8420 deleted the polish/ten-out-of-ten branch October 6, 2026 07:50

This branch was successfully deployed

1 active deployment
Preview — 2c3f5d98 Deployed Oct 6, 2026 by vercel[bot]
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.

1 participant