A modern team project management app with calendar support. Built with Node.js + Express, React + Vite, TypeScript, MySQL, and Prisma.
Phase 1 Focus: User authentication and foundation. Future phases will add boards, tasks, calendar views, and real-time collaboration.
- Node.js 18+ and npm 9+
- MySQL 8.0+ (local or Docker)
- Git
Option A: macOS with Homebrew
brew install mysql
brew services start mysqlOption B: Docker
docker run --name mysql -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql:8.0mysql -u root -p
# Enter password (or leave blank if using Homebrew)
CREATE DATABASE taskflow;
EXIT;Backend β Copy .env.example to .env:
cd backend
cp .env.example .envEdit backend/.env:
DATABASE_URL="mysql://root:password@localhost:3306/taskflow"
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="7d"
NODE_ENV="development"
API_PORT=5000
FRONTEND_URL="http://localhost:5173"Frontend β Copy .env.example to .env:
cd frontend
cp .env.example .envEdit frontend/.env:
VITE_API_URL="http://localhost:5000"# From root directory
npm install
# Run Prisma migrations
npx prisma migrate dev
# Start both backend and frontend
npm run devThis will start:
- Backend on
http://localhost:5000 - Frontend on
http://localhost:5173
From the root directory:
npm run devβ Start both backend and frontend (hot reload)npm run buildβ Build both backend and frontend for productionnpm run backendβ Start backend onlynpm run frontendβ Start frontend only
From the backend directory:
npm run devβ Start TypeScript dev servernpm run buildβ Compile TypeScript to JavaScriptnpm startβ Run compiled servernpx prisma studioβ Open Prisma Studio (database GUI)npx prisma migrate devβ Create and apply migrations
From the frontend directory:
npm run devβ Start Vite dev server with hot reloadnpm run buildβ Build for productionnpm run previewβ Preview production build locallynpm run lintβ Run ESLint
Navigate to http://localhost:5173 (redirects to login)
- Go to
/signup - Fill in name, email, password (min 8 chars)
- Click "Sign Up"
- You're automatically logged in and redirected to dashboard
- Log out on dashboard
- Enter email and password
- Redirected to dashboard on success
- Try visiting
/dashboardwithout logging in - Redirected to
/login(auth middleware works!)
taskflow/
βββ backend/
β βββ src/
β β βββ routes/ # API route handlers
β β βββ controllers/ # Business logic
β β βββ middleware/ # Auth, error handling
β β βββ lib/ # Utils (JWT, DB, password)
β β βββ schemas/ # Zod validation schemas
β β βββ server.ts # Express setup
β βββ prisma/
β β βββ schema.prisma # Database schema
β βββ .env.example
β βββ package.json
βββ frontend/
β βββ src/
β β βββ pages/ # Login, Signup, Dashboard
β β βββ components/ # Reusable UI (Button, Input, etc.)
β β βββ lib/ # API client, Auth context
β β βββ hooks/ # Custom React hooks
β β βββ App.tsx # Main router
β β βββ main.tsx # Entry point
β βββ .env.example
β βββ vite.config.ts
β βββ tailwind.config.js
β βββ package.json
βββ .gitignore
βββ package.json # Workspace config
βββ README.md
- β Passwords hashed with bcryptjs (10 rounds)
- β JWT tokens (7-day expiry)
- β Bearer token authentication
- β CORS configured for frontend origin only
- β Helmet for security headers
- β Rate limiting on auth routes (5 requests per 15 min)
- β Input validation with Zod
- β 401 interceptor redirects to login on token expiry
- β No stack traces leaked in production
| Layer | Technology |
|---|---|
| Backend | Node.js, Express.js, TypeScript |
| Database | MySQL, Prisma ORM |
| Frontend | React 18, Vite, TypeScript |
| Styling | Tailwind CSS, dark mode |
| Auth | JWT + bcryptjs |
| Validation | Zod |
| Animation | Framer Motion |
| HTTP Client | Axios with interceptors |
| Method | Endpoint | Auth | Request | Response |
|---|---|---|---|---|
| POST | /api/auth/signup |
β | { email, password, name } |
{ user, token } |
| POST | /api/auth/login |
β | { email, password } |
{ user, token } |
| GET | /api/auth/me |
β | β | { user } |
| GET | /health |
β | β | { status: 'ok' } |
- Colors: Black, white, gray only (dark mode by default)
- Font: Inter sans-serif
- Spacing: Generous whitespace, clean layout
- Animation: Subtle Framer Motion fade-ins
- Responsive: Mobile-first, works on all screens
- Backend not running. Try
npm run backendfrom root.
- Backend not accessible. Ensure
FRONTEND_URLin.envmatches where backend is running.
- Database not running. Start with
brew services start mysqlor Docker.
- JWT_SECRET mismatch. Ensure same secret in backend
.env.
- User already registered. Sign up with different email or login.
- Boards & projects
- Task management (create, update, delete, assign)
- Calendar view with events
- Team member invitations
- RBAC (Owner/Admin/Member/Viewer)
- Real-time updates with Socket.io
- Drag-and-drop task boards
- Advanced animations & notifications
MIT
Built with β€οΈ for team collaboration