NexChain is a decentralized application (DApp) that leverages blockchain technology to enhance transparency, traceability, and security in supply chain management. This project uses React (via Vite) and Tailwind CSS for the frontend, with blockchain integration powered by Truffle, Ganache, and MetaMask. A Node.js/Express backend (with MongoDB) will be added later to further extend functionality.
- Overview
- Features
- Tech Stack
- Project Timeline
- Getting Started
- Project Structure
- Future Enhancements
- License
This project is designed to create a blockchain-based supply chain management system that:
- Enhances Transparency: All transactions are recorded on an immutable blockchain ledger.
- Improves Traceability: Each product's journey through the supply chain is fully traceable.
- Ensures Security: Decentralized record-keeping prevents unauthorized tampering.
- Streamlines Processes: Smart contracts automate and secure business transactions.
- React (via Vite): Fast and modern front-end development.
- Tailwind CSS: Responsive and modern UI styling.
- MetaMask Integration: Wallet authentication and blockchain interactions.
- Web3.js: Interact with deployed smart contracts.
- React Router: For multi-page navigation (if applicable).
- Truffle: Framework for smart contract development.
- Ganache: Local blockchain environment for testing.
- Solidity: Smart contract language for blockchain logic.
- Node.js/Express: For RESTful API endpoints.
- MongoDB: Off-chain data storage and analytics.
- Frontend: React (Vite), Tailwind CSS, React Router, Web3.js
- Blockchain: Solidity, Truffle, Ganache, MetaMask
- Backend (Future): Node.js, Express, MongoDB
| Phase | Timeline | Description | Status | Details |
|---|---|---|---|---|
| Phase 1 | January 2025 | Project Planning Requirements gathering and project scope definition |
โ Completed | โข Business requirements documentation โข User stories & use case analysis โข Technology stack selection โข Development roadmap creation |
| Phase 2 | February 2025 | Architecture Design Design system architecture and smart contract structure |
โ Completed | โข Smart contract architecture design โข Database schema modeling โข API endpoints planning โข Security architecture planning |
| Phase 3 | March 2025 | Frontend Development UI/UX implementation and frontend user flows |
โ Completed | โข Core UI component development โข User authentication flows โข Dashboard & analytics interfaces โข Product tracking visualization โข Responsive design implementation |
| Phase 4 | April 2025 | Blockchain Integration Smart contract integration and wallet connectivity |
๐ In Progress | โข Smart contract deployment โข Wallet connection implementation โข Transaction signing & verification โข Chain data indexing & caching โข Gas optimization |
| Phase 5 | May 2025 | Testing & Deployment QA testing, security audits and deployment |
๐ Planned | โข Automated testing suite implementation โข Smart contract security audits โข Performance optimization โข CI/CD pipeline setup โข Testnet deployment & validation |
| Phase 6 | July 2025 | Security Audits & Scaling Advanced security measures and performance optimizations |
๐ Planned | โข Penetration testing โข Third-party security audit โข Distributed system scaling โข Performance benchmarking โข Disaster recovery planning |
| Phase 7 | October 2025 | Mobile App Development Native mobile application with blockchain integration |
๐ Planned | โข React Native implementation โข Mobile wallet integration โข QR code scanning functionality โข Push notifications โข Offline capabilities |
| Phase | Status |
|---|---|
| ๐ข Research & Planning | โ Completed |
| ๐ Development | ๐ In Progress |
| ๐ต Testing | ๐ Coming Soon |
| ๐ฃ Production | ๐ Coming Soon |
| Feature | Status | Availability |
|---|---|---|
| Product Tracking | โ Completed | Available |
| Smart Contracts | โ Completed | Available |
| Transaction Logging | โ Completed | Available |
| QR Code Integration | โ Completed | In Development |
| Access Control | ๐ In Progress | In Development |
| Mobile Wallet Support | ๐ Planned | Coming Soon |
| Analytics Dashboard | ๐ Planned | Coming Soon |
| Supply Chain Visualization | ๐ Planned | Coming Soon |
| Real-time Notifications | ๐ Planned | Coming Soon |
| Multi-signature Approval | ๐ Planned | Coming Soon |
Ensure you have the following installed:
- Node.js & npm: Download Node.js
- Git: Download Git
- Ganache: Download Ganache
- Truffle: Install globally:
npm install -g truffle
-
Clone the Repository:
git clone https://github.com/yourusername/blockchain-scm.git cd blockchain-scm -
Setup Frontend:
-
Navigate to the
frontenddirectory and install dependencies:cd frontend npm install -
Check Tailwind CSS v4 setup:
# Check if Tailwind is installed npm list tailwindcss # Check for the Vite plugin npm list @tailwindcss/vite
-
Verify the main CSS file (
src/index.css) includes:@import "tailwindcss";
-
Remember that v4 doesn't require a configuration file by default. If you have custom configurations, they should be in a separate file.
-
-
Setup Smart Contracts:
- Navigate to the
smart-contractsdirectory and initialize a Truffle project:cd ../smart-contracts truffle init - Configure
truffle-config.jsto use Ganache:module.exports = { networks: { development: { host: "127.0.0.1", port: 7545, network_id: "*", }, }, compilers: { solc: { version: "0.8.4" }, }, };
- Compile and deploy smart contracts:
truffle compile truffle migrate --network development
- Navigate to the
-
(Optional) Setup Backend Later:
- A backend using Node.js/Express and MongoDB will be integrated in a later phase.
-
Start Ganache:
Launch Ganache to run your local blockchain on port7545. -
Run the Frontend:
- Navigate to the
frontenddirectory and start the Vite development server:cd frontend npm run dev - The app should open in your default browser.
- Navigate to the
-
Smart Contract Interactions:
- Use MetaMask to connect your wallet and interact with the blockchain from the frontend.
blockchain-scm/
โโโ backend/ # Node.js/Express API server (to be implemented later)
โโโ frontend/ # Vite-based React application
โ โโโ public/ # Static assets and index.html
โ โโโ src/
โ โ โโโ assets/ # Images, fonts, etc.
โ โ โโโ components/ # Reusable UI components (Navbar, Footer, etc.)
โ โ โโโ pages/ # Page components (Home, Dashboard, etc.)
โ โ โโโ App.jsx # Main App component
โ โ โโโ main.jsx # Vite entry point
โโโ smart-contracts/ # Solidity contracts and Truffle configuration
โ โโโ contracts/ # Smart contract files (.sol)
โ โโโ migrations/ # Migration scripts for deploying contracts
โ โโโ test/ # Smart contract tests
โ โโโ truffle-config.js # Truffle configuration file
โโโ README.md # Project documentation (this file)
-
Backend Integration:
Develop a Node.js/Express server with MongoDB for additional off-chain data storage and analytics. -
Advanced Blockchain Features:
Integrate more complex smart contracts for enhanced product lifecycle management and automated workflows. -
Mobile Responsiveness & PWA:
Enhance the frontend to support Progressive Web App (PWA) capabilities and mobile devices. -
IoT Integration:
Incorporate IoT devices for real-time tracking of products through the supply chain.
This project is licensed under a proprietary license. See LICENSE for details.
NexChain - Transforming Supply Chains with Blockchain Technology
Made With ๐ช Dedication, ๐ง Innovation, and Countless โ Coffee Sessions
Happy Coding! ๐
