A decentralized blockchain-based scholarship tracking and management system that ensures transparency, security, and efficiency in scholarship fund distribution.
- Overview
- Features
- Tech Stack
- Architecture
- Prerequisites
- Installation
- Configuration
- Smart Contract
- Running the Application
- User Roles
- Project Structure
- Security Guidelines
- Contributing
- License
BlockTrackEd is a decentralized application (dApp) that revolutionizes scholarship management by leveraging blockchain technology. The platform provides a transparent, tamper-proof system for creating scholarship funds, managing applications, and disbursing funds directly to students.
Built with React, TypeScript, and Ethereum smart contracts, BlockTrackEd eliminates intermediaries and ensures that every transaction is recorded immutably on the blockchain, providing full accountability to all stakeholders.
- Admin Portal: Create and manage scholarship funds, authorize schools, and oversee the entire ecosystem
- School Portal: Verify and approve/reject student applications based on eligibility criteria
- Student Portal: Apply for scholarships, track application status, and receive disbursements
- Immutable record-keeping using Ethereum smart contracts
- MetaMask wallet integration for secure authentication
- Role-based access control (Admin, School, Student)
- ReentrancyGuard protection against attack vectors
- Create scholarship funds with custom criteria and deadlines
- Automatic fund allocation and tracking
- Transparent disbursement history
- Real-time balance monitoring
- Structured application submission with student details
- Status tracking (Pending, Verified, Rejected, Disbursed)
- School verification workflow
- Automated fund reservation upon approval
- React 18.3 - Modern UI library
- TypeScript 5.8 - Type-safe development
- Vite 5.4 - Lightning-fast build tool
- TailwindCSS 3.4 - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible component library
- React Router 6.30 - Client-side routing
- React Hook Form - Form state management
- Zod - Schema validation
- Ethers.js 6.15 - Ethereum wallet & contract interaction
- @web3-react - Web3 wallet connection hooks
- MetaMask - Primary wallet provider
- Solidity ^0.8.20 - Smart contract language
- OpenZeppelin - Audited smart contract libraries
- Ethereum Sepolia Testnet - Test deployment network
- ESLint 9 - Code linting
- TypeScript ESLint - TypeScript-specific linting
- Bun - Fast package manager (optional)
┌─────────────────────────────────────────────────────────────┐
│ Frontend (React + Vite) │
│ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Admin │ │ School │ │ Student │ │
│ │ Portal │ │ Portal │ │ Portal │ │
│ └──────────┘ └──────────┘ └───────────────┘ │
└────────────────────┬────────────────────────────────────────┘
│ Web3Context (Ethers.js)
▼
┌─────────────────────────────────────────────────────────────┐
│ MetaMask Wallet │
└────────────────────┬────────────────────────────────────────┘
│ JSON-RPC
▼
┌─────────────────────────────────────────────────────────────┐
│ Ethereum Network (Sepolia) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ScholarshipTracking.sol Smart Contract │ │
│ │ • Fund Management • Application Processing │ │
│ │ • School Authorization • Disbursement Logic │ │
│ └──────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Before you begin, ensure you have the following installed:
- Node.js v18+ and npm/yarn/bun
- MetaMask browser extension
- Git for version control
- (Optional) Remix IDE, Hardhat, or Foundry for smart contract deployment
- Install MetaMask from metamask.io
- Create a wallet or import existing one
- Switch to Sepolia Test Network
- Get test ETH from Sepolia Faucet
-
Clone the repository
git clone <your-repo-url> cd BlockTrackEd
-
Install dependencies
npm install # or yarn install # or bun install
-
Set up environment variables
Create a
.env.localfile in the root directory:VITE_CONTRACT_ADDRESS=0xYourDeployedContractAddress VITE_NETWORK_ID=11155111
The smart contract address is configured in src/contexts/Web3Context.tsx. You have two options:
Option 1: Environment Variable (Recommended)
const CONTRACT_ADDRESS = import.meta.env.VITE_CONTRACT_ADDRESS;Option 2: Hard-coded Address
const CONTRACT_ADDRESS = "0xYourContractAddressHere";The application is configured for Sepolia testnet by default. To use a different network:
- Update the network ID in your
.env.local - Ensure MetaMask is connected to the same network
- Deploy the smart contract to that network
Located in Contract/ScholarshipTracking.sol
Using Remix:
- Open Remix IDE
- Copy Contract/ScholarshipTracking.sol
- Compile with Solidity 0.8.20+
- Deploy to Sepolia testnet
- Copy the deployed contract address
- Update
CONTRACT_ADDRESSin your frontend
Using Hardhat:
# Install Hardhat
npm install --save-dev hardhat
# Create deployment script
npx hardhat run scripts/deploy.js --network sepolianpm run devAccess the app at http://localhost:5173 (default Vite port)
# Build for production
npm run build
# Preview production build
npm run previewnpm run lint- Create and manage scholarship funds
- Add/remove authorized schools
- Monitor overall system activity
- Deposit funds into the contract
- Access: Admin Portal
- Review student applications
- Verify eligibility based on criteria
- Approve or reject applications
- Access: School Portal
- Browse available scholarship funds
- Submit applications with required details
- Track application status
- Claim approved scholarship funds
- Access: Student Portal
BlockTrackEd/
├── Contract/
│ └── ScholarshipTracking.sol # Smart contract
├── src/
│ ├── components/
│ │ ├── WalletConnect.tsx # Web3 wallet connection
│ │ ├── portals/
│ │ │ ├── AdminPortal.tsx # Admin dashboard
│ │ │ ├── SchoolPortal.tsx # School dashboard
│ │ │ └── StudentPortal.tsx # Student dashboard
│ │ └── ui/ # shadcn/ui components
│ ├── contexts/
│ │ └── Web3Context.tsx # Web3 provider & logic
│ ├── hooks/ # Custom React hooks
│ ├── lib/
│ │ └── utils.ts # Utility functions
│ ├── pages/
│ │ ├── Index.tsx # Landing page
│ │ └── NotFound.tsx # 404 page
│ ├── types/ # TypeScript types
│ ├── App.tsx # Main app component
│ └── main.tsx # Entry point
├── public/ # Static assets
├── .env.local # Environment variables (create this)
├── vite.config.ts # Vite configuration
├── tailwind.config.ts # Tailwind configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies
-
Never commit sensitive data:
- Private keys
- Mnemonic phrases
.envor.env.localfiles- API keys or RPC endpoints
-
Update
.gitignore:node_modules/ dist/ .env .env.local .env.*.local .secret artifacts/ cache/ -
Use environment variables:
- Store all sensitive config in
.env.local - Use GitHub Secrets for CI/CD
- Never hard-code addresses or keys
- Store all sensitive config in
-
Smart contract security:
- The contract uses OpenZeppelin's audited libraries
- ReentrancyGuard prevents reentrancy attacks
- Ownable pattern for access control
- Always test on testnet before mainnet
-
Web3 security:
- Always validate user input
- Check transaction confirmations
- Handle errors gracefully
- Implement proper loading states
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Follow the existing code style
- Add comments for complex logic
- Update documentation if needed
- Test thoroughly
- Test all three portals
- Verify smart contract interactions
- Check responsive design
- Commit your changes
git commit -m "feat: add your feature description"
- Push and create a Pull Request
git push origin feature/your-feature-name
- Open an issue first to discuss major changes
- Write clear, concise commit messages
- Ensure code passes linting (
npm run lint) - Test on Sepolia testnet before submitting
- Update README if adding new features
This project is licensed under the MIT License.
- Install Node.js 18+
- Install MetaMask
- Clone repository
- Run
npm install - Create
.env.localwith contract address - Get Sepolia test ETH
- Run
npm run dev - Connect MetaMask wallet
- Start using the portals!
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact the development team