A full-featured Task Tracker backend built using Node.js, TypeScript, Express, PostgreSQL, and Drizzle ORM. The application supports user registration, authentication using JWT, and complete CRUD functionality for managing tasks.
- 🔐 User Authentication (Register/Login with JWT)
 - 🛡️ Middleware-based route protection
 - 📋 Task management (Create, Read, Update, Delete)
 - 🌱 Environment variable configuration with 
dotenv - 🧾 Type-safe schema with Drizzle ORM
 - 🧪 Input validation using Zod
 - ⚡ TypeScript + tsx/ts-node-dev for smooth dev experience
 
- Node.js
 - Express.js
 - TypeScript
 - PostgreSQL
 - Drizzle ORM
 - JWT (JSON Web Tokens)
 - Zod
 - dotenv
 - tsx / ts-node-dev
 
task-tracker/
├── drizzle.config.ts
├── package.json
├── tsconfig.json
├── .env
├── src/
│   ├── index.ts
│   ├── db.ts
│   ├── schema/
│   ├── routes/
│   ├── middleware/
│   └── utils/
git clone https://github.com/Murtaza99dev/task-tracker.git
cd task-tracker/backend
yarn installPORT=5000
JWT_SECRET=your_jwt_secret_key
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_postgres_user
DB_PASSWORD=your_postgres_password
DB_NAME=task_db
DATABASE_URL=postgresql://your_postgres_user:your_postgres_password@localhost:5432/task_db
yarn devThe server should now be running at: http://localhost:5000
| Method | Endpoint | Description | 
|---|---|---|
| POST | /api/register | Register new user | 
| POST | /api/login | Login and get JWT | 
| Method | Endpoint | Description | 
|---|---|---|
| GET | /api/tasks | Get all tasks | 
| POST | /api/tasks | Create new task | 
| PUT | /api/tasks/:id | Update task | 
| DELETE | /api/tasks/:id | Delete task | 
Note: All
/api/tasksendpoints require a JWT token in the request header:Authorization: Bearer <your_jwt_token>
Run after creating or modifying your schema in src/schema.
Push Schema to DB
npx drizzle-kit pushGenerate SQL from Schema
npx drizzle-kit generateStart server in watch mode:
yarn devDrizzle ORM setup config (drizzle.config.ts):
import { defineConfig } from "drizzle-kit";
import * as dotenv from "dotenv";
dotenv.config();
export default defineConfig({
  schema: "./src/schema",
  out: "./drizzle",
  driver: "pg",
  dbCredentials: {
    connectionString: process.env.DATABASE_URL!,
  },
});This project is licensed under the MIT License. See the LICENSE file for details.
Ghulam Murtaza
- GitHub: @Murtaza99dev
 - Email: murtaza99.dev@gmail.com
 - LinkedIn: https://www.linkedin.com/in/im-ghulam-murtaza/
 
- 📅 Task due dates and prioritization
 - 📊 Task analytics
 - 🌐 Frontend integration (React/Next.js)
 - 🧑🤝🧑 Team/task sharing
 
Let me know if you want a separate Postman/Bruno collection JSON or frontend instructions added.