Thyme is a modern time tracking web application designed for KnowAll.ai team members. It integrates with Microsoft Dynamics 365 Business Central for project/job data synchronization and uses Microsoft Entra ID for authentication.
┌─────────────────────────────────────────┐
│ Microsoft Entra ID │
│ (Authentication Provider) │
└────────────────────┬────────────────────┘
│ OAuth 2.0 / OIDC
│
┌─────────────┐ │ ┌─────────────────┐
│ Browser │────────HTTPS─────────┼──────────────────────│ Business │
│ (React SPA)│ │ │ Central API │
└─────────────┘ │ │ (OData v4) │
▼ └─────────────────┘
┌──────────────────┐ │
│ Azure App │ │
│ Service │───────Bearer Token────┘
│ (Next.js) │
└──────────────────┘src/
├── app/ # Next.js App Router pages
├── components/
│ ├── ui/ # Reusable UI components (Button, Input, Modal)
│ ├── layout/ # Layout components (Header, Footer)
│ ├── landing/ # Landing page for unauthenticated users
│ ├── dashboard/ # Main dashboard after login
│ ├── timesheet/ # Weekly timesheet components
│ ├── timer/ # Timer functionality
│ ├── projects/ # Project listing and selection
│ └── reports/ # Reporting and export
├── hooks/ # Custom React hooks and Zustand stores
├── services/
│ ├── auth/ # MSAL configuration and helpers
│ └── bc/ # Business Central API client
├── types/ # TypeScript type definitions
└── utils/ # Utility functionsThe application uses Zustand for state management with the following stores:
-
useTimerStore - Timer state with persistence (localStorage)
-
useProjectsStore - Projects and tasks from Business Central
-
useTimeEntriesStore - Time entries with local caching
-
useSettingsStore - User preferences with persistence
1. User clicks "Sign in with Microsoft"
2. MSAL.js initiates OAuth 2.0 authorization code flow
3. User authenticates with Microsoft Entra ID
4. Token returned with BC API scope
5. Token stored in browser (managed by MSAL)
6. App renders authenticated dashboard| BC Entity | Thyme Concept | Purpose |
|---|---|---|
Jobs |
Projects |
Project/client work containers |
Job Task Lines |
Tasks |
Billable activities within projects |
Resources |
Users |
Employee/contractor mapping |
Job Journal Lines |
Time Entries |
Actual time logged |
-
Microsoft Entra ID provides enterprise-grade authentication
-
Single Sign-On (SSO) for KnowAll.ai users
-
Token refresh handled automatically by MSAL.js
-
No passwords stored in application
-
Only authenticated KnowAll.ai users can access
-
BC API access controlled by token scope
-
User can only see/edit own time entries (enforced in UI)
| Layer | Technology | Purpose |
|---|---|---|
Frontend |
React 18 |
UI framework |
Framework |
Next.js 14 |
SSR/routing |
Styling |
Tailwind CSS |
Utility-first CSS |
State |
Zustand |
Client state management |
Auth |
MSAL.js |
Azure AD authentication |
Data |
Business Central OData |
Backend data |
Testing |
Playwright + Vitest |
E2E + Unit tests |
Hosting |
Azure App Service |
Cloud hosting |