TaskFlow is a small fullstack task manager built as a production-like learning project.
Users can:
- register
- log in
- stay authenticated with JWT
- create, view, update, and delete their own tasks
The project is intentionally simple in scope, but structured to demonstrate backend fundamentals, API design, authentication, database ownership rules, and frontend integration.
- Frontend: https://taskflow-nu-tan.vercel.app/
- Backend API: https://taskflow-uzrw.onrender.com/
- Node.js
- Express
- PostgreSQL
- Prisma ORM
- JWT authentication
- bcrypt
- Zod
- TypeScript
- React
- Vite
- TypeScript
- React Router
- TanStack Query
- Axios
- User registration
- User login
- Current authenticated user endpoint
- Protected task CRUD
- Ownership checks so each user can access only their own tasks
- Validation and centralized error handling
- Frontend auth flow with protected routes
- Frontend task management UI connected to the backend API
taskflow/
backend/
prisma/
src/
config/
controllers/
db/
middlewares/
routes/
schemas/
services/
types/
utils/
frontend/
src/
api/
app/
components/
features/
auth/
tasks/
pages/
git clone <your-repo-url>
cd taskflowdocker compose up -dBackend:
cp backend/.env.example backend/.envFrontend:
cp frontend/.env.example frontend/.envBackend:
cd backend
npm installFrontend:
cd frontend
npm installcd backend
npm run prisma:migrateBackend:
cd backend
npm run devFrontend:
cd frontend
npm run devPORT=5000
NODE_ENV=development
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/taskflow?schema=public"
JWT_SECRET="your-jwt-secret"
CLIENT_URL="http://localhost:5173"VITE_API_URL=http://localhost:5000/apiPOST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
GET /api/tasksGET /api/tasks/:idPOST /api/tasksPATCH /api/tasks/:idDELETE /api/tasks/:id
- Controllers handle HTTP request and response logic.
- Services contain business logic and Prisma queries.
- Zod is used for request validation.
AppErrorand a centralized error middleware keep error handling consistent.- Ownership checks are enforced in the task service layer using
userIdin Prisma queries.
- JWT is stored in
localStoragefor simplicity in this learning project. - Axios automatically sends the Bearer token.
- TanStack Query manages server state for current user and tasks.
- Protected routes rely on
/auth/meinstead of trusting only the token in storage.
Backend:
cd backend
npm run buildFrontend:
cd frontend
npm run buildThis project demonstrates:
- REST API design
- authentication and authorization
- database relations and ownership rules
- backend validation and error handling
- frontend and backend integration
- React Query server-state management
- production-like folder structure without overengineering
- filter tasks by status
- add task sorting
- improve form UX and inline notifications
- add deployment links
- switch to cookie-based auth for stronger production security