A modern Kanban-style task management frontend built with React, TypeScript, Vite, and Tailwind CSS.
This application is designed to work with a JWT-secured backend API and demonstrates real-world frontend patterns used in production DevOps-enabled systems, including authentication, protected routing, API abstraction, and environment-based configuration.
- Overview
- Features
- Tech Stack
- High-Level Architecture
- Authentication Flow
- Task Management Flow
- Project Structure
- Environment Variables
- Local Development Setup
- API Communication
- Security Considerations
- Build & Production
- Linting & Type Safety
- Assumptions
- Future Improvements
Team Task Manager (TeamFlow) is a single-page application (SPA) that allows authenticated users to:
- Register and log in securely
- View tasks in a Kanban board
- Create, update, delete, and move tasks across statuses
- Persist login sessions across page reloads
- Interact with a backend REST API using JWT authentication
The project is intentionally structured to resemble real production applications, not demos or tutorials.
- User signup and login
- JWT-based authentication
- Token persistence using localStorage
- Protected routes using a route guard
- Automatic session restoration on reload
- Kanban board with three statuses:
- To Do
- In Progress
- Done
- Drag-and-drop task movement
- Task priorities:
- Low
- Medium
- High
- Task creation modal with validation
- Immediate UI updates after API responses
- Responsive layout
- Clean, modern design using Tailwind CSS
- Loading and error states
- Accessible and reusable components
- React 18
- TypeScript
- Vite
- React Router v6
- Tailwind CSS
- Lucide React (icons)
- ESLint (TypeScript + React rules)
- Strict TypeScript configuration
- Environment-based configuration via
import.meta.env
The application follows a layered frontend architecture:
UI Components
↓
Pages (Routes)
↓
Context (Authentication State)
↓
API Service Layer
↓
Backend REST API
Why this matters
- UI is decoupled from business logic
- API calls are centralized
- Authentication state is globally accessible
- Easier testing, debugging, and scaling
- User submits login or signup form
- Frontend sends credentials to the backend:
POST /api/auth/loginPOST /api/auth/signup
- Backend returns:
- JWT token
- User object
- Frontend:
- Stores the token in localStorage
- Stores user metadata
- Updates global authentication context
- Protected routes check authentication state before rendering
- User accesses the dashboard
- Frontend fetches tasks:
GET /api/tasks3Tommy. Tasks are grouped by status:- todo
- in_progress
- done
- User actions trigger:
POST /api/tasksPUT /api/tasks/:idDELETE /api/tasks/:id
- UI updates immediately after successful API responses
All task-related API calls go through a single abstraction layer.
.
├── src
│ ├── components # Reusable UI components
│ ├── contexts # Global state (authentication)
│ ├── pages # Route-based pages
│ ├── services # API abstraction layer
│ ├── types # TypeScript interfaces
│ ├── App.tsx # Route definitions
│ ├── main.tsx # Application entry point
│ └── index.css # Tailwind base styles
│
├── index.html # Root HTML file (Vite entry)
├── .env.example # Environment variable template
├── vite.config.ts
├── tailwind.config.js
├── eslint.config.js
└── package.json
Note: This project does not use a public/ folder. Vite serves assets directly from index.html and the build output.
Environment variables are managed using Vite’s import.meta.env system.
.env.example
VITE_API_URL=http://localhost:5000/api
Important Notes
- Variables must start with
VITE_ .envfiles should never be committed- Different environments (dev, staging, prod) should use different values
- Node.js 18+
- npm (or yarn / pnpm)
- Backend API running locally or remotely
npm installnpm run devThe application will be available at: http://localhost:5173
All backend communication is handled in:
src/services/api.ts
Why this approach?
- Centralized API logic
- Automatic JWT header injection
- Consistent error handling
- Easier refactoring or mocking
Each request automatically includes:
Authorization: Bearer <JWT_TOKEN>
- JWT stored in localStorage
- Authorization headers added automatically
- Protected routes prevent unauthorized access
- Sensitive operations are handled server-side
For higher-security environments, HttpOnly cookies and refresh-token rotation are recommended.
npm run buildThis outputs static assets to: dist/
npm run previewThe build output is compatible with:
- CapRover
- Nginx
- Cloudflare Pages
- Netlify
- Vercel (static mode)
npm run lintnpm run typecheckTypeScript is configured in strict mode to catch issues early.
- Backend implements JWT authentication correctly
- Backend supports CORS
- API follows REST conventions
- Users must be authenticated before accessing
/dashboard
- Role-Based Access Control (RBAC)
- Task assignment to users
- Real-time updates using WebSockets or SSE
- Pagination and filtering
- Audit logs
- Refresh token rotation
- End-to-end testing (Playwright / Cypress)
- Dockerized frontend build
- CI/CD pipeline integration