How sachinsh97/mail-tracker works
Mail Tracker is a web app and API for creating email-open trackers. A signed-in user creates a tracker, copies its pixel into an email, and later views open status and history; recipient mail clients load the pixel, which the service evaluates and records. The README also documents collections, notifications, Google sign-in, and filtering false opens. Edges reflect the excerpts, SOURCE INDEX references, and README; several implementation details, especially storage and live-event wiring, were not sampled.
Main entry points: router.tsx Screen routing · api-v1.routes.ts API routing · tracker.controller.ts Tracker endpoints · http.ts API client
Components 21
Web client
- Screen routing
client/src/router.tsx - Create tracker
client/src/hooks/useAddTrackerForm.ts - Tracker views
client/src/screens/TrackerScreen.tsx - Collections views
client/src/screens/CollectionScreen.tsx - Notifications view
client/src/screens/NotificationsScreen.tsx - Sign-in client
client/src/services/auth.service.ts - API client
client/src/services/http.ts
API and identity
- API routing
service/src/routes/api-v1.routes.ts - Authentication
service/src/modules/auth/auth.service.ts - Session guard
service/src/middlewares/authenticate.ts - Tracker endpoints
service/src/modules/trackers/tracker.controller.ts - Collection endpoints
service/src/modules/collections/collection.controller.ts - Notification endpoints
service/src/modules/notifications/notification.controller.ts
Open detection
- Pixel route
service/src/modules/tracking/tracking.routes.ts - Pixel handling
service/src/modules/tracking/tracking.controller.ts - Hit evaluation
service/src/modules/tracking/tracking.service.ts
Persistence and updates
- PostgreSQL
- Live event stream
service/src/modules/live-events/live-events.controller.ts
Other components
- Email sender
- Recipient mail app
- Google sign-in
Connections 23
- Email sender → Screen routing: uses app
- Screen routing → Create tracker: routes to
client/src/router.tsx - Screen routing → Tracker views: routes to
client/src/router.tsx - Screen routing → Collections views: routes to
client/src/router.tsx - Screen routing → Notifications view: routes to
client/src/router.tsx - Create tracker → API client: requests API
client/src/hooks/useAddTrackerForm.ts - Sign-in client → API client: sends requests
client/src/services/auth.service.ts - Sign-in client → Google sign-in: redirects for sign-in
client/src/services/auth.service.ts - API client → API routing: calls API
- API routing → Session guard: guards routes
service/src/routes/api-v1.routes.ts - API routing → Tracker endpoints: dispatches tracker routes
service/src/routes/api-v1.routes.ts - API routing → Collection endpoints: dispatches collection routes
service/src/routes/api-v1.routes.ts - API routing → Notification endpoints: dispatches notifications
service/src/routes/api-v1.routes.ts - Tracker endpoints → Hit evaluation: creates trackers
service/src/modules/trackers/tracker.controller.ts - Recipient mail app → Pixel route: loads pixel
- Pixel route → Pixel handling: dispatches request
service/src/modules/tracking/tracking.routes.ts - Pixel handling → Hit evaluation: handles hit
service/src/modules/tracking/tracking.controller.ts - Hit evaluation → PostgreSQL: records hits
- Tracker endpoints → PostgreSQL: persists tracker data
- Collection endpoints → PostgreSQL: persists collections
- Notification endpoints → PostgreSQL: reads notifications
- Live event stream → Email sender: streams updates
- Tracker views → Email sender: shows open history