Skip to content

Aashritha-2005/TaskManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskFlow — Project Management App

A full-stack project management web app where teams can create projects, assign tasks, track progress, and manage members — all with role-based access control.


Features

  • Authentication — Signup, login, JWT-based sessions (7-day expiry)
  • Projects — Create and manage projects, invite teammates by email
  • Tasks — Create tasks with title, description, status, priority, due date, and assignee
  • Dashboard — Overview of all projects, task counts by status, overdue tasks, upcoming deadlines
  • Role-Based Access Control — Admins manage tasks and members; Members update task status only
  • My Tasks — View all tasks assigned to you across every project

Tech Stack

Backend

Runtime Node.js
Framework Express.js
ORM Prisma
Database PostgreSQL
Auth JSON Web Tokens + bcryptjs
Validation express-validator

Frontend

Framework React 18
Build Tool Vite
Styling Tailwind CSS v4
Routing React Router v6
HTTP Client Axios
Icons lucide-react
Date Handling date-fns

Local Setup

Prerequisites

  • Node.js 18+
  • npm
  • A PostgreSQL database (local or Railway free tier)

1. Clone the repo

git clone <your-repo-url>
cd task-manager

2. Backend setup

cd backend
npm install
cp .env.example .env

Edit backend/.env and fill in:

DATABASE_URL="postgresql://user:password@host:5432/dbname"
JWT_SECRET="your-secret-key-here"
PORT=3001
NODE_ENV=development

Run migrations and start:

npx prisma migrate dev --name init
npm run dev

Backend runs at http://localhost:3001.

3. Frontend setup

cd frontend
npm install
cp .env.example .env

Edit frontend/.env:

VITE_API_URL=http://localhost:3001/api

Start the dev server:

npm run dev

Frontend runs at http://localhost:5173.


Environment Variables

Backend (backend/.env)

Variable Description Example
DATABASE_URL PostgreSQL connection string postgresql://user:pass@host:5432/db
JWT_SECRET Secret key for signing JWTs my-super-secret-key
PORT Port to listen on 3001
NODE_ENV Environment development or production

Frontend (frontend/.env)

Variable Description Dev value Prod value
VITE_API_URL Base URL for API calls http://localhost:3001/api /api

API Endpoints

Auth — /api/auth

Method Path Auth Description
POST /signup Create account
POST /login Login, returns JWT
GET /me Get current user

Projects — /api/projects

Method Path Auth Description
GET / List all projects (owner or member)
POST / Create a project
GET /:id Get project details + members
DELETE /:id ✅ Admin Delete project
POST /:id/members ✅ Admin Add member by email
DELETE /:id/members/:userId ✅ Admin Remove member
PATCH /:id/members/:userId ✅ Admin Change member role

Tasks — /api/tasks

Method Path Auth Description
GET /my-tasks Tasks assigned to current user
GET /project/:projectId Tasks for a project
POST /project/:projectId ✅ Admin Create task
PATCH /:id Update task (admins: all fields; members: status only)
DELETE /:id ✅ Admin Delete task

Dashboard — /api/dashboard

Method Path Auth Description
GET / Summary stats, overdue tasks, upcoming deadlines

Health

Method Path Description
GET /api/health Railway health check

Deployment on Railway

Step-by-step

  1. Push your code to GitHub

    git init
    git add .
    git commit -m "initial commit"
    git remote add origin <your-github-repo-url>
    git push -u origin main
  2. Create a Railway account at railway.app (free tier, no credit card)

  3. Create a new project in Railway → "Deploy from GitHub repo" → select your repo

  4. Add a PostgreSQL database

    • In your Railway project, click + NewDatabasePostgreSQL
    • Railway automatically sets the DATABASE_URL variable in your service
  5. Set environment variables on your Railway service:

    • JWT_SECRET = a long random string (e.g. generate with openssl rand -hex 32)
    • NODE_ENV = production
    • PORT is set automatically by Railway
  6. Railway will automatically:

    • Run the build command from railway.json
    • Run prisma migrate deploy on every deploy
    • Serve the app at your Railway URL
  7. Get your live URL from the Railway dashboard → Settings → Domains

Live URL

[Add after deployment]


Project Structure

task-manager/
├── backend/
│   ├── prisma/
│   │   └── schema.prisma
│   ├── src/
│   │   ├── middleware/     auth.js, rbac.js
│   │   ├── routes/         auth, projects, tasks, dashboard
│   │   ├── controllers/    authController, projectController, taskController, dashboardController
│   │   └── index.js
│   ├── .env.example
│   └── package.json
├── frontend/
│   ├── src/
│   │   ├── api/            axios.js
│   │   ├── components/     Navbar, Sidebar, Badge, Modal, ProtectedRoute
│   │   ├── context/        AuthContext.jsx
│   │   └── pages/          Login, Signup, Dashboard, Projects, ProjectDetail, MyTasks
│   ├── .env.example
│   └── package.json
├── railway.json
├── package.json
└── README.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors