Skip to content

uxwolf/team-task-manager

Repository files navigation

Team Task Manager

A full-stack web application for managing projects, assigning tasks, and tracking progress with role-based access control.

Features

  • Authentication: Sign up and login with JWT-based auth
  • Project Management: Create projects, add descriptions, and manage teams
  • Task Management: Create, assign, and track task status (To Do, In Progress, Done)
  • Dashboard: View task statistics, overdue tasks, and recent activity
  • Role-Based Access: Admin and Member roles with appropriate permissions
  • Team Collaboration: Add members to projects with email-based invites

Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS 4
  • Backend: Next.js API Routes (REST)
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT (JSON Web Tokens)
  • Validation: Zod
  • Password Hashing: bcryptjs

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • PostgreSQL database

Local Development

  1. Clone the repository

    git clone <your-repo-url>
    cd team-task-manager
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file:

    DATABASE_URL="postgresql://user:password@localhost:5432/taskmanager?schema=public"
    JWT_SECRET="your-secret-key-here"
  4. Run database migrations

    npx prisma migrate dev
  5. Start the development server

    npm run dev

    Open http://localhost:3000 in your browser.

Project Structure

team-task-manager/
├── src/
│   ├── app/
│   │   ├── (auth)/              # Auth pages (login, signup)
│   │   ├── (dashboard)/         # Protected dashboard pages
│   │   │   ├── dashboard/       # Dashboard with stats
│   │   │   └── projects/        # Project list & detail pages
│   │   ├── api/                 # REST API routes
│   │   │   ├── auth/            # Login, signup, me endpoints
│   │   │   ├── projects/        # CRUD for projects
│   │   │   ├── dashboard/       # Dashboard stats
│   │   │   └── ...
│   │   └── layout.tsx
│   ├── lib/
│   │   ├── auth.ts              # JWT helpers
│   │   ├── db.ts                # Prisma client
│   │   ├── middleware.ts        # Auth middleware
│   │   └── validations.ts       # Zod schemas
│   └── generated/prisma/        # Generated Prisma client
├── prisma/
│   └── schema.prisma            # Database schema
└── package.json

API Endpoints

Method Endpoint Description Auth
POST /api/auth/signup Register a new user No
POST /api/auth/login Login and get token No
GET /api/auth/me Get current user Yes
GET /api/projects List user's projects Yes
POST /api/projects Create a project Yes
GET /api/projects/:id Get project details Yes
PATCH /api/projects/:id Update project Admin
DELETE /api/projects/:id Delete project Owner
GET /api/projects/:id/tasks List project tasks Yes
POST /api/projects/:id/tasks Create a task Yes
PATCH /api/projects/:id/tasks/:taskId Update a task Yes
DELETE /api/projects/:id/tasks/:taskId Delete a task Admin
GET /api/projects/:id/members List project members Yes
POST /api/projects/:id/members Add a member Admin
DELETE /api/projects/:id/members Remove a member Admin
GET /api/dashboard Get dashboard stats Yes

Role-Based Access Control

  • Admin: Can create/edit/delete tasks, add/remove members, update project settings
  • Member: Can view and update task status, create tasks
  • Owner: Full control including project deletion

Deploying to Railway

  1. Push your code to GitHub
  2. Go to Railway and create a new project
  3. Add a PostgreSQL service from the marketplace
  4. Add a New Project from your GitHub repository
  5. Set the following environment variables in Railway:
    • DATABASE_URL - Use the PostgreSQL connection string from your Railway database
    • JWT_SECRET - A random secret key
  6. Set the Start Command to: npm start
  7. Railway will automatically build and deploy your app

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages