Project case study

Sales CRM

A full-stack CRM for sales teams. Agents track leads, log notes and contacts, set reminders, and receive real-time in-app notifications. Managers have full visibility while agents only see their own data.

Sales CRM screenshot
React + TypeScriptFrontend
Django REST FrameworkBackend
2 user rolesManager · Agent
Celery + RedisBackground tasks
Overview

What is the Sales CRM?

A full-stack CRM built for sales teams with a decoupled Django REST Framework backend and a React TypeScript frontend. Every API request is authenticated via JWT Bearer tokens sent through Axios.

The system enforces strict data isolation. Agents can only see and manage their own leads, while managers have full visibility across the team. A background task system powered by Celery Beat and Redis evaluates due reminders every 60 seconds and delivers real-time in-app popup notifications to the right agent within 10 seconds.

User roles

Two roles, different access

Manager
  • Full visibility across all agents and their leads
  • Can delete leads and other resources (DELETE restricted to managers)
  • Oversee team activity and lead pipeline
Agent
  • Access only their own leads, enforced at the queryset level
  • Log notes, contacts, and documents against leads
  • Set reminders and receive real-time in-app notifications
Features

What it does

Role-based access control
Custom Django user model extending AbstractUser with Manager/Agent roles. Data isolation enforced at the queryset level, not just the view layer.
Lead management
Agents track leads with full profiles: notes, contacts, and reminders returned in a single API response via nested serialization.
Reminder system
Celery Beat runs a background task every 60 seconds, evaluating due reminders against the current timezone-aware datetime and marking them as sent.
Real-time notifications
Frontend polls for due reminders and delivers in-app popup alerts to the correct agent within 10 seconds, with optimistic dismissal and deduplication via useRef.
JWT authentication
Every API request carries a JWT Bearer token via Axios. A custom permission class (IsManagerOrReadOnly) restricts destructive operations to managers only.
Nested API responses
Nested serialization returns a lead's full profile (notes, contacts, and reminders) in a single API call, reducing frontend round trips.
Tech stack

Built with

Frontend
ReactTypeScriptTailwind CSS
Backend
Django REST FrameworkDjango ORM
Auth
JWTCORS Headers
Background tasks
CeleryRedis
HTTP client
Axios
Challenges

What I worked through

Enforcing data isolation without duplicating logic Solved
Rather than adding permission checks in every view, I overrode get_queryset on the viewsets to filter by the requesting user at the database level. Agents physically cannot retrieve another agent's leads; the queryset never includes them, regardless of what ID is passed in the URL.
Delivering reminder notifications reliably to the right user Solved
Since the app doesn't use WebSockets, I implemented a polling approach on the frontend using React Context. The context polls a reminders endpoint every few seconds, compares results against a useRef set of already-seen IDs to deduplicate, and triggers popup alerts only for new, unacknowledged reminders belonging to the logged-in agent.
Timezone-aware reminder evaluation in Celery Solved
Reminders needed to fire at the correct local time regardless of server timezone. I configured Django's timezone settings and ensured all datetime comparisons in the Celery task used timezone-aware datetimes, preventing reminders from firing at the wrong time for users in different timezones.
Healthcare System Dryft and Wick