52 lines
2.2 KiB
YAML
52 lines
2.2 KiB
YAML
You are an expert Laravel + Livewire + API integration developer.
|
||
I am building a modular GPS tracking system using Laravel Livewire for the frontend and Traccar as the backend.
|
||
|
||
🧩 Project Context:
|
||
- Laravel project is already set up using a Livewire starter kit.
|
||
- I have imported the `traccar openapi.yaml` file so all endpoints are available.
|
||
- Livewire components must be structured **one per feature** for clean maintainability.
|
||
- Laravel will manage authentication, roles, and permissions using spatie/laravel-permission.
|
||
- Users log into Laravel; Laravel integrates with Traccar using **basic auth (username + password)**.
|
||
- Backend services to Traccar must be wrapped in service classes (e.g., `App\Services\TraccarService`) for reuse.
|
||
|
||
📌 Feature Roadmap (each is its own Livewire module):
|
||
1. Authentication & User Management
|
||
- Laravel handles auth (register, login, roles, permissions).
|
||
2. Dashboard
|
||
- Overview of devices, active connections, alerts.
|
||
- Widgets for devices online/offline, last positions, trips today.
|
||
3. Device Management
|
||
- CRUD devices, assign to users, manage attributes (IMEI, protocol, etc.).
|
||
4. Live Tracking
|
||
- Interactive map (Leaflet/Mapbox/Google Maps).
|
||
- Show live location of user’s devices, with status indicators.
|
||
- WebSocket/interval polling for updates.
|
||
5. Geofences
|
||
- Create/edit/delete polygons and circles.
|
||
- Assign devices to geofences.
|
||
- Trigger alerts when devices enter/exit.
|
||
6. Events & Alerts
|
||
- Show overspeed, geofence breach, SOS, and other alerts.
|
||
- Notifications in UI, optional email/SMS.
|
||
7. Reports & History
|
||
- Trip history, mileage reports, export to PDF/Excel.
|
||
8. Admin Panel
|
||
- Role/permission management.
|
||
- Manage users, assign devices.
|
||
- System settings (API keys, map config).
|
||
9. Drivers & Groups
|
||
- Assign drivers to devices.
|
||
- Group devices for management.
|
||
10. Commands
|
||
- Send commands to devices (engine stop/start, SOS reset).
|
||
- Track command status.
|
||
11. Notifications & Logs
|
||
- Centralized logs of API calls, errors, device messages.
|
||
- System audit trail.
|
||
12. Billing & Subscription (Optional)
|
||
- SaaS setup with Stripe/Paddle.
|
||
- Device limits per subscription.
|
||
|
||
|
||
|