A Next.js application for tracking student and client hours using Toggl Track integration.
- 🕒 Hours tracking integration with Toggl Track
- 📊 Client-specific time tracking with custom tags
- 💾 SQLite database for client data storage
- 🔒 Type-safe API endpoints with Zod validation
- Node.js
- Toggl Track account with API access
Create a .env file with:
cp .env.example .env.localnpm installSeed the database with initial data:
npm run seedStart the development server:
npm run devCreate a production build:
npm run buildRetrieves client tracking data including remaining hours and last tracked entry.
clientId(UUID): The unique identifier for the client
{
"clientId": "uuid",
"hoursRemaining": 40,
"lastPaidDate": "2024-01-01T00:00:00.000Z",
"togglLink": "https://track.toggl.com/timer?tags=client-tag",
"lastEntryTrackedDate": "2024-01-02T10:00:00.000Z"
}Run the test suite:
npm test