Skip to content

Allendior/team-task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team Task Manager

A full-stack task management app with project-based workspaces, role-based access, and a Kanban board.

Stack: Node.js · Express · PostgreSQL · React · Tailwind CSS · JWT


Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL database (local or Railway)

1. Clone and install

git clone https://github.com/your-user/team-task-manager
cd team-task-manager
npm run install:all

2. Configure backend environment

cp backend/.env.example backend/.env

Edit backend/.env:

Variable Description
DATABASE_URL PostgreSQL connection string
JWT_SECRET Long random string (≥32 chars)
PORT API port (default 3001)
CLIENT_URL Frontend origin for CORS (default http://localhost:5173)

3. Start the backend

npm run dev:backend

The server applies schema.sql automatically on startup — no manual migration needed.

4. Seed demo data

npm run seed

This creates two demo accounts:

Role Email Password
Admin admin@demo.com password123
Member member@demo.com password123

5. Start the frontend

npm run dev:frontend

Open http://localhost:5173


What's Inside

Roles

Action Admin Member
Create / delete projects
Add / remove project members
Create / delete tasks
Edit any task field
Update status of own assigned tasks
View projects & tasks

API Endpoints

POST   /api/auth/signup
POST   /api/auth/login
GET    /api/auth/me

GET    /api/projects
POST   /api/projects              (admin)
GET    /api/projects/:id
PUT    /api/projects/:id          (admin)
DELETE /api/projects/:id          (admin)
GET    /api/projects/:id/members
POST   /api/projects/:id/members  (admin)
DELETE /api/projects/:id/members/:userId (admin)

GET    /api/tasks/dashboard
GET    /api/tasks/project/:projectId
POST   /api/tasks/project/:projectId  (admin)
PUT    /api/tasks/:id
DELETE /api/tasks/:id             (admin)

Deploy to Railway

One-service setup (backend serves built frontend)

  1. Push the repo to GitHub.
  2. Create a new Railway project → Deploy from GitHub repo.
  3. Add a PostgreSQL plugin — Railway injects DATABASE_URL automatically.
  4. Set environment variables in Railway:
    JWT_SECRET=<generate a long secret>
    NODE_ENV=production
    
  5. Set the start command:
    npm run build && npm start
    
  6. Railway will build the frontend into frontend/dist and the Express server will serve it.

Two-service setup (recommended for scale)

Deploy backend and frontend as separate Railway services, pointing VITE_API_URL on the frontend to the backend's public URL.


Project Structure

team-task-manager/
├── backend/
│   ├── src/
│   │   ├── config/db.js          # pg Pool
│   │   ├── middleware/auth.js    # JWT authenticate + requireAdmin
│   │   └── routes/
│   │       ├── auth.js           # signup / login / me
│   │       ├── projects.js       # project + member management
│   │       └── tasks.js          # task CRUD + dashboard
│   ├── seeds/seed.js             # demo data
│   └── schema.sql                # table definitions (auto-applied on start)
└── frontend/
    └── src/
        ├── api/client.js         # Axios instance with token interceptor
        ├── context/AuthContext.jsx
        ├── components/           # Navbar, TaskCard, TaskModal, ProjectModal, …
        └── pages/                # Login, Signup, Dashboard, Projects, ProjectDetail

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors