Private
Project *AFC Artificial Intillegence » Algo Trade Automation » Algo Trade Manual » Bulk mail Automation with web interface » Bulk Mail Service For Bench Sales » Code Generation Tool » Cold Emailing Automation (AI-Driven) » Invoice Inventory Automation » invoice to inventory for evergreen » Test Automation » What's app Bulk messaging with AI agents » Zelle Payment for evergreenCharan Technologies _ DevelopmentEver green Farms USA (static website)Evergreen farms (pos)Evergreen React ApplicationGas Station ERPHackthonIT HappENSLucky BraidsMy Produce StandNoxa_JewelleryOffice Requirments » Daily Tasks For Madhu » Employees requirements » Recruitment senior mern stack developer » Red MIne Speed » Senior Mern Stack DeveloperQA TestersRare FruitsRegal SolarRegal Solar DMRegal Solar Energy_ ReactReliance Home Builders_ reactRemit2AnyRestaurant POSRSVPRushi GardensRV_ EngraverSri Farms _ DMSri_FarmsTech FourceTechnical RequirementsTechy_DevelopmentTechy_POS Travel Mate
Tracker *Bug Feature Support Testing
Subject *
Description Edit To integrate the notification system and align it with AI-driven capabilities, here is the strategic backend roadmap for the Travelmate project. Based on my analysis of your NestJS backend ( travelmate-app-be), most of the basic triggers are already implemented, but they need broadcasting logic and AI optimization to become a "smart" system. Phase 1: Core Integration & Broadcasting (The "Link" Phase) The current backend has individual notifications, but lacks a "broadcast" mechanism for ride-wide status changes. * 1.1 Broad Status Updates: * Logic: Modify updateRideStatus in rides.service.ts. * Trigger: When a ride is Cancelled or Completed by the driver. * Action: Iterate through all Confirmed and Boarded bookings for that rideId and send a batch notification using Promise.allSettled. * 1.2 Consistent Payload Schema: * Ensure every notification (FCM) follows the structure expected by the React Native app (e.g., type: 'ride_request' for loud alerts, or type: 'status_update'). * 1.3 Reliable Delivery (Queueing): * Introduce BullMQ or Redis. Notifications should be processed as background jobs so that the API response isn't slowed down by Firebase latency. Phase 2: Behavioral AI Integration (Smart Notifications) This is where the "Roadmap AI" comes in to make the app feel premium and intelligent. * 2.1 Predictive Delay Alerts (AI Model): * Scenario: If the driver is 5km away and the ride starts in 10 minutes, AI predicts a "High Probability of Delay". * Backend Task: Run a cron job that compares driverLocation vs pickupPoint. If the delay probability > 80%, send an automated "Driver is running late" notification to the passenger. * 2.2 Fraud & Safety Monitoring (Anomaly Detection): * Scenario: A ride is marked Ongoing, but GPS hasn't moved for 15 minutes. * Backend Task: AI detects this anomaly and triggers a "Safety Check" notification to the passenger asking if they are okay. * 2.3 Smart Frequency Capping: * AI analyzes user engagement. If a user ignores 5 notifications in a row, the backend switches to SMS-only for critical alerts or slows down promotional push notifications to avoid being marked as spam. Phase 3: Advanced Communication (SMS & Multichannel) Ensuring the user is reached even if they are offline. * 3.1 Twilio/SMS Fallback: * Integrate the twilio module (already present in your code) into the NotificationsService. * Logic: If firebaseService.sendPush fails or the user is offline, automatically trigger an SMS for critical OTPs or Ride Start alerts. * 3.2 AI-Generated Notifications: * Use an LLM (OpenAI/Gemini) to generate personalized ride summaries or "Weekly Impact" reports (e.g., "You saved 50kg of CO2 this week! Check your history."). Phase 4: Observability & ROI * Notification Analytics: Track "Open Rates" for notifications to see which triggers (e.g., "Ride Started") get the fastest response. * In-App Inbox Sync: Ensure the notification.schema.ts always reflects the true state, so if a user opens a push, the in-app notification is marked as isRead: true automatically. Recommended Task Hierarchy for Developers: 1. Immediate: Fix updateRideStatus to notify multiple passengers at once. 2. Short Term: Centralize all FCM calls into notificationsService.notify to remove code duplication in rides.service.ts. 3. Medium Term: Add a background worker for notification retries. 4. Long Term: Implement the AI delay prediction model using driver GPS history.
Status New
Priority *Low Normal High Immediate
Assignee John PatchalaMadhu BabuMani KantaMaruthi BharathRamu KodaliThirupathirao Uppuvinay palakonda
Parent task
Start date
Due date
Estimated time Hours
% Done0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 %