Add assignment engine, FCM, WebSockets, city gate, and internal APIs
- internal/assignment: GEORADIUS miler assignment with retry/escalation, customer-side provider scoring, FCM notifications on assign - internal/notify: Firebase Admin SDK (FCM) client initialisation - internal/ws: WebSocket handlers for live parcel tracking and customer↔miler chat - middlewares: city gate (pincode prefix validation), internal API key auth, WebSocket JWT auth - controllers: InternalNotify + InternalReassign for machine-to-machine calls; pricing helpers wired into CreateCustomerBooking and CreateCRMBooking - routes: /internal/*, /ws/bookings/:id/track, /ws/bookings/:id/chat - models/users, models/doormile_pricing: new fields for device tokens, assignment state, pricing bands - seed_data.sql: initial pricing seed rows .env and Firebase service-account JSON intentionally excluded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2
main.go
2
main.go
@@ -9,6 +9,7 @@ import (
|
||||
"doormile/config"
|
||||
"doormile/controllers"
|
||||
"doormile/db"
|
||||
"doormile/internal/notify"
|
||||
"doormile/internal/worker"
|
||||
"doormile/middlewares"
|
||||
"doormile/migrations"
|
||||
@@ -31,6 +32,7 @@ func main() {
|
||||
db.Connect(cfg)
|
||||
db.InitRedis(cfg)
|
||||
db.InitNATS(cfg)
|
||||
notify.InitFCM()
|
||||
|
||||
// 3. Run GORM migrations for logistics tables
|
||||
if db.DB != nil {
|
||||
|
||||
Reference in New Issue
Block a user