A decentralized, peer-to-peer parking marketplace built on Ethereum. Think "Airbnb for parking spots" but without a central company.
- For Drivers: Find and book parking spots instantly with secure blockchain payments
- For Hosts: List your empty parking spot and earn passive income in ETH
- Trustless Escrow: Smart contract holds payments securely until booking ends
- No Middleman: Direct peer-to-peer transactions on the blockchain
- Frontend: React + Vite
- Styling: Tailwind CSS (Blue color theme)
- Web3: ethers.js v5
- Network: Ethereum Sepolia Testnet
- Node.js (v16 or higher)
- MetaMask browser extension
- Sepolia Testnet ETH (get from Sepolia Faucet)
npm installOpen src/contract.js and replace YOUR_SEPOLIA_CONTRACT_ADDRESS_HERE with your deployed contract address:
export const CONTRACT_ADDRESS = "0xYourContractAddressHere";npm run devThe app will open at http://localhost:3000
- Make sure MetaMask is installed
- Switch to Sepolia Testnet in MetaMask
- Click "Connect Wallet" in the app
- Approve the connection
- Alice connects her MetaMask wallet
- Goes to "List Your Spot" tab
- Enters location (e.g., "123 Main St") and price (e.g., "0.01 ETH")
- Clicks "List My Spot" and confirms transaction
- Her spot is now live on the blockchain
- Bob connects his wallet
- Sees available spots on "Find Parking" tab
- Finds Alice's spot: "123 Main St - 0.01 ETH"
- Clicks "Book Now" and confirms payment
- 0.01 ETH is sent to the smart contract (escrow)
- The spot shows as "BOOKED"
- Booking period ends (2 minutes in demo)
- Alice sees "Ready to Claim" status
- She clicks "Claim Payment"
- Smart contract transfers 0.01 ETH to Alice's wallet
// Host lists a new parking spot
function listSpot(string calldata _location, uint256 _price) external
// Driver books a spot (payable)
function bookSpot(uint256 _spotId) external payable
// Host claims payment after booking ends
function claimPayment(uint256 _spotId) external
// Get total number of spots
function nextSpotId() public view returns (uint256)
// Get spot details
function getSpot(uint256 _spotId) public view returns (...)- Header: Title, logo, and wallet connection
- Tabs: Switch between Driver and Host views
- DriverView: Browse and book available parking spots
- HostView: List new spots and manage your listings
- LoadingOverlay: Shows during transaction processing
- Notification: Success/error messages (toast style)
- Traffic Track: Addressing urban traffic congestion by making parking more efficient
- ETH-Based Track: Using Ethereum smart contracts for trustless, decentralized peer-to-peer payments
# Development
npm run dev
# Production Build
npm run build
# Preview Production Build
npm run preview- Trustless Escrow: Payments held in smart contract until booking ends
- No Middleman: Direct peer-to-peer transactions
- Transparent: All transactions on public blockchain
- Immutable: Smart contract code cannot be changed
The app is fully responsive and works on:
- Desktop browsers
- Tablets
- Mobile devices
- Primary Colors: Blue shades (no gradients)
- Background: Light blue (primary-50)
- Buttons: Solid blue (primary-600)
- Hover States: Darker blue (primary-700)
- Text: Dark blue (primary-700) and medium blue (primary-600)
This is a hackathon MVP. Feel free to fork and improve!
MIT
Built for the HackBios 2025 Hackathon
