A modern, multi-tenant task tracking application built with React, TypeScript, Node.js, Express, and PostgreSQL.
- Complete tenant isolation - Each organization has its own subdomain and isolated data
- Secure authentication - JWT-based authentication with bcrypt password hashing
- Tenant-scoped data access - All queries are automatically scoped to the authenticated user's tenant
- Kanban Board - Visual task board with drag-and-drop-style status updates
- Real-time Stats - Dashboard with task statistics by status
- Task Management - Create, read, update, and delete tasks with ease
- Priority Levels - Low, medium, and high priority tracking
- Due Dates - Set and track task deadlines
- Status Tracking - To Do, In Progress, and Done states
- Responsive Design - Works on desktop, tablet, and mobile devices
- Modern UI - Built with Tailwind CSS for a clean, professional look
- Intuitive Interface - Easy-to-use forms and interactions
- Node.js - Runtime environment
- Express - Web framework
- TypeScript - Type-safe JavaScript
- PostgreSQL - Relational database
- JWT - Authentication tokens
- bcryptjs - Password hashing
- React - UI library
- TypeScript - Type-safe JavaScript
- Vite - Build tool and dev server
- React Router - Client-side routing
- Axios - HTTP client
- Tailwind CSS - Utility-first CSS framework
- Node.js 18+ and npm
- PostgreSQL 14+
-
Clone the repository
git clone https://github.com/rajibhasenraju/TaskTracker.git cd TaskTracker -
Set up the backend
cd backend npm install cp .env.example .env # Edit .env and configure your database connection
-
Set up the frontend
cd ../frontend npm install cp .env.example .env # Edit .env if needed (default: http://localhost:3001/api)
Create a PostgreSQL database:
CREATE DATABASE tasktracker;Update the backend/.env file with your database credentials:
DATABASE_URL=postgresql://username:password@localhost:5432/tasktracker
JWT_SECRET=your-secret-key-change-in-production
PORT=3001
-
Start the backend (from the backend directory)
npm run dev
The backend will run on http://localhost:3001
-
Start the frontend (from the frontend directory)
npm run dev
The frontend will run on http://localhost:5173
-
Access the application
- Open your browser to http://localhost:5173
- Register a new organization and user
- Start creating and managing tasks!
The application uses a shared database with tenant isolation approach:
- Tenant Identification: Each organization has a unique subdomain
- Data Isolation: All tables include a
tenant_idcolumn - Query Scoping: Middleware ensures all queries are automatically scoped to the user's tenant
- Security: Row-level security through application logic
-- Tenants table
tenants (id, name, subdomain, created_at, updated_at)
-- Users table (tenant-scoped)
users (id, tenant_id, email, password, name, role, created_at, updated_at)
-- Tasks table (tenant-scoped)
tasks (id, tenant_id, title, description, status, priority, assigned_to, created_by, due_date, created_at, updated_at)POST /api/auth/register- Register new organization and admin userPOST /api/auth/login- Login with subdomain, email, and passwordGET /api/auth/me- Get current user information
GET /api/tasks- Get all tasks for the tenantGET /api/tasks/:id- Get a specific taskPOST /api/tasks- Create a new taskPUT /api/tasks/:id- Update a taskDELETE /api/tasks/:id- Delete a taskGET /api/tasks/stats- Get task statistics
GET /api/users- Get all users in the tenantGET /api/users/:id- Get a specific user
- Password Hashing: All passwords are hashed using bcrypt
- JWT Authentication: Secure token-based authentication
- Tenant Isolation: Complete data separation between organizations
- Input Validation: Server-side validation of all inputs
- CORS Protection: Configured CORS for secure cross-origin requests
cd backend
npm run dev # Run with auto-reload
npm run build # Build TypeScript
npm start # Run production buildcd frontend
npm run dev # Run development server
npm run build # Build for production- Build the application:
npm run build - Set environment variables on your server
- Run:
npm start
- Build the application:
npm run build - Deploy the
distfolder to your static hosting service - Configure environment variables for production API URL
ISC
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on GitHub.