Client Tracker is a CRM-style application designed for freelancers and small consultancies to track leads, deals and revenue in one place.
- No signup required
- Safe demo environment
- Read-only access
- Preview
- Features
- Tech Stack
- Authentication
- Role-Based Access Control
- Billing
- Analytics
- Running Locally
- Contributions
- License
- Full CRUD for leads and deals
- Authentication with role-based access control (RBAC)
- Secure demo environment (no user data required)
- Server-side analytics and data aggregation
- Subscription billing with Stripe (test mode)
- 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)
- NextAuth with Prisma adapter
- OAuth providers (Google, GitHub)
- Database session strategy
The application supports two distinct modes controlled via environment variables.
- OAuth providers disabled
- Read-only access
- Uses seeded demo account
NEXT_PUBLIC_DEMO_MODE=true
ENABLE_OAUTH=false
Ensure your demo user email is defined in prisma/seed.ts and seeded before running the app.
pnpm dlx prisma db seed
Enable OAuth providers:
NEXT_PUBLIC_DEMO_MODE=false
ENABLE_OAUTH=true
The application implements two roles:
- Full CRUD access
- Access to analytics
- Manage billing and subscriptions
- Read-only access
- Can view analytics
- Cannot modify data or manage billing
- The first authenticated user is assigned the
ownerrole - All subsequent users are assigned the
viewerrole
| 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 only
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
- Environment variables
The application uses environment variables for configuration.
Copy the example file .env.example and fill in the required values.
- Run database migrations
pnpm prisma migrate dev
- Seed the database
pnpm dlx prisma db seed
- Start the development server
pnpm dev
The application will be available at:
http://localhost:3000
Contributions are welcome. Feel free to open issues or submit pull requests.
MIT License