Skip to content

mihir-28/NexChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

87 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Netlify Status

NexChain Logo

NexChain - A Blockchain-Based Supply Chain Management (SCM) System ๐Ÿš€

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.

Table of Contents

Overview ๐Ÿ“–

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.

Features โœจ

Frontend:

  • 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).

Blockchain Integration:

  • Truffle: Framework for smart contract development.
  • Ganache: Local blockchain environment for testing.
  • Solidity: Smart contract language for blockchain logic.

Backend (Planned):

  • Node.js/Express: For RESTful API endpoints.
  • MongoDB: Off-chain data storage and analytics.

Tech Stack ๐Ÿ”ฎ

  • Frontend: React (Vite), Tailwind CSS, React Router, Web3.js
  • Blockchain: Solidity, Truffle, Ganache, MetaMask
  • Backend (Future): Node.js, Express, MongoDB

Project Timeline ๐Ÿ“…

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

Project Completion

Phase Status
๐ŸŸข Research & Planning โœ… Completed
๐ŸŸ  Development ๐Ÿ”„ In Progress
๐Ÿ”ต Testing ๐Ÿ”œ Coming Soon
๐ŸŸฃ Production ๐Ÿ”œ Coming Soon

Features Status

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

Getting Started ๐Ÿš€

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the Repository:

    git clone https://github.com/yourusername/blockchain-scm.git
    cd blockchain-scm
  2. Setup Frontend:

    • Navigate to the frontend directory 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.

  3. Setup Smart Contracts:

    • Navigate to the smart-contracts directory and initialize a Truffle project:
      cd ../smart-contracts
      truffle init
    • Configure truffle-config.js to 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
  4. (Optional) Setup Backend Later:

    • A backend using Node.js/Express and MongoDB will be integrated in a later phase.

Running the Application

  1. Start Ganache:
    Launch Ganache to run your local blockchain on port 7545.

  2. Run the Frontend:

    • Navigate to the frontend directory and start the Vite development server:
      cd frontend
      npm run dev
    • The app should open in your default browser.
  3. Smart Contract Interactions:

    • Use MetaMask to connect your wallet and interact with the blockchain from the frontend.

Project Structure ๐Ÿ“‚

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)

Future Enhancements ๐Ÿ”ฎ

  • 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.

License ๐Ÿ“„

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! ๐Ÿ˜ƒ

About

A decentralized application (DApp) that leverages blockchain technology to enhance transparency, traceability, and security in supply chain management.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages