AquaFlow is a modern, full-stack web application that provides premium water delivery services. Built with React, TypeScript, and using MongoDB Atlas (Realm) for backend services, it offers a seamless experience for customers to order fresh water and for vendors to manage their operations.
- οΏ½ E-commerce Platform - Browse and order water products
- π€ User Authentication - Secure login and registration
- π± Responsive Design - Works perfectly on all devices
- π³ Checkout System - Smooth ordering process
- π Vendor Dashboard - Comprehensive business management
- π Order Tracking - Real-time order status updates
- π¨ Modern UI - Built with shadcn/ui components
- React 18 - Modern React with hooks
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful, accessible components
- React Router - Client-side routing
- React Hook Form - Performant forms with validation
- MongoDB Atlas (Realm) - Backend and auth via Realm Web SDK
- MongoDB - Document database hosted on Atlas
- App Services - Functions and triggers via Realm/Atlas
- ESLint - Code linting
- TypeScript ESLint - TypeScript-specific linting
- PostCSS - CSS processing
- Autoprefixer - CSS vendor prefixing
Make sure you have the following installed:
- Node.js (v18 or higher)
- npm or bun package manager
- Git
git clone https://github.com/Stranger1298/AquaFlow.git
cd AquaFlowUsing npm:
npm installOr using bun (recommended for faster installation):
bun installCreate a .env.local file in the root directory and add your MongoDB Realm App ID:
VITE_MONGODB_REALM_APP_ID=your_realm_app_idIf you'd like to enable real Google AdSense ads so users can watch an ad to waive delivery fees (Option A), add your AdSense client id as well:
# Optional: Google AdSense client id (example: ca-pub-1234567890123456)
VITE_ADSENSE_CLIENT=ca-pub-XXXXXXXXXXXXNotes on AdSense:
- The app will fallback to a simulated ad player when
VITE_ADSENSE_CLIENTis not set. - If you want to target a specific ad unit, also set
VITE_ADSENSE_AD_SLOTto your ad slot id (example:7353694377). - AdSense must be configured for the domain you host the app on. During local development you can still test with the simulated ad.
- The repository uses a heuristic to detect an ad iframe and mark the ad as "viewed" β this is not an official AdSense callback. For production, consider server-side verification or a formal ad tracking integration.
npm run devOr with bun:
bun devThe application will be available at http://localhost:5173
AquaFlow/
βββ public/ # Static assets
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # shadcn/ui components
β β βββ AdPlayer.tsx
β β βββ NavigationBar.tsx
β β βββ ProductCard.tsx
β βββ contexts/ # React contexts for state management
β β βββ AuthContext.tsx
β β βββ CartContext.tsx
β β βββ OrderContext.tsx
β β βββ ProductContext.tsx
β βββ hooks/ # Custom React hooks
β βββ integrations/ # External service integrations
β β βββ mongodb/
β βββ lib/ # Utility functions
β βββ pages/ # Application pages/routes
β β βββ vendor/ # Vendor-specific pages
β β βββ Cart.tsx
β β βββ Checkout.tsx
β β βββ Login.tsx
β β βββ ...
β βββ ...
βββ mongodb/ # MongoDB Realm / Atlas configuration
βββ package.json
βββ README.md
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run build:dev |
Build for development |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
- Product Catalog - Browse various water products and packages
- Shopping Cart - Add/remove items with quantity management
- User Registration & Login - Secure authentication system
- Order History - Track all previous orders
- Real-time Updates - Get notified about order status changes
- Dashboard - Comprehensive business overview
- Order Management - Process and fulfill customer orders
- Product Management - Add, edit, and manage product catalog
- Analytics - Business insights and performance metrics
- Type Safety - Full TypeScript implementation -- Real-time Data - Realm Functions / Change Streams
- Responsive Design - Mobile-first approach
- Component Library - Consistent UI with shadcn/ui
- Form Validation - Robust form handling with Zod
- State Management - Efficient context-based state management
npm run buildThe built files will be in the dist folder, ready for deployment to any static hosting service.
- Vercel (Recommended)
- Netlify
- GitHub Pages
- Any static hosting service
We welcome contributions! Please follow these steps:
- 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 the existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- React - The web framework used
- Vite - Build tool and development server
- Tailwind CSS - CSS framework
- shadcn/ui - UI component library -- MongoDB Atlas - Backend and database
- Lucide React - Icon library
If you have any questions or need help, please:
- Check the Issues page
- Create a new issue if your problem isn't already listed
- Contact the maintainers
Live Demo β’ Documentation β’ Report Bug