Lawn Mowing Schedule Manager
A comprehensive full-stack application for managing lawn mowing schedules with zone tracking, history logging, and Telegram notifications.
Features
🌱 Zone Management
- Create and manage lawn zones with images
- Set mowing intervals or specific dates
- Track zone areas and status
- Visual site plan with interactive markers
📊 Activity Tracking
- Record mowing and trimming sessions
- Bulk operations for multiple zones
- Detailed history with notes and weather
- Time tracking and statistics
📱 Telegram Notifications
- Daily reminders for due/overdue zones
- Weekly status reports every Sunday
- Automatic scheduling with cron jobs
- Manual test triggers
📈 Analytics
- Zone status dashboard
- Mowing progress tracking
- Weekly and monthly statistics
- Equipment usage tracking
Setup
Prerequisites
- Node.js 18+
- npm or yarn
Installation
- Clone the repository
git clone <repository-url>
cd lawn-mowing-scheduler
- Install dependencies
npm install
- Configure environment variables
cp .env.example .env
Edit .env
with your settings:
# Telegram Bot Configuration (optional)
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
# Database
DATABASE_URL=file:lawn_scheduler.db
# Server
PORT=3001
NODE_ENV=development
Telegram Setup (Optional)
-
Create a bot with @BotFather on Telegram:
- Send
/newbot
to @BotFather - Follow the instructions to create your bot
- Copy the bot token
- Send
-
Get your chat ID:
- Start a chat with your bot
- Send any message
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
- Find your chat ID in the response
-
Add the credentials to your
.env
file -
Test the connection using the Telegram settings in the app
Development
Start the development server:
npm run dev
This will start:
- Frontend (Vite): http://localhost:5173
- Backend (Express): http://localhost:3001
Production
Build and start the production server:
npm run build
npm start
Docker Deployment
Development
docker-compose -f docker-compose.dev.yml up --build
Production
docker-compose up --build
API Endpoints
Zones
GET /api/zones
- Get all zonesPOST /api/zones
- Create zonePUT /api/zones/:id
- Update zoneDELETE /api/zones/:id
- Delete zonePOST /api/zones/:id/mow
- Mark zone as mowedPOST /api/zones/:id/trim
- Record trimmingPOST /api/zones/bulk-mow
- Bulk mowing session
History
GET /api/history
- Get mowing historyGET /api/history/stats
- Get statistics
Equipment
GET /api/mowers
- Get mowersPOST /api/mowers
- Create mower
Telegram
POST /api/telegram/test
- Test connectionPOST /api/telegram/check-reminders
- Manual reminderPOST /api/telegram/weekly-report
- Manual report
Notification Schedule
- Daily Reminders: 8:00 AM - Zones that are due or overdue
- Weekly Reports: Sunday 9:00 AM - Complete status summary
Database Schema
The application uses SQLite with the following main tables:
zones
- Lawn zones with scheduling infomowing_history
- Activity log with sessionsmowers
- Equipment tracking
Technologies Used
Frontend
- React 18 with TypeScript
- Tailwind CSS for styling
- Vite for development and building
Backend
- Node.js with Express
- SQLite with libsql client
- Multer for file uploads
- node-cron for scheduling
- node-telegram-bot-api for notifications
Infrastructure
- Docker for containerization
- Nginx for reverse proxy
- File-based SQLite database
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details
Description
Languages
TypeScript
75%
JavaScript
23.6%
Shell
0.7%
Dockerfile
0.5%
HTML
0.2%