Welcome to the Lost and Found Registry frontend, a decentralized application built on the Aptos Blockchain. This platform enables users to register lost items, submit reports for found items, and manage claims transparently. All interactions and reward transfers are securely handled through smart contracts deployed on the Aptos blockchain.
- Live Demo: Lost and Found Registry
- Smart Contract Explorer: Aptos Explorer
- Register Lost Items: Users can register lost items with descriptions and offer rewards to finders.
- Submit Found Items: Finders can submit reports with descriptions for the owner's verification.
- Verify Finder & Transfer Rewards: Owners can verify found items and reward finders automatically using APT.
- View Lost Items: Users can browse all registered lost items publicly.
- Track Found Submissions: Owners can view submissions for specific lost items and manage claims.
Ensure you have the following installed:
- Node.js (v16 or higher)
- npm or yarn
- Aptos Wallet (e.g., Petra Wallet) for blockchain interactions
cd lost-and-found-registry
npm install
Create a .env
file in the project root and add the following variables:
PROJECT_NAME=LostAndFoundRegistry
VITE_APP_NETWORK=testnet
VITE_MODULE_ADDRESS=0x7792db2bc2e3c11f4485060e1112fab7a9d88d971af5cc638a9a486d6fb7ca61
Replace <VITE_MODULE_ADDRESS>
with the actual address of your deployed smart contract.
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:
sys_addrx = "0xca10b0176c34f9a8315589ff977645e04497814e9753d21f7d7e7c3d83aa7b57"
-
Set the module address for deployment:
my_addrx = "7792db2bc2e3c11f4485060e1112fab7a9d88d971af5cc638a9a486d6fb7ca61"
-
Create a new Aptos account:
aptos init
-
Compile and publish the contract:
aptos move compile aptos move publish
Connect your Aptos wallet (e.g., Petra Wallet) to interact with the platform. This enables you to register lost items, submit found item reports, and verify claims.
- Navigate to the Register Lost Item section.
- Provide the item’s title, description, and reward amount in APT.
- Submit the form to register the lost item on the blockchain.
- Go to the Submit Found Item page.
- Select the lost item from the list and describe the found item.
- Submit the report, notifying the owner of the found item.
As the owner:
- Navigate to the My Items section.
- Review submissions for your lost items.
- Verify the finder’s submission and approve the reward transfer.
- The finder will automatically receive the reward in APT.
- Browse all registered lost items in the View Lost Items section.
- View submission reports for specific items in the Found Submissions section.
npm run dev
: Start the development server.npm run build
: Build the project for production.npm test
: Run unit tests.
- React: Library for building UIs.
- TypeScript: Typed JavaScript for better development.
- Aptos SDK: JavaScript SDK to interact with the Aptos blockchain.
- Ant Design / Tailwind CSS: For modern UI design and responsive layouts.
- Petra Wallet Adapter: To connect and interact with Aptos wallets.
- View All Lost Items: Displays all lost items registered on the platform.
- View Lost Items by Owner: Lists lost items registered by a specific owner.
- View Submissions for Lost Items: Shows submissions made for a specific lost item.
- Smart Contracts handle all reward transfers and submissions on-chain, ensuring transparency.
- No Intermediaries: Rewards are transferred directly from the owner to the finder.
- Tracking Claims: Users can track the status of their lost items in real-time.
- Wallet Connection Errors: Ensure the Aptos wallet extension (e.g., Petra) is installed and active.
- RPC Rate Limits: Use third-party RPC providers like QuickNode or Alchemy to avoid rate limits.
- Transaction Failures: Verify that your wallet has enough balance and correct permissions.
If deploying to Vercel, consider the following solutions:
- Use private RPC nodes to handle blockchain interactions reliably.
- Implement throttling to prevent RPC request overload.
- Leverage WebSockets for real-time status updates.
The Lost and Found Registry offers a decentralized platform to manage lost items, found submissions, and reward distribution seamlessly. With secure smart contracts and transparent operations, users can efficiently handle lost-and-found claims, ensuring items are returned and rewards are fairly distributed.