This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Use British English throughout all code, comments, documentation, and user-facing text
- Examples: "colour" not "color", "organisation" not "organization", "realise" not "realize"
Amser is a sophisticated time tracking application built as a Toggl clone with advanced rate management features. It supports both personal and organisational time tracking with team collaboration capabilities.
- Next.js 15.4.5 with App Router
- TypeScript with strict mode enabled
- React 19.1.0 with React DOM 19.1.0
- Tailwind CSS v4 (latest version using new
@pluginsyntax) - DaisyUI 5.0.50 with custom dark theme configuration
- Geist fonts (Sans and Mono) from Google Fonts
- Custom dark theme (
daisy-theme) with carefully crafted color palette
- ESLint 9 with Next.js and TypeScript configurations
- PostCSS with Tailwind CSS plugin
- Turbopack enabled for faster development builds
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- Frontend: Next.js 14+ App Router, TypeScript, Tailwind CSS + DaisyUI
- State Management: Zustand (planned)
- Forms: React Hook Form (planned)
- Backend: Next.js API Routes with NextAuth.js
- Database: MongoDB with Mongoose ODM
-
Authentication & User Management
- NextAuth.js integration
- User registration/login with session management
- Protected routes
-
Organisation & Team Management
- Multi-tenant organisation system
- Role-based permissions (Admin, Member)
- Team member invitations
- Context switching between personal/organisation workspaces
-
Time Tracking
- Live timer with real-time updates
- Manual time entry with date/time pickers
- Project and client assignment
- Organisation-aware time tracking
-
Advanced Rate Management
- Base rates per project/client
- Conditional rate rules with weekly thresholds
- Automatic rate switching based on hours worked
- Weekly calculation engine
-
Project & Client Management
- Personal and organisation-scoped resources
- Project categorization
- Client management with colour coding
- Archive/delete functionality
- Users: Email, name, organisation memberships, settings
- Organisations: Name, slug, owner, settings, categories
- OrganisationMembers: User-organisation relationships with roles
- Clients: Personal or organisation-scoped client management
- Projects: Under clients, with categories and default rates
- TimeEntries: Duration tracking with applied rates
- RateRules: Complex rate calculation rules with thresholds
src/
├── app/
│ ├── favicon.ico
│ ├── globals.css # Tailwind + DaisyUI configuration
│ ├── layout.tsx # Root layout with theme
│ └── page.tsx # Demo page with DaisyUI components
src/
├── app/
│ ├── api/
│ │ ├── auth/
│ │ ├── organisations/
│ │ ├── clients/
│ │ ├── projects/
│ │ ├── time-entries/
│ │ └── rate-rules/
│ ├── dashboard/
│ ├── timer/
│ ├── reports/
│ ├── organisation/
│ └── settings/
├── components/
│ ├── ui/
│ ├── forms/
│ ├── timer/
│ └── tables/
├── lib/
│ ├── auth.ts
│ ├── mongodb.ts
│ ├── models/
│ └── utils/
└── types/
└── index.ts
- Target: ES2017
- Strict mode enabled
- Path aliases:
@/*maps to./src/* - Next.js plugin enabled
- Tailwind CSS v4 with new plugin syntax
- DaisyUI plugin with custom dark theme
- Custom colour palette with OKLCH colour space
- Geist fonts with CSS variables
The project uses a custom DaisyUI theme called daisy-theme with:
- Dark colour scheme by default
- Custom OKLCH-based colour palette
- Rounded corners (0.5rem for selectors, 0.25rem for fields)
- Custom depth and noise effects
- Current Phase: Foundation setup complete
- Next Steps: Implement authentication, database models, and core time tracking features
- Demo: Currently shows DaisyUI component examples
- Use DaisyUI classes for consistent styling
- Custom theme applied at HTML level with
data-theme="daisy-theme" - Responsive design with Tailwind utilities
- Tailwind CSS v4 with
@importand@plugindirectives - Custom DaisyUI theme with dark-first design
- OKLCH colour space for better colour management
- CSS custom properties for theme values
- Rate Calculation Engine: Complex weekly threshold-based rate switching
- Organisation Context: Multi-tenant data scoping and permission system
- Real-time Updates: Live timer functionality with persistent state
- Team Collaboration: Shared resources and permission-based access control