A decentralized application for environmental cleanup initiatives built with Next.js, TypeScript, and Web3 technologies.
- Web3 Integration: Seamless blockchain interactions
- Modern UI: Built with Tailwind CSS and shadcn/ui
- Type Safety: Full TypeScript support
- Responsive Design: Mobile-first approach
- Authentication: Secure user authentication
- Real-time Updates: Live data synchronization
This project follows a professional, scalable architecture:
src/
βββ app/ # Next.js App Router pages
βββ components/ # React components (organized by feature)
βββ context/ # React Context providers
βββ hooks/ # Custom React hooks
βββ lib/ # Utilities, constants, and helpers
βββ services/ # API and Web3 service functions
βββ styles/ # Global styles and CSS
βββ types/ # TypeScript type definitions
For detailed structure documentation, see STRUCTURE.md.
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Web3: Ethers.js, Wagmi, RainbowKit
- Authentication: NextAuth.js
- State Management: React Context + TanStack Query
- Package Manager: npm/yarn/bun
- Node.js 18+
- npm, yarn, or bun
- Git
-
Clone the repository
git clone <repository-url> cd dapp
-
Install dependencies
npm install # or yarn install # or bun install
-
Set up environment variables
cp .env.example .env.local
Configure your environment variables:
NEXT_PUBLIC_API_URL=http://localhost:3000/api NEXT_PUBLIC_DECLEANUP_CONTRACT_ADDRESS=your_contract_address NEXTAUTH_SECRET=your_nextauth_secret NEXTAUTH_URL=http://localhost:3000
-
Run the development server
npm run dev # or yarn dev # or bun dev
-
Open your browser Navigate to http://localhost:3000
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettier
Components are organized by functionality:
/components/layout/- Layout components (Header, Footer)/components/forms/- Form components (Login, Registration)/components/features/- Feature-specific components/components/common/- Reusable common components/components/ui/- Base UI components (shadcn/ui)
/services/api/- REST API service functions/services/web3/- Blockchain interaction services
/lib/utils/- Reusable utility functions/lib/constants/- Application constants/lib/validators/- Validation functions
The project uses strict TypeScript configuration with:
- Path aliases for clean imports
- Strict type checking
- Modern ES features
- Airbnb TypeScript ESLint configuration
- Prettier for code formatting
- Husky for pre-commit hooks
- Custom design system
- Responsive breakpoints
- Dark mode support
- Ethereum Mainnet
- Polygon
- Arbitrum One
- Test networks (Goerli, Mumbai)
- DeCleanup smart contracts
- Wallet connection (RainbowKit)
- Transaction management
The application is built with a mobile-first approach and supports:
- Mobile devices (320px+)
- Tablets (768px+)
- Desktop (1024px+)
- Large screens (1280px+)
# Run tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage- Connect your GitHub repository to Vercel
- Configure environment variables
- Deploy automatically on push to main branch
# Build the application
npm run build
# Start production server
npm run start- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use ESLint and Prettier
- Write meaningful commit messages
- Add tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the documentation
- Search existing issues
- Create a new issue with detailed information
- Next.js - React framework
- Tailwind CSS - Utility-first CSS
- shadcn/ui - UI components
- Ethers.js - Ethereum library
- RainbowKit - Wallet connection
Built with β€οΈ for a cleaner future