Skip to content

reagent-systems/openlawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 OpenLawn - AI-Powered Lawn Care Management Platform

Next.js React TypeScript Firebase Tailwind CSS Capacitor

The ultimate AI-powered CRM platform for modern lawn care businesses πŸš€

✨ Features

🎯 Core Management

  • 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-Powered Intelligence

  • 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

πŸ“± Cross-Platform

  • 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

πŸ” Security & Authentication

  • 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

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Firebase project
  • Google Cloud APIs enabled

Installation

# 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 dev

Visit http://localhost:9002 to see the application.

πŸ—οΈ Architecture

Tech Stack

  • 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

Project Structure

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

πŸ“± Mobile Development

Building for Mobile

# 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      # Xcode

πŸ”§ Configuration

Environment Variables

Create 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

Firebase Setup

  1. Create a Firebase project
  2. Enable Authentication, Firestore, and Storage
  3. Set up Firestore security rules
  4. Configure Google Maps API

πŸš€ Deployment

Vercel Deployment

# Deploy to Vercel
vercel --prod

See Vercel Deployment Guide for detailed instructions.

Mobile App Store

# Build for production
npm run build:mobile

# Build APK/IPA
# Follow platform-specific build instructions

πŸ“Š Features Overview

🎯 Crew Management

  • Create and manage multiple crews
  • Assign team members to crews
  • Track crew performance and efficiency
  • Real-time crew location monitoring

πŸ—ΊοΈ Route Optimization

  • AI-powered route planning
  • Google Maps integration
  • Real-time traffic consideration
  • Multi-stop route optimization

πŸ‘₯ Customer Management

  • Complete customer profiles
  • Service history tracking
  • Customer preferences and notes
  • Automated customer summaries

πŸ“… Smart Scheduling

  • Intelligent crew assignment
  • Service day/time preferences
  • Conflict detection and resolution
  • Automated scheduling algorithms

πŸ“± Mobile Features

  • Offline data access
  • GPS location tracking
  • Photo capture and upload
  • Push notifications

πŸ€– AI Features

Customer Intelligence

  • Automated Summaries - AI-generated customer insights
  • Service Recommendations - Smart service suggestions
  • Predictive Analytics - Business trend analysis
  • Natural Language Processing - Customer communication

Route Intelligence

  • Smart Optimization - AI-powered route planning
  • Traffic Integration - Real-time traffic consideration
  • Efficiency Analysis - Route performance metrics
  • Predictive Routing - Weather and traffic predictions

πŸ” Security

  • Role-Based Access Control - Granular permissions
  • Firebase Security Rules - Database security
  • Data Encryption - End-to-end encryption
  • Audit Logging - Complete activity tracking

πŸ“ˆ Performance

  • Server-Side Rendering - Fast initial page loads
  • Code Splitting - Optimized bundle sizes
  • Image Optimization - Automatic image compression
  • Caching Strategies - Intelligent data caching

πŸ› οΈ Development

Available Scripts

# 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

πŸ“š Documentation

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Built with ❀️ for modern lawn care businesses

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages