A modern, efficient time tracking API built with Deno, featuring project management, time tracking, and financial operations.
- 👥 User Authentication & Management
- 📊 Project Management
- ⏱️ Time Tracking & Timer System
- 💰 Financial Operations & Budgeting
- 📈 Profit Sharing & Distribution
- 🔄 Real-time Timer Updates
- Deno - A modern runtime for JavaScript and TypeScript
- Deno KV - Built-in key-value store
- Deno Standard Library - Standard library modules
/api
/handlers # Route handlers for different features
- auth.ts # Authentication handlers
- projects.ts # Project management handlers
- timers.ts # Time tracking handlers
- financials.ts # Financial operations handlers
- timeEntries.ts # Time entry handlers
- budget.ts # Budget management handlers
/middleware
- auth.ts # Authentication middleware
/utils
- response.ts # Response formatting utilities
- router.ts # Main API router with CORS and prefixing
/db.ts # Database operations using Deno KV
/types.ts # TypeScript interfaces and types
/tests # Test files for each module
-
Install Deno:
curl -fsSL https://deno.land/x/install/install.sh | sh -
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Start the server:
deno task start
The server will start on http://localhost:8000 by default.
PORT- Server port (default: 8000)DENO_DEPLOYMENT_ID- Set by Deno Deploy in production
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout user
POST /api/projects- Create a projectGET /api/projects/:id- Get project detailsPUT /api/projects/:id- Update projectGET /api/projects/:id/members- Get project membersPOST /api/projects/:id/invite- Invite member to project
POST /api/timers/start- Start a timerPOST /api/timers/stop- Stop active timerGET /api/timers/active- Get active timerGET /api/projects/:id/timers- Get project timers
POST /api/time-entries- Create time entryGET /api/time-entries- Get time entriesGET /api/time-entries/:id- Get specific time entryPOST /api/time-entries/:id/complete- Complete time entry
POST /api/pay-periods- Create pay periodGET /api/pay-periods- Get pay periodsGET /api/users/:id/financials- Get user financialsGET /api/projects/:id/financials- Get project financialsPOST /api/projects/:id/distribute-profits- Distribute project profits
deno testdeno fmtdeno lintThis project is designed to be deployed on Deno Deploy. Follow these steps:
- Create a new project on Deno Deploy
- Link your repository
- Configure environment variables
- Deploy!
MIT License - see LICENSE file for details