8.3 KiB
TurfTracker - Professional Lawn Care Management
TurfTracker is a comprehensive web application designed for homeowners to track and manage their lawn care activities including fertilizer applications, weed control, mowing schedules, and equipment management.
Features
✅ Completed Features
-
User Authentication & Authorization
- Local account registration and login
- OAuth2 Google Sign-In integration
- Role-based access control (Admin/User)
- Password reset functionality
-
Property Management
- Multiple property support
- Satellite view integration for area mapping
- Lawn section creation and management
- Square footage calculation
-
Equipment Management
- Equipment type catalog (mowers, spreaders, sprayers, etc.)
- Detailed equipment specifications
- Application rate calculations
- Tank size and nozzle configuration for sprayers
-
Product Management
- Shared product database with application rates
- Custom user products
- Fertilizer, herbicide, and pesticide tracking
- Multiple application rates per product
-
Application Planning & Execution
- Create application plans
- Calculate product and water requirements
- Tank mixing support
- GPS tracking integration (framework ready)
-
History & Logging
- Complete application history
- Weather condition logging
- Speed and area coverage tracking
- Detailed reporting
-
Weather Integration
- Current weather conditions
- 5-day forecast
- Application suitability checking
- Historical weather data
-
Admin Dashboard
- User management
- Product catalog management
- System health monitoring
- Usage statistics
🚧 Planned Features
- Google Maps Integration - Enhanced satellite view and area calculation
- GPS Speed Monitoring - Real-time speed feedback during applications
- Mobile App - Native iOS/Android applications
Technology Stack
- Frontend: React 18, Tailwind CSS, React Router, React Query
- Backend: Node.js, Express.js, PostgreSQL
- Authentication: JWT, OAuth2 (Google)
- Infrastructure: Docker, Nginx
- APIs: OpenWeatherMap, Google Maps (planned)
Quick Start
Prerequisites
- Docker and Docker Compose
- Git
Installation
-
Clone the repository
git clone <repository-url> cd turftracker -
Environment Configuration
Create environment files with your API keys:
Backend Environment (create
.envin root):# Database DATABASE_URL=postgresql://turftracker:password123@db:5432/turftracker # Authentication JWT_SECRET=your-super-secret-jwt-key-change-this-in-production # Google OAuth2 (optional) GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret # Weather API (get free key from OpenWeatherMap) WEATHER_API_KEY=your-openweathermap-api-key # App URLs FRONTEND_URL=http://localhost:3000 -
Start the application
docker-compose up -d -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Database: localhost:5432
First Time Setup
-
Create an admin account
- Go to http://localhost:3000/register
- Register with your email and password
- The first user becomes an admin automatically
-
Add your first property
- Navigate to Properties
- Click "Add Property"
- Enter property details and location
-
Set up equipment
- Go to Equipment section
- Add your lawn care equipment
- Configure sprayer tank sizes and nozzle specifications
-
Add products
- Browse the Products section
- Add custom products or use the pre-loaded database
- Configure application rates
API Keys Setup
OpenWeatherMap API Key
- Go to OpenWeatherMap
- Sign up for a free account
- Get your API key from the dashboard
- Add it to your
.envfile asWEATHER_API_KEY
Google OAuth2 (Optional)
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth2 credentials
- Add
http://localhost:5000/api/auth/google/callbackas redirect URI - Add client ID and secret to your
.envfile
Google Maps API (Future Enhancement)
- Go to Google Cloud Console
- Enable Maps JavaScript API and Geocoding API
- Create an API key
- Will be integrated in future updates
Application Structure
turftracker/
├── backend/ # Node.js API server
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ ├── middleware/ # Authentication, validation
│ │ ├── config/ # Database configuration
│ │ └── utils/ # Helper functions
│ └── package.json
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── contexts/ # React contexts
│ │ ├── hooks/ # Custom React hooks
│ │ └── services/ # API client
│ └── package.json
├── database/ # PostgreSQL schema
│ └── init.sql # Database initialization
├── nginx/ # Reverse proxy configuration
│ └── nginx.conf
└── docker-compose.yml # Container orchestration
Usage Guide
Property Management
- Add Properties: Set up multiple lawn areas with addresses
- Create Sections: Divide properties into manageable sections
- Calculate Areas: Use the satellite view to map out exact lawn areas
Equipment Setup
- Add Equipment: Register all your lawn care equipment
- Configure Sprayers: Enter tank size, pump GPM, and nozzle specifications
- Set Spreader Width: Configure spreader coverage width
Product Management
- Browse Products: Use the pre-loaded product database
- Add Custom Products: Create entries for specialized products
- Set Application Rates: Configure rates for different application types
Application Planning
- Create Plans: Select section, equipment, and products
- Review Calculations: Check product amounts and water requirements
- Check Weather: Verify conditions are suitable for application
- Execute Plan: Follow the calculated application rates
History & Reporting
- Log Applications: Record completed treatments
- Track Weather: Automatic weather condition logging
- View Reports: Analyze application history and effectiveness
- Export Data: Download reports for record keeping
API Documentation
The backend provides a comprehensive REST API. Key endpoints include:
- Authentication:
/api/auth/* - Properties:
/api/properties/* - Equipment:
/api/equipment/* - Products:
/api/products/* - Applications:
/api/applications/* - Weather:
/api/weather/* - Admin:
/api/admin/*
Development
Running in Development Mode
-
Backend Development
cd backend npm install npm run dev -
Frontend Development
cd frontend npm install npm start -
Database Setup
docker-compose up db -d
Project Roadmap
- Google Maps integration for enhanced property mapping
- Mobile application development
- GPS speed monitoring with audio feedback
- Advanced reporting and analytics
- Weather-based application recommendations
- Integration with IoT sensors
- Multi-language support
Contributing
This is a personal project, but contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
This project is licensed under the MIT License.
Support
For questions or issues:
- Check the documentation above
- Review the application logs:
docker-compose logs - Ensure all environment variables are configured
- Verify API keys are valid and have proper permissions
Security Considerations
- Change default passwords in production
- Use strong JWT secrets
- Enable HTTPS in production
- Regularly update dependencies
- Follow security best practices for API key management