A production-style full-stack SaaS platform for collaborative task, project, and workspace management.
Built with React, TypeScript, Node.js, Express, MongoDB, Mongoose and Socket.io.
TaskFlow is a full-stack collaborative work management application designed to go beyond a basic CRUD todo app.
The platform combines:
- authentication and session management
- multi-user workspaces
- role-based access control
- project collaboration
- task sharing
- real-time updates
- notifications and reminders
- file attachments
- analytics
- recurring tasks
- comments and activity tracking
- import/export functionality
- automated testing
- API documentation
- Docker-based development
The project focuses on software engineering concepts commonly found in production SaaS applications, including authorization boundaries, API versioning, domain separation, validation, collaborative state synchronization, testing, and deployment-oriented architecture.
TaskFlow supports multiple authentication mechanisms:
- User registration
- Email/password login
- JWT access tokens
- Refresh-token sessions
- Google OAuth
- Passkey authentication
- Protected API routes
- Session refresh flow
- Logout and session invalidation
Authentication logic is enforced on the backend and separated from frontend UI state.
Users can create and manage tasks with:
- Title
- Description
- Status
- Priority
- Due date
- Assignee
- Recurrence
- Subtasks
- Linked resources
- Attachments
- Comments
- Activity history
Tasks can exist inside collaborative workspaces or as personal tasks.
TaskFlow supports multi-user workspace collaboration.
Each workspace can contain:
- Members
- Projects
- Tasks
- Invitations
- Activity
- Shared resources
Workspace access is controlled through role-based permissions.
| Role | Permissions |
|---|---|
owner |
Full workspace access, member management, invite creation and administrative control |
admin |
Member management and invite creation |
member |
Create and manage workspace tasks and collaborate |
viewer |
Read-oriented workspace access |
Authorization rules are enforced by the backend rather than relying only on frontend visibility.
Workspaces can contain multiple projects.
Projects provide an additional authorization boundary for:
- Tasks
- Members
- Assignments
- Collaboration
- Activity
- Permissions
owneradminmemberviewer
Each role has project-specific read and write permissions.
Personal tasks can also be shared independently from workspaces.
Supported ACL roles:
| Permission | Access |
|---|---|
viewer |
Can view the shared task |
editor |
Can view and update the shared task |
This provides task-level access control in addition to workspace and project permissions.
TaskFlow uses Socket.io for real-time updates.
Connected users can receive updates when collaborative resources change, reducing the need for manual page refreshes.
Real-time events can be used for:
- Task updates
- Assignment changes
- Comments
- Notifications
- Workspace activity
- Project changes
Collaborators can communicate directly through task comments.
TaskFlow also maintains activity information for important actions such as:
- Task creation
- Status changes
- Assignment changes
- Comments
- Workspace updates
- Project activity
- Sharing actions
This gives teams visibility into how collaborative work evolves over time.
The platform includes an in-app notification system and reminder pipeline.
Notifications can be generated for events such as:
- New assignments
- Task updates
- Upcoming deadlines
- Invitations
- Comments
- Shared tasks
- Collaboration events
TaskFlow includes analytics for understanding task and project activity.
Dashboard data can be used to visualize:
- Task status distribution
- Priority distribution
- Completion progress
- Upcoming deadlines
- Overdue tasks
- Team activity
- Project workload
Tasks can include recurrence rules for repeating workflows.
Examples include:
- Daily tasks
- Weekly tasks
- Monthly tasks
- Repeated reminders
This allows TaskFlow to support recurring operational work rather than only one-time tasks.
Users can upload and associate files with tasks.
Attachments allow collaborators to keep relevant resources connected directly to the work they belong to.
TaskFlow supports data portability using:
- CSV import
- CSV export
- JSON import
- JSON export
Compatibility mapping is included to handle different input structures where required.
The REST API is documented using OpenAPI.
Available development endpoints:
Swagger UI
http://localhost:5000/docs
Versioned Swagger UI
http://localhost:5000/api/v1/docs
OpenAPI JSON
http://localhost:5000/openapi.json
API responses expose the contract version through:
X-API-Version: 1.0- React
- TypeScript
- Vite
- SPA routing
- API client layer
- Dashboard UI
- Real-time Socket.io client
- Node.js
- Express
- TypeScript
- REST API
- Socket.io
- JWT authentication
- OAuth
- Service-based business logic
- MongoDB
- Mongoose
- Zod
- Vitest
- Supertest
- mongodb-memory-server
- Unit tests
- Integration tests
- End-to-end testing support
- Docker
- Docker Compose
- OpenAPI
- Swagger
- Git
- GitHub
flowchart TD
U[User / Browser]
FE[React + TypeScript SPA]
API[Node.js + Express REST API]
WS[Socket.io Realtime Layer]
AUTH[Authentication & Authorization]
SERVICE[Domain Services]
VALIDATION[Zod Validation]
DB[(MongoDB)]
FILES[Attachment Storage]
NOTIFICATIONS[Notification Pipeline]
DOCS[OpenAPI / Swagger]
U --> FE
FE -->|REST / HTTPS| API
FE <-->|WebSocket| WS
API --> AUTH
API --> VALIDATION
API --> SERVICE
SERVICE --> DB
SERVICE --> FILES
SERVICE --> NOTIFICATIONS
WS --> SERVICE
API --> DOCS
TaskFlow/
β
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ hooks/
β β βββ services/
β β βββ context/
β β βββ types/
β β βββ utils/
β β
β βββ public/
β βββ package.json
β βββ vite.config.ts
β
βββ backend/
β βββ src/
β β βββ controllers/
β β βββ routes/
β β βββ models/
β β βββ services/
β β βββ validators/
β β βββ middleware/
β β βββ config/
β β βββ utils/
β β βββ tests/
β β
β βββ .env.example
β βββ package.json
β
βββ database/
β βββ migrations/
β βββ schema-docs/
β
βββ docs/
β βββ DEPLOYMENT.md
β βββ API documentation
β
βββ docker-compose.yml
βββ package.json
βββ LICENSE
βββ README.md
The backend is separated into focused modules.
Handle incoming HTTP requests and responses.
Controllers should remain relatively thin and delegate business rules to services.
Define REST endpoints and connect them to:
- controllers
- middleware
- validation
- authentication
Contain Mongoose schemas and database models.
Contain application and domain logic.
Examples include:
- Task operations
- Workspace permissions
- Project access
- Notifications
- Invitations
- Authentication
Use Zod schemas to validate API input before requests reach business logic.
Contains reusable Express middleware for:
- Authentication
- Authorization
- Validation
- Error handling
- Request processing
TaskFlow uses multiple authorization levels.
User
β
βββ Personal Tasks
β βββ Task ACL
β βββ Viewer
β βββ Editor
β
βββ Workspace
β
βββ Workspace Role
β βββ Owner
β βββ Admin
β βββ Member
β βββ Viewer
β
βββ Project
βββ Project Role
βββ Owner
βββ Admin
βββ Member
βββ Viewer
Authorization checks are performed server-side for both resource visibility and mutations.
TaskFlow applies multiple security practices.
Implemented or designed controls include:
- JWT-based authentication
- Refresh-token session management
- Backend-enforced authorization
- Workspace RBAC
- Project RBAC
- Task-level ACL
- Zod request validation
- Protected API routes
- CORS configuration
- Centralized error handling
- Environment-based secrets
- OAuth credential isolation
- Separation of authentication and application logic
Secrets must never be committed to the repository.
Make sure the following are installed:
- Node.js
- npm
- MongoDB
Optional:
- Docker
- Docker Compose
git clone https://github.com/hkokk1234/Full-stack-TODO-app-.git
cd Full-stack-TODO-app-Install backend dependencies:
npm --prefix backend installInstall frontend dependencies:
npm --prefix frontend installCreate:
backend/.env
using:
backend/.env.example
as the template.
At minimum configure:
MONGO_URI=
JWT_SECRET=
REFRESH_TOKEN_SECRET=
FRONTEND_ORIGIN=Optional integrations may require:
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=Email functionality may require SMTP configuration.
If AI-powered functionality is enabled:
OPENAI_API_KEY=Never commit real secrets.
Open two terminals.
npm run dev:backendBackend:
http://localhost:5000
npm run dev:frontendFrontend:
http://localhost:5173
Run TypeScript checks:
npm run typecheckRun tests:
npm run testCreate production builds:
npm run buildThe project includes automated testing across different layers.
Testing technologies:
- Vitest
- Supertest
- mongodb-memory-server
The test suite is designed to cover areas such as:
- Authentication
- Task CRUD
- Input validation
- Workspace access
- Project authorization
- Task sharing
- API behavior
- Error handling
- Service logic
Run tests with:
npm run testIf coverage reporting is configured:
npm run test:coverageCoverage percentages should only be added to this README when generated from the actual test suite.
TaskFlow can also be run using Docker.
Start containers:
npm run docker:upView logs:
npm run docker:logsStop containers:
npm run docker:downDocker provides a more reproducible local development environment and reduces differences between developer machines.
Create a new migration:
npm --prefix backend run migrate:create -- your_migration_nameApply migrations:
npm --prefix backend run migrate:upRollback the latest migration:
npm --prefix backend run migrate:downOnce the backend is running:
http://localhost:5000/docs
http://localhost:5000/api/v1/docs
http://localhost:5000/openapi.json
One of the main engineering challenges in TaskFlow is authorization.
The application supports permissions at several different scopes:
Workspace
β
Project
β
Task
A user may have permission to access a workspace without necessarily having the same level of access to every project.
Personal tasks may also have separate sharing rules.
Because of this, authorization is enforced on the backend at the resource level rather than relying on frontend UI restrictions.
Collaborative applications need to keep multiple clients synchronized.
TaskFlow uses Socket.io to propagate updates to connected users when collaborative data changes.
This avoids requiring users to refresh their browser after actions performed by other team members.
The application separates short-lived authentication from longer-running user sessions.
JWT access tokens and refresh sessions allow the application to balance usability with improved session security.
Tasks support more than simple title/status CRUD.
The domain includes:
- recurrence
- subtasks
- resources
- assignments
- sharing
- comments
- attachments
- priority
- deadlines
- notifications
This requires business logic to remain separate from route and controller code.
TaskFlow combines:
- Workspace roles
- Project roles
- Personal task ACLs
This makes authorization more complex than a single global admin/user system and better reflects multi-tenant SaaS authorization models.
React provides a component-oriented architecture suitable for interactive dashboards and collaborative interfaces.
TypeScript adds static type checking and improves maintainability across a growing frontend codebase.
The backend uses Node.js and Express because they integrate naturally with TypeScript and support both REST APIs and real-time Socket.io communication in the same ecosystem.
TaskFlow contains flexible entities such as:
- tasks
- recurrence rules
- comments
- activity metadata
- subtasks
- notifications
- linked resources
MongoDB provides flexible document storage, while Mongoose adds schema definitions and validation at the application layer.
Zod provides runtime request validation while integrating directly with TypeScript.
This helps ensure that API input is validated before reaching business logic.
TaskFlow requires server-pushed updates for collaborative functionality.
Socket.io provides:
- WebSocket communication
- reconnection handling
- rooms
- event-based messaging
and integrates well with the existing Node.js backend.
Controllers handle HTTP-specific concerns.
Services handle business rules.
This separation makes application logic easier to:
- test
- reuse
- maintain
- refactor
and prevents controllers from becoming overly complex.
Planned or possible future improvements include:
- Redis-backed caching
- BullMQ background workers
- Distributed reminder processing
- Advanced audit logs
- Real-time user presence
- Optimistic concurrency handling
- Improved observability
- Metrics and tracing
- Cloud deployment
- Kubernetes deployment
- CI/CD deployment pipeline
- Offline task synchronization
- Advanced search
- Full-text indexing
A future scaled deployment could use:
flowchart LR
USER[Client]
CDN[Frontend / CDN]
API[Express API]
REDIS[(Redis)]
QUEUE[Job Queue]
WORKER[Background Worker]
MONGO[(MongoDB)]
SOCKET[Socket.io]
MAIL[Email / Notification Provider]
USER --> CDN
CDN --> API
CDN <-->|Realtime| SOCKET
API --> MONGO
API --> REDIS
API --> QUEUE
QUEUE --> WORKER
WORKER --> MAIL
SOCKET --> REDIS
This architecture could support:
- asynchronous reminders
- distributed workers
- caching
- horizontal API scaling
- scalable Socket.io communication
Never commit:
.env
.env.local
*.pem
private keys
OAuth secrets
API keys
database passwords
JWT secrets
Example .gitignore entries:
# Dependencies
node_modules/
# Environment
.env
.env.*
!.env.example
# Build output
dist/
build/
# Testing
coverage/
# Logs
*.log
logs/
# OS
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
# Temporary files
tmp/
temp/Use GitHub Actions Secrets or the relevant cloud secret-management mechanism for deployed environments.
If any credential has ever been committed publicly, rotate it immediately.
Deployment-related documentation is available in:
docs/DEPLOYMENT.md
A production deployment should configure separate environments for:
Development
β
Staging
β
Production
Each environment should use independent:
- database credentials
- JWT secrets
- OAuth credentials
- frontend origins
- API URLs
- service secrets
- Add Redis-backed caching
- Move reminder processing to background workers
- Add advanced workspace audit logs
- Add real-time user presence
- Expand automated integration testing
- Add production monitoring and metrics
- Deploy frontend and API
- Add automated CI/CD deployment
- Explore Kubernetes deployment
Contributions, suggestions and bug reports are welcome.
A typical development workflow:
git checkout -b feature/your-featureMake your changes and commit them:
git commit -m "feat: add your feature"Push the branch:
git push origin feature/your-featureThen open a Pull Request.
This project is licensed under the MIT License.
See the LICENSE file for details.
Harrys (Zacharias Kokkinakis)
Integrated Master's Student in Information & Communication Systems Engineering University of the Aegean
GitHub:
TaskFlow was built to explore how a modern collaborative SaaS application can be designed beyond basic CRUD functionality.
The project demonstrates concepts including:
- Full-stack software engineering
- API design
- Authentication
- Authorization
- Multi-tenant collaboration
- Real-time systems
- Database modelling
- Validation
- Testing
- Docker
- API documentation
- Security
- Production-oriented architecture
If you find the project useful, consider giving the repository a β.