Welcome to the Scholarship Platform frontend, a decentralized application built on the Aptos Blockchain. This platform empowers donors to create and distribute scholarships while allowing students to apply transparently. All interactions are securely managed via smart contracts on the blockchain.
- Live Demo: Scholarship Platform
- Smart Contract Explorer: Aptos Explorer
- Create Scholarships: Donors create scholarships by specifying eligibility criteria, amounts, and duration.
- View Scholarships: Applicants can explore available scholarships with detailed information.
- Apply for Scholarships: Eligible students can apply by submitting relevant academic details.
- Distribute Scholarships: Donors can disburse funds to qualified recipients seamlessly.
- Emergency Close: Donors have the option to close scholarships early and withdraw remaining funds.
Ensure the following tools are installed:
- Node.js (v14 or higher)
- npm or yarn
- Aptos Wallet (e.g., Petra Wallet) for blockchain interactions
git clone https://github.com/your-repo/scholarship-platform.git
cd scholarship-platform
npm install
or
yarn install
Create a .env
file in the project root with the following variables:
PROJECT_NAME=StudyScholarships
VITE_APP_NETWORK=testnet
VITE_MODULE_ADDRESS=0x25c8f2d9f9f8da2e858ce241b17fc32b9a157977dd1c8089b39115a5c459b4e7
Start the development server:
npm run dev
The app will be available at http://localhost:5173
.
To deploy the smart contract:
-
Install Aptos CLI.
-
Update the Move.toml file with your wallet address:
- Add you Wallet Address from Petra here
donor_addrx="0xda9c8cb7b5536700f36dd6fbfa4f8dce2ca43a519782bd29e0112ac19d12bd1e" applicant_addrx="0xda9c8cb7b5536700f36dd6fbfa4f8dce2ca43a519782bd29e0112ac19d12bd1e"
-
Create your new Address for Deployment
aptos init
- Add your Account addr here for Deployment
my_addrx = "25c8f2d9f9f8da2e858ce241b17fc32b9a157977dd1c8089b39115a5c459b4e7"
-
Compile and publish the contract:
aptos move compile aptos move publish
Connect your Aptos Wallet (e.g., Petra Wallet) to create, apply, and manage scholarships.
- Navigate to Create Scholarship.
- Fill in details such as:
- Scholarship Name
- Amount per applicant
- Eligibility Criteria (GPA, field of study)
- Duration
- Submit the form to create the scholarship.
Browse the Scholarships section to explore available opportunities with details about eligibility, amount, and duration.
- Select the scholarship you want to apply for.
- Provide your academic information (GPA, field of study).
- Submit your application.
Donors can:
- Navigate to Distribute Scholarships.
- Select the scholarship and disburse the funds to qualified recipients.
Donors can:
- Close the scholarship early from the Manage Scholarships section.
- Withdraw any remaining funds securely.
npm run dev
: Start the development server.npm run build
: Build the project for production.npm test
: Run unit tests.
- React: For building the user interface.
- TypeScript: Type-safe JavaScript for enhanced development.
- Aptos SDK: JS/TS SDK for blockchain interaction.
- Ant Design / Tailwind CSS: For responsive UI and modern styling.
- Petra Wallet Adapter: For wallet connection and transactions.
- create_scholarship(...): Creates a new scholarship with specific criteria and amount.
- apply_for_scholarship(...): Allows students to apply for a specific scholarship.
- distribute_scholarship(...): Disburses funds to qualified applicants.
- emergency_close_scholarship(...): Closes the scholarship and refunds the donor.
- initialize_balance(...): Initializes a zero balance for users.
- issue_tokens(...): Issues tokens to donors.
- get_balance(...): Retrieves the balance of an account.
- transfer_tokens(...): Transfers tokens between accounts.
- view_all_scholarships(...): Lists all available scholarships.
- view_scholarships_by_donor(...): Shows scholarships created by a specific donor.
- view_scholarships_applied_by_user(...): Displays all scholarships a user has applied for.
- Smart Contracts: Ensure secure transactions and disbursement.
- No Intermediaries: Direct transactions between donors and applicants.
- Real-Time Tracking: Applicants and donors can monitor scholarship status.
- Wallet Connection Issues: Verify the wallet is installed and connected.
- Transaction Failures: Ensure enough tokens are available for transactions.
- RPC Limits: Use third-party RPC providers like Alchemy or QuickNode if encountering rate limits.
For deployment on Vercel or other platforms:
- Use third-party RPC providers for reliable performance.
- Implement request throttling to manage traffic.
- Utilize WebSockets for real-time updates.
The Scholarship Platform offers a decentralized way to manage scholarships transparently and securely. With blockchain-based operations, donors can create scholarships, students can apply, and funds can be distributed seamlessly. This platform ensures trust, transparency, and easy management of scholarships for all users.