The ultimate AI-powered CRM platform for modern lawn care businesses π
- Multi-Crew Management - Organize teams, assign members, and track performance
- Smart Route Optimization - AI-powered route planning with Google Maps integration
- Real-time GPS Tracking - Live crew location monitoring and progress updates
- Customer Relationship Management - Complete customer profiles with service history
- AI Customer Summaries - Automated customer insights and service recommendations
- Smart Scheduling - Intelligent crew assignment based on location and availability
- Predictive Analytics - Service optimization and business insights
- Natural Language Processing - AI-powered customer communication
- Web Application - Modern, responsive web interface
- Mobile App - Native iOS and Android apps with Capacitor
- Offline Support - Works without internet connection
- Push Notifications - Real-time updates and alerts
- Role-Based Access - Admin, Manager, Employee permissions
- Firebase Authentication - Secure user management
- Real-time Data Sync - Live updates across all devices
- Data Encryption - Enterprise-grade security
- Node.js 18+
- npm or yarn
- Firebase project
- Google Cloud APIs enabled
# Clone the repository
git clone https://github.com/yourusername/openlawn.git
cd openlawn
# Install dependencies
npm install
# Set up environment variables
cp env.example .env.local
# Edit .env.local with your API keys
# Start development server
npm run devVisit http://localhost:9002 to see the application.
- Frontend: Next.js 15, React 18, TypeScript
- Styling: Tailwind CSS, Radix UI Components
- Backend: Firebase (Firestore, Auth, Storage)
- AI: Google AI (Gemini), Genkit Framework
- Maps: Google Maps API
- Mobile: Capacitor 7
- Deployment: Vercel
src/
βββ app/ # Next.js app router
β βββ employee/ # Employee dashboard
β βββ manager/ # Manager dashboard
β βββ actions.ts # Server actions
βββ components/ # React components
β βββ auth/ # Authentication components
β βββ lawn-route/ # Route management
β βββ ui/ # Reusable UI components
βββ lib/ # Core services
β βββ firebase.ts # Firebase configuration
β βββ auth.ts # Authentication logic
β βββ customer-service.ts # Customer management
β βββ route-service.ts # Route optimization
βββ hooks/ # Custom React hooks
βββ ai/ # AI integration
βββ genkit.ts # AI configuration
βββ flows/ # AI workflows
# Initialize Capacitor
npm run cap:init
# Add platforms
npm run cap:add:android
npm run cap:add:ios
# Build and sync
npm run build:mobile
npm run cap:sync
# Open in native IDEs
npm run cap:open:android # Android Studio
npm run cap:open:ios # XcodeCreate a .env.local file with:
# Firebase Configuration
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=123456789012
NEXT_PUBLIC_FIREBASE_APP_ID=1:123456789012:web:abcdef1234567890
# Google Maps API
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_maps_api_key
# Google AI (for AI features)
GOOGLE_AI_API_KEY=your_ai_api_key- Create a Firebase project
- Enable Authentication, Firestore, and Storage
- Set up Firestore security rules
- Configure Google Maps API
# Deploy to Vercel
vercel --prodSee Vercel Deployment Guide for detailed instructions.
# Build for production
npm run build:mobile
# Build APK/IPA
# Follow platform-specific build instructions- Create and manage multiple crews
- Assign team members to crews
- Track crew performance and efficiency
- Real-time crew location monitoring
- AI-powered route planning
- Google Maps integration
- Real-time traffic consideration
- Multi-stop route optimization
- Complete customer profiles
- Service history tracking
- Customer preferences and notes
- Automated customer summaries
- Intelligent crew assignment
- Service day/time preferences
- Conflict detection and resolution
- Automated scheduling algorithms
- Offline data access
- GPS location tracking
- Photo capture and upload
- Push notifications
- Automated Summaries - AI-generated customer insights
- Service Recommendations - Smart service suggestions
- Predictive Analytics - Business trend analysis
- Natural Language Processing - Customer communication
- Smart Optimization - AI-powered route planning
- Traffic Integration - Real-time traffic consideration
- Efficiency Analysis - Route performance metrics
- Predictive Routing - Weather and traffic predictions
- Role-Based Access Control - Granular permissions
- Firebase Security Rules - Database security
- Data Encryption - End-to-end encryption
- Audit Logging - Complete activity tracking
- Server-Side Rendering - Fast initial page loads
- Code Splitting - Optimized bundle sizes
- Image Optimization - Automatic image compression
- Caching Strategies - Intelligent data caching
# Development
npm run dev # Start development server
npm run genkit:dev # Start AI development server
npm run genkit:watch # Watch AI development server
# Building
npm run build # Build for production
npm run build:mobile # Build for mobile
npm run export # Export static site
# Mobile Development
npm run cap:sync # Sync with mobile platforms
npm run cap:open:android # Open in Android Studio
npm run cap:open:ios # Open in Xcode
# Firebase
npm run firebase:deploy # Deploy to Firebase
npm run firebase:emulators # Start Firebase emulators
# Utilities
npm run lint # Run ESLint
npm run typecheck # Run TypeScript check
npm run setup:env # Setup environment- Architecture Overview
- Firebase Setup
- Multi-Crew Management
- Capacitor Setup
- Vercel Deployment
- Firebase Fix Summary
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - React framework
- Firebase - Backend services
- Tailwind CSS - Styling
- Capacitor - Mobile development
- Google AI - AI capabilities
- Radix UI - UI components
Built with β€οΈ for modern lawn care businesses