Client Tracker is a CRM-style application designed for freelancers and small consultancies to track leads, deals and revenue in one place.
- Preview
- Features
- Tech Stack
- Role-Based Access Control
- Billing
- Analytics
- Running Locally
- Contributions
- License
- CRUD operations to create, view, edit and delete leads and deals
- Authentication and role-based access control (RBAC)
- Data aggregation and analytics
- Subscription billing with Stripe
- Next.js (App Router)
- React + TypeScript
- Tailwind CSS
- shadcn/ui
- Next.js Server Components & API Routes
- Prisma ORM
- PostgreSQL (Neon)
- NextAuth (OAuth)
- Stripe (Test Mode Billing)
The application implements two roles:
- Full access to all CRUD operations
- Can view analytics
- Can manage billing and subscriptions
- Read-only access to leads and deals
- Can view analytics
- Cannot modify data
- Cannot manage billing
| Action | Owner | Viewer |
|---|---|---|
| View leads | ✅ | ✅ |
| Create/edit leads | ✅ | ❌ |
| View deals | ✅ | ✅ |
| Create/edit deals | ✅ | ❌ |
| View analytics | ✅ | ✅ |
| Manage billing | ✅ | ❌ |
Billing is implemented using Stripe (test mode).
Free — limited number of deals
Pro — unlimited deals
- Deals limit is enforced at creation time
- Existing deals can always be viewed
- Billing actions are restricted to Owners
The dashboard provides aggregated insights:
- Total leads created
- Total deals created
- Deals won vs lost
- Total Revenue
Analytics are computed server-side using database aggregation queries to ensure accuracy and consistency.
- Clone the repository and install dependencies
git clone https://github.com/dnmore/client-tracker.git
cd client-tracker
- Install dependencies
pnpm install
-
Create
.envfile in the project root and configure environment variables (OAuth, database, Stripe test keys) -
Run database migrations
pnpm prisma migrate dev
- Start the development server
pnpm dev
The application will be available at:
http://localhost:3000
Contributions are welcome!
- Fork the repository.
- Create a new branch (
feature/your-feature-name). - Commit changes with clear messages.
- Submit a pull request.
This project is licensed under the MIT License.