AuthentiChain bridges the gap between physical products and immutable digital trust. In an era where supply chain tampering and counterfeit products pose critical threats to consumer safety and brand reputation, AuthentiChain provides a cryptographic, decentralized, and verifiable ledger of a product's entire physical journey.
By utilizing strict state transitions, SHA-256 data anchors, hardware-accelerated QR verification, and Ethereum blockchain records, the system ensures that every product scanned is guaranteed genuineβor instantly flagged for fraud.
graph TD
A[Manufacturer] -->|Registers Batch| B(Supabase PostgreSQL)
A -->|Produces QR Code| C[Physical Product]
B -.->|Generates Verification Hash| C
C -->|Ships| D[Supplier / Logistics]
D -->|Scans Checkpoint| B
C -->|Delivered| E[Customer]
E -->|Scans QR via Web App| F{Fraud Engine}
F -->|Valid Hash + Valid Location| G[Verified Genuine]
F -->|Cloned / Velocity Anomaly| H[Counterfeit Alert]
B -->|Anchors State| I[(Ethereum Sepolia Testnet)]
Every logistical event (e.g., manufacturing, shipping, delivery) is cryptographically bound to the previous event using a strict hashing algorithm.
hash = SHA-256(product_id + event_type + actor_id + timestamp + previous_hash)- Tamper Evidence: Modifying any historical database row invalidates the sequence, immediately flagging the entire product chain.
Secured directly at the database level via Postgres RPC, the security matrix detects:
- Velocity Clones: Flags products scanned at abnormally high volumes or speeds.
- Geographic Deviations: Verifies physical GPS bounds for logical discrepancies between logistical checkpoints.
- State Violations: Ensures products cannot bypass crucial physical locations (e.g., jumping from
manufactureddirectly todelivered).
Provides seamless, 30-frames-per-second native QR parsing natively in-browser via the BarcodeDetector API. Designed for high-speed warehouse scanning and instantaneous consumer checks.
Significant shipment batches are cryptographically anchored to a public Ethereum smart contract (ProductTracker.sol via Foundry), offering third-party, decentralized verification independent of internal servers.
| Domain | Technologies |
|---|---|
| Frontend Framework | React 18, Vite, TypeScript |
| Styling & UI | Tailwind CSS, Framer Motion, Radix UI |
| Backend & Auth | Supabase (PostgreSQL), Supabase Auth |
| Security & Logic | Postgres RPC, Row Level Security (RLS) |
| Web3 / Blockchain | Foundry, Solidity, Sepolia Testnet |
| QR Implementation | html5-qrcode, Native Barcode API |
apas/
βββ blockchain/ # Foundry smart contracts for Ethereum logic
β βββ product-auth-chain/ # Solidity project (ProductTracker.sol)
βββ public/ # Static assets (apas.png logo)
βββ src/
β βββ components/
β β βββ layout/ # Dashboards, Navbars, Footers
β β βββ ui/ # Core customized UI blocks (FlowButton, Parallax)
β βββ contexts/ # Global React Contexts (AuthContext)
β βββ integrations/
β β βββ supabase/ # Generated database types and DB client
β βββ lib/ # Utility scripts (hash generators, class combiners)
β βββ pages/ # Full screen route components (Auth, Verify, Dashboard...)
β βββ App.tsx # Main Router mapping
βββ supabase/ # Local and remote automated secure DB management
β βββ config.toml # Env settings
β βββ migrations/ # Version-controlled SQL table/trigger/RPC schemas
βββ tailwind.config.ts # 'Cosmic Dark' theme extensions
AuthentiChain ensures strict compartmentalization of data and permissions:
- Manufacturer Accounts: Can mint product batches, register new physical goods, and initiate product recalls.
- Supplier Accounts: Restricted explicitly to scanning logistical checkpoints (e.g., updating states to
In TransitorArrived). - Consumer Verification: Fully public, sign-in independent portal allowing any end-user to scan a QR code and verify provenance.
- Platform Administrator: Maintains global oversight, dispute resolution, and audit-log monitoring.
Follow these steps to deploy AuthentiChain locally for development.
- Node.js (v18.0.0 or higher)
- Supabase CLI (for local databasing & manual pushes)
- Foundry (if working on the
/blockchainEthereum module)
git clone https://github.com/your-org/apas.git
cd apas
npm installCreate a root .env file and supply your Supabase credentials:
VITE_SUPABASE_URL=your_project_url
VITE_SUPABASE_ANON_KEY=your_anon_keyPush the strict SQL schema, RPC logic, and Trigger functions to your Supabase project:
# Push schema migrations
supabase db pushnpm run devThe client will securely initialize at http://localhost:8080.
AuthentiChain breaks away from standard, dry enterprise management software. Our proprietary Cosmic Dark design system utilizes a custom FlowButton architecture powered by cubic-bezier CSS expansion physics, providing users with a hyper-responsive, fluid, and premium operational experience while they manage global logistics.
This project is proprietary software built for modern supply chain infrastructure.
All cryptographic validations are processed via standardized SHA-256 techniques, and Web3 anchoring relies on the Ethereum foundation's operational network.
