Chilly is a comprehensive decentralized application (dApp) with smart contracts for on-chain order tracking and a modern Next.js frontend. Built with transparency, immutability, and Web3 integration.
chilly/
βββ contracts/ # Smart Contract Layer (Hardhat)
β βββ contracts/ # Solidity contracts
β βββ scripts/ # Deployment scripts
β βββ test/ # Contract tests
β βββ README.md # Contract documentation
β
βββ frontend/ # Frontend Layer (Next.js)
βββ app/ # Next.js App Router pages
β βββ dashboard/ # Dashboard & order management
β βββ analytics/ # Analytics page
β βββ ...
βββ components/ # React components
βββ lib/ # Utilities & Web3 config
βββ public/ # Static assets
- π¦ Order Creation - Create immutable order records on-chain
- π Status Updates - Track order lifecycle (Pending β Confirmed β Processing β Shipped β Delivered)
- π Tracking Numbers - Add and update shipping tracking information
- π Order History - Complete audit trail with timestamps and actors
- β Order Cancellation - Cancel orders before delivery with reason tracking
- π Access Control - Only order participants can update orders
- π Batch Operations - Efficient queries for multiple orders
- π Events - Real-time blockchain events for all state changes
- π Web3 Integration - Reown AppKit with 300+ wallet support (MetaMask, WalletConnect, etc.)
- π§ Email Login - Passwordless authentication without a wallet
- π Social Logins - Google, X, GitHub, Discord, Apple
- π¦ Order Tracking - Create, update, and monitor orders with full transparency
- π Interactive Dashboard - Comprehensive dashboard with order statistics, filtering, and real-time updates
- π Multi-chain Support - Ethereum Mainnet, Sepolia, Polygon, Arbitrum
- π¨ Modern UI - Beautiful, responsive interface with Tailwind CSS and dark mode
- π Advanced Filtering - Filter by status, network, search across all fields
- π Order Analytics - Analytics dashboard with charts and insights
- π Order Details - Detailed view for each order with blockchain information
- π€ Data Export - Export orders to JSON or CSV format
- π Block Explorer Integration - Direct links to view transactions on Etherscan
- βοΈ Smart Contract Integration - Fully functional Solidity contract for on-chain order management
- π° Escrow System - Secure payment handling with automatic release on delivery
- π Dispute Resolution - Built-in dispute mechanism for order conflicts
- Node.js 18.x or higher
- npm, yarn, or pnpm
- A Web3 wallet (MetaMask recommended) or email for login
- Reown Project ID from cloud.reown.com
- Private key (for contract deployment to testnets/mainnet)
cd contracts
npm install
# Compile contracts
npm run compile
# Run tests
npm test
# Deploy to testnet
npm run deploy:sepoliaNote: Smart contract tests are written in TypeScript and cover constructor, order creation, and order confirmation functionality. See contracts/test.md for a comprehensive list of test coverage.
See contracts/README.md for detailed documentation.
cd frontend
npm installCreate .env.local in the frontend folder:
# Get your Project ID from https://cloud.reown.com
NEXT_PUBLIC_PROJECT_ID=your_project_id_here
# Contract addresses (after deployment)
NEXT_PUBLIC_CONTRACT_ADDRESS_SEPOLIA=deployed_contract_address
NEXT_PUBLIC_CONTRACT_ADDRESS_POLYGON=deployed_contract_address
NEXT_PUBLIC_CONTRACT_ADDRESS_ARBITRUM=deployed_contract_address
# Optional: Configure default network
NEXT_PUBLIC_CHAIN_ID=1Note: Create a free account at Reown Cloud to get your Project ID.
Run the development server:
npm run devOpen http://localhost:3000 and connect your wallet!
npm run dev-
Open http://localhost:3000 in your browser
-
Connect your wallet using the connect button in the header
-
Navigate to the Dashboard to start creating and managing orders
The dashboard is the main interface for managing orders:
- View Orders: See all your orders in a grid layout with key information
- Filter Orders: Filter by status (pending, confirmed, processing, shipped, delivered, cancelled, disputed) or network
- Search: Search across order numbers, product names, and addresses
- Create Orders: Click "Create Order" to add new orders to the blockchain
- View Statistics: See real-time statistics about your orders
- Pending: Order created but not yet confirmed
- Confirmed: Order confirmed by seller
- Processing: Order being prepared
- Shipped: Order has been shipped
- Delivered: Order successfully delivered
- Cancelled: Order cancelled
- Disputed: Order under dispute
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
Frontend (.env.local):
NEXT_PUBLIC_PROJECT_ID- Your Reown AppKit Project ID from cloud.reown.com (Required)NEXT_PUBLIC_CHAIN_ID- Default chain ID (Optional, default: 1 for Ethereum Mainnet)NEXT_PUBLIC_RPC_URL- Custom RPC URL for blockchain interactions (Optional)
Smart Contracts (contracts/.env):
PRIVATE_KEY- Deployer private key (Required for deployment)SEPOLIA_RPC_URL- Sepolia testnet RPC URLMAINNET_RPC_URL- Mainnet RPC URLETHERSCAN_API_KEY- Etherscan API key for contract verification- See contracts/README.md for full configuration
- Framework: Next.js 16 - React framework with App Router
- Language: TypeScript - Type-safe JavaScript
- Styling: Tailwind CSS v4 - Utility-first CSS framework with dark mode
- Web3:
- wagmi - React Hooks for Ethereum
- viem - TypeScript Ethereum library
- Reown AppKit - Wallet connection UI (formerly WalletConnect)
- @tanstack/react-query - Data fetching and caching
- Smart Contracts:
- Utilities:
- date-fns - Date formatting utilities
chilly/
βββ app/ # Next.js App Router pages
β βββ dashboard/ # Dashboard pages
β β βββ orders/ # Order detail pages
β β β βββ [id]/ # Dynamic order detail route
β β βββ page.tsx # Dashboard with order management
β βββ analytics/ # Analytics page
β β βββ page.tsx # Analytics dashboard
β βββ layout.tsx # Root layout with Web3 provider
β βββ page.tsx # Home/landing page
β βββ globals.css # Global styles
βββ components/ # React components
β βββ dashboard/ # Dashboard-specific components
β β βββ OrderCard.tsx # Individual order card component
β β βββ OrderList.tsx # List of orders with loading states
β β βββ OrderFilters.tsx # Filtering and search components
β β βββ OrderStats.tsx # Statistics display component
β β βββ OrderStatusUpdate.tsx # Status update component
β β βββ CreateOrderModal.tsx # Modal for creating new orders
β βββ Header.tsx # Navigation header
β βββ Hero.tsx # Hero section
β βββ Features.tsx # Features showcase
β βββ HowItWorks.tsx # How it works section
β βββ CTA.tsx # Call to action
β βββ Footer.tsx # Footer component
βββ lib/ # Utilities and configurations
β βββ types.ts # TypeScript type definitions
β βββ web3.ts # Web3 configuration (wagmi, Reown)
β βββ Web3Provider.tsx # Web3 context provider
β βββ mockData.ts # Mock data for development
β βββ exportUtils.ts # Export utilities (JSON, CSV)
βββ public/ # Static assets
βββ contracts/ # Smart contracts
βββ OrderTracking.sol # Main order tracking contract
βββ hardhat.config.js # Hardhat configuration
βββ scripts/ # Deployment scripts
β βββ deploy.js # Contract deployment script
βββ README.md # Contract documentation
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with β€οΈ by the open-source community
- Special thanks to all contributors
Made with Next.js and Web3 πΆοΈ