A full-stack Task Management System for NSCC SRM built with Next.js and Supabase. The system supports multi-role structure, domain-based permissions, hierarchical task assignment, and reverse review flow.
- 5 Roles: Core, Director, Associate Director, Associate, Member
- 3 Domains: Technical, Non-Technical, Creatives
- Role-based access control with domain restrictions
- Core users can manage all domains and users
- Create tasks with domain assignment
- Hierarchical task assignment (Core → Director → AD → Associate → Member)
- Task status tracking: Open, In Progress, Submitted, Under Review, Completed
- Deadline management with overdue indicators
- Multiple submission types: Text, Link, File
- File upload support (requires Supabase Storage setup)
- Submission history tracking
- Reverse review hierarchy: Member → Associate → AD → Director → Core
- Review actions: Approve or Request Changes
- Feedback system for reviewers
- Visual review timeline with progress tracking
- Automatic task completion when all reviews are approved
- Row-Level Security (RLS) policies on all tables
- Domain-based access restrictions
- Role-based API route protection
- Secure authentication via Supabase Auth
- Framework: Next.js 16 (App Router)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Styling: Tailwind CSS v4
- Language: TypeScript
- Node.js 18+ or Bun
- A Supabase account and project (supabase.com)
# If using npm
npm install
# If using bun (recommended)
bun install- Create a new project at supabase.com
- Go to SQL Editor in your Supabase dashboard
- Copy and paste the entire contents of
supabase/schema.sql - Run the SQL script to create all tables, policies, and functions
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyYou can find these values in your Supabase project settings:
- Go to Settings → API
- Copy the Project URL and anon/public key
- Go to Storage in your Supabase dashboard
- Create a new bucket named
submissions - Set it to Public if you want direct file access
- Update the
SubmissionFormcomponent to use Supabase Storage API
# Using npm
npm run dev
# Using bun
bun devOpen http://localhost:3000 in your browser.
binaryflow/
├── supabase/
│ └── schema.sql # Database schema and RLS policies
├── src/
│ ├── app/
│ │ ├── api/ # API routes
│ │ │ ├── tasks/ # Task CRUD operations
│ │ │ └── users/ # User management (Core only)
│ │ ├── auth/ # Authentication pages
│ │ │ ├── login/
│ │ │ └── signup/
│ │ ├── dashboard/ # Main dashboard
│ │ ├── tasks/ # Task pages
│ │ │ ├── create/ # Create task form
│ │ │ └── [id]/ # Task detail page
│ │ └── users/ # User management (Core only)
│ ├── components/ # Reusable UI components
│ │ ├── CreateTaskForm.tsx
│ │ ├── DomainBadge.tsx
│ │ ├── Navbar.tsx
│ │ ├── ReviewForm.tsx
│ │ ├── ReviewTimeline.tsx
│ │ ├── RoleBadge.tsx
│ │ ├── SubmissionForm.tsx
│ │ └── TaskCard.tsx
│ ├── lib/
│ │ ├── supabase/ # Supabase client utilities
│ │ │ ├── client.ts # Browser client
│ │ │ ├── server.ts # Server client
│ │ │ └── types.ts # TypeScript types
│ │ └── utils.ts # Utility functions
│ └── middleware.ts # Auth middleware
└── README.md
| Role | Can Assign To | Task Scope | Can Review | Can Submit |
|---|---|---|---|---|
| Core | D, AD, A, Members (any domain) | All domains | Final reviewer | ✅ |
| Director (D) | AD, A, Members (same domain) | Own domain | Review below hierarchy | ✅ |
| Associate Director (AD) | A, Members (same domain) | Own domain | Review below hierarchy | ✅ |
| Associate (A) | Members (same domain) | Own domain | Review Members | ✅ |
| Member | — | Own domain | Reviewed by A→AD→D→Core | ✅ |
- Creation: Core/D/AD/A creates a task and assigns it to users below in hierarchy
- Assignment: Task is assigned to users within the same domain
- Submission: Assignee submits file/link/text
- Review: Sequential approval chain (A → AD → D → Core)
- Completion: Task marked completed after Core approval
| Route | Method | Description | Access |
|---|---|---|---|
/api/tasks |
GET | Fetch tasks (filtered by role/domain) | All authenticated |
/api/tasks |
POST | Create task | Core/D/AD/A |
/api/tasks/[id]/submit |
POST | Submit task | Assignees only |
/api/tasks/[id]/review |
POST | Submit review | Reviewers only |
/api/users |
GET | Fetch all users | Core only |
- TaskCard: Displays task information with status and domain badges
- RoleBadge: Visual role indicator with color coding
- DomainBadge: Domain indicator
- ReviewTimeline: Visual progress of review chain
- SubmissionForm: Multi-type submission form (text/link/file)
- ReviewForm: Review submission form with approve/request changes
- Row-Level Security (RLS): All tables have RLS enabled
- Domain Isolation: Users can only access tasks in their domain (except Core)
- Role-Based Access: API routes check user roles before allowing operations
- Assignment Validation: Users can only submit tasks assigned to them
- Review Validation: Users cannot review their own assigned tasks
- Real-time notifications via Supabase Realtime
- Analytics dashboard (tasks completed/pending per domain)
- Comment threads per task
- Auto-email reminders before deadlines
- Domain-level leaderboards
- File upload to Supabase Storage
- Task templates
- Bulk task operations
Built with ❤️ for NSCC SRM by Aakarsh Kumar