A sophisticated time tracking application built as a Toggl clone with advanced rate management features. Supports both personal and organisational time tracking with team collaboration capabilities.
- ✅ NextAuth.js integration with Google OAuth
- ✅ User registration/login with session management
- ✅ Protected routes and authentication guards
- ✅ MongoDB integration with Mongoose ODM
- ✅ Complete database schemas (User, Organisation, Client, Project, TimeEntry, RateRule)
- ✅ Multi-tenant organisation system support
- ✅ Zustand stores for timer state and app state
- ✅ Persistent timer state across browser sessions
- ✅ Organisation context switching
- ✅ Live timer with real-time updates
- ✅ Project and client assignment
- ✅ Persistent timer state
- ✅ Time entry creation and display
- ✅ Automatic rate calculation
- ✅ Client CRUD operations with colour coding
- ✅ Project management with categories and rates
- ✅ Organisation-scoped resource management
- ✅ Real-time dashboard with statistics
- ✅ Recent activity tracking
- ✅ Earnings calculations
- ✅ Active project overview
- ✅ Responsive design with Tailwind CSS v4
- ✅ DaisyUI components with custom dark theme
- ✅ British English throughout
- ✅ Intuitive navigation and user experience
- ⏳ Manual time entry management (editing, deletion)
- ⏳ Advanced rate calculation engine with conditional rules
- ⏳ Organisation and team management features
- ⏳ Reports and analytics dashboard
- ⏳ Settings and user profile management
- Frontend: Next.js 15.4.5 with App Router, TypeScript, React 19.1.0
- Styling: Tailwind CSS v4 + DaisyUI 5.0.50 with custom dark theme
- State Management: Zustand with persistence
- Authentication: NextAuth.js with Google OAuth
- Database: MongoDB with Mongoose ODM
- Development: ESLint 9, Turbopack for fast builds
- Node.js 18+ and npm
- MongoDB database (local or cloud)
- Google OAuth credentials
- Clone the repository and install dependencies
npm install
- Set up environment variables
cp .env.example .env.local
Edit .env.local
with your configuration:
MONGODB_URI=mongodb://localhost:27017/
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret-key-here
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
- Start the development server
npm run dev
- Open http://localhost:3000 in your browser
- Go to the Google Cloud Console
- Create a new project or select existing
- Enable the Google+ API
- Create OAuth 2.0 credentials
- Add
http://localhost:3000/api/auth/callback/google
to authorized redirect URIs - Copy the Client ID and Client Secret to your
.env.local
file
- Sign in with Google
- Create clients and projects
- Start tracking time with the timer
- View dashboard for analytics
- Create or join an organisation
- Switch between personal and organisation context
- Collaborate on shared projects
- Manage team permissions
npm run dev # Start development server with Turbopack
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
src/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ ├── dashboard/ # Dashboard page
│ ├── timer/ # Timer functionality
│ ├── projects/ # Project management
│ └── auth/ # Authentication pages
├── components/ # React components
│ ├── ui/ # UI components
│ └── layout/ # Layout components
├── lib/ # Utilities and configurations
│ ├── stores/ # Zustand stores
│ ├── models/ # Database models
│ ├── auth.ts # NextAuth configuration
│ └── mongodb.ts # Database connection
└── types/ # TypeScript type definitions
Please follow the British English conventions used throughout the application and maintain the existing code style and patterns.