Skip to content

A decentralized task management system built on the Sui blockchain, featuring role-based access control, encrypted content storage via Walrus, and SUI token rewards.

Notifications You must be signed in to change notification settings

dolphinder/taskos

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

86 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TaskOS - Product Requirements Document (PRD)

Live Demo Sui Network

๐ŸŽฏ Project Overview

A decentralized task management system built on the Sui blockchain, featuring role-based access control, encrypted content storage via Walrus, and SUI token rewards. This project enables secure, collaborative task management with on-chain verification and incentivization mechanisms.

Vision

Create a transparent, secure, and incentive-driven task management platform that leverages blockchain technology to ensure accountability, privacy, and fair compensation.

๐Ÿš€ Live Deployment

๐Ÿ“ Testnet Contract Addresses

NEXT_PUBLIC_PACKAGE_ID=0x569d476a856fbc14b8ac0b9257b29acb9c387c7ab12fc2bdcfdb8468d7fceb50
NEXT_PUBLIC_TASKS_REGISTRY_ID=0x35d8fde26d1523a57770ef454599abe498f33037f8f8fc1060f2ba5fbf5eff2c
NEXT_PUBLIC_PUBLISHER_ID=0x1db60018d17bb570f965f5c1761f8a6c147ab63496558f072a4bea881efa6de4
NEXT_PUBLIC_VERSION_ID=0xecc97019e6e77004b3b614cd8010dd44f2a3797d3a8cf064c5b7a7f2ad72b9bd

Explorer Links:


๐Ÿ—๏ธ Architecture

Technology Stack

Frontend:

  • Next.js 16 (React 19)
  • TypeScript
  • Tailwind CSS
  • Radix UI Components
  • TanStack Query for state management
  • @mysten/dapp-kit for Sui integration

Blockchain:

  • Sui Blockchain
  • Move Smart Contracts
  • Walrus Storage for encrypted content
  • Seal Protocol for identity-based encryption

Key Libraries:

  • @mysten/sui - Sui TypeScript SDK
  • @mysten/walrus - Walrus storage integration
  • @dnd-kit - Drag and drop functionality
  • recharts - Data visualization

๐Ÿ“‹ Core Features

1. Task Management (CRUD Operations)

1.1 Task Creation

  • Fields:
    • Title (required, max 200 chars)
    • Description (required, max 2000 chars)
    • Category (required, max 50 chars)
    • Tags (optional, max 10 tags, 30 chars each)
    • Priority (Low/Medium/High/Critical)
    • Due Date (optional)
    • Image URL (optional)
  • Technical: Each task is an owned object on Sui blockchain
  • Registry: Tasks are indexed by status in a shared TaskRegistry for efficient querying

1.2 Task Updates

  • Update basic info (title, description)
  • Change priority, status, category, due date
  • Add/remove tags
  • Archive tasks (soft delete)
  • Delete tasks (hard delete, owner only)

1.3 Task Status Workflow

  • TODO โ†’ IN PROGRESS โ†’ COMPLETED โ†’ APPROVED โ†’ ARCHIVED
  • Approval is a distinct on-chain step that triggers reward release
  • Status changes automatically update TaskRegistry indices
  • Real-time sync across all collaborators

2. Role-Based Access Control (RBAC)

2.1 Role Hierarchy

  • Owner (Level 3): Full control including deletion and access management
  • Editor (Level 2): Can edit tasks and add comments
  • Viewer (Level 1): Read-only access

2.2 Access Management

  • Share tasks with multiple users
  • Assign specific roles to collaborators
  • Update or revoke user permissions
  • Owner cannot be removed or demoted

3. Walrus Integration - Encrypted Content Storage

3.1 Content Encryption

  • Upload encrypted task content to Walrus
  • Store blob IDs on-chain (content, attachments, completed result)
  • Integrate with Seal protocol for IBE (Identity-Based Encryption)

3.2 File Attachments

  • Support multiple file uploads
  • Store encrypted file blob IDs
  • Access control via blockchain verification

3.3 Decryption Flow

  • Verify user access via smart contract
  • Use Seal IBE for secure decryption
  • Namespace-based access control

4. Comments System

4.1 Comment Operations

  • Add comments (Editor+ access required)
  • Edit own comments
  • Delete comments (author or owner)
  • Track comment creation and edit timestamps

4.2 Comment Structure

  • Author address
  • Content (max 1000 chars)
  • Created timestamp
  • Last edited timestamp

5. SUI Reward System

5.1 Reward Deposit

  • Owners can deposit SUI tokens as task rewards
  • Track individual depositor contributions
  • Prevent deposits after task completion

5.2 Assignee Management

  • Set task assignee
  • Only one assignee per task
  • Assignee eligible for reward upon completion

5.3 Reward Distribution

  • Owner approves task completion (status moves to APPROVED)
  • Automatic reward transfer to assignee
  • One-time approval (cannot re-approve)

5.4 Refund Mechanism

  • Cancel task and refund all deposits
  • Proportional refunds to all depositors
  • Automatic refund on task deletion or archival

6. On-Chain Query System

6.1 TaskRegistry

  • Shared object for indexing tasks by status
  • Efficient on-chain queries for task discovery
  • Status-based task lists

6.2 Query Functions

  • Get tasks by status
  • Count tasks by status
  • Real-time updates via events

7. Experience Data & Marketplace

  • Generate Experience NFTs from approved tasks with Walrus/Seal references
  • List experience data for sale with license types and copy limits
  • Purchase flow emits on-chain events and tracks access provisioning
  • SEAL policies support private, allowlist, and subscription access patterns
  • Ratings and price updates supported post-mint

๐Ÿ” Security & Validation

Input Validation

  • String length limits enforced on-chain
  • Priority and status value validation
  • Role permission checks
  • Prevent self-sharing and owner removal

Access Control

  • Permission checks on every mutation
  • Creator always has owner privileges
  • Dynamic field storage for access control lists

Financial Security

  • Balance tracking for deposits
  • Prevent double-approval of rewards
  • Refund mechanism for cancelled tasks
  • Amount validation (no zero deposits)

๐ŸŽจ User Interface Components

Core Components

  • Task Manager: Main dashboard with drag-and-drop
  • Task Cards: Visual task representation
  • Create/Update Forms: Task CRUD operations
  • Share Dialog: Access management UI
  • Comments Section: Threaded discussions
  • Reward Panel: Deposit and approval interface
  • Walrus Upload: Encrypted file management

UI Features

  • Dark mode support
  • Responsive design
  • Real-time updates
  • Toast notifications
  • Data tables with sorting/filtering

๐Ÿ“Š Data Model

Task Object

{
  id: UID,
  creator: address,
  title: String,
  description: String,
  image_url: String,
  content_blob_id: Option<String>,
  file_blob_ids: vector<String>,
  result_blob_id: Option<String>,
  created_at: u64,
  updated_at: u64,
  due_date: Option<u64>,
  priority: u8,
  status: u8, // 0 TODO, 1 IN_PROGRESS, 2 COMPLETED, 3 APPROVED, 4 ARCHIVED
  visibility: u8, // 0 private, 1 team, 2 public
  category: String,
  tags: vector<String>
}

Dynamic Fields

  • AccessControl: Role mappings
  • Comments: Comment history
  • RewardBalance: SUI token balance
  • Deposits: Individual deposit tracking
  • Assignee: Task assignee address
  • CompletionApproved: Approval status

๐Ÿš€ Getting Started

Prerequisites

  1. Node.js 20+
  2. pnpm (recommended)
  3. Sui Wallet (for blockchain interactions)
  4. Sui CLI (for Move contract deployment)

Environment Setup

  1. Copy environment template:
cp .env.example .env.local
  1. Configure environment variables:
NEXT_PUBLIC_PACKAGE_ID=<your_package_id>
NEXT_PUBLIC_VERSION_ID=<your_version_object_id>
NEXT_PUBLIC_TASKS_REGISTRY_ID=<your_task_registry_id>

See SETUP.md for detailed deployment instructions.

Development Server

pnpm install
pnpm dev

Open http://localhost:3000 in your browser.

Deploy Move Contracts

cd move/task_manage
sui move build
sui client publish --gas-budget 100000000

Run Tests

# Move contract tests
cd move/task_manage
sui move test

# TypeScript E2E tests
pnpm test

๐Ÿงช Testing

Move Contract Tests

  • Access control tests
  • CRUD operation tests
  • Reward system tests
  • Walrus integration tests

E2E Tests

  • Task creation workflow
  • Comment system
  • Update operations
  • Access sharing

๐Ÿ“ฆ Project Structure

โ”œโ”€โ”€ app/                    # Next.js app directory
โ”‚   โ”œโ”€โ”€ dashboard/         # Main dashboard
โ”‚   โ”œโ”€โ”€ login/            # Authentication
โ”‚   โ””โ”€โ”€ walrus/           # Walrus integration demo
โ”œโ”€โ”€ components/            # React components
โ”‚   โ”œโ”€โ”€ task-manager/     # Task management components
โ”‚   โ””โ”€โ”€ ui/              # Reusable UI components
โ”œโ”€โ”€ move/                 # Sui Move contracts
โ”‚   โ””โ”€โ”€ task_manage/
โ”‚       โ”œโ”€โ”€ sources/      # Move source files
โ”‚       โ””โ”€โ”€ tests/       # Move tests
โ”œโ”€โ”€ e2e/                  # End-to-end tests
โ”œโ”€โ”€ hooks/               # Custom React hooks
โ”œโ”€โ”€ lib/                 # Utility libraries
โ””โ”€โ”€ types/              # TypeScript type definitions

๐Ÿ”„ Workflows

Task Creation Flow

  1. User connects wallet
  2. Fills task form with required fields
  3. Transaction submitted to blockchain
  4. Task object created and assigned to user
  5. Task indexed in TaskRegistry
  6. TaskCreated event emitted

Collaboration Flow

  1. Owner shares task with collaborators
  2. Assigns appropriate roles (Viewer/Editor/Owner)
  3. Collaborators can view/edit based on permissions
  4. Comments and updates sync on-chain
  5. Access can be revoked by owner

Reward Flow

  1. Owner deposits SUI reward into task
  2. Owner assigns task to user
  3. Assignee completes work
  4. Assignee updates status to COMPLETED
  5. Owner approves completion
  6. Reward automatically transferred to assignee

๐ŸŽฏ Use Cases

  1. Freelance Work: Escrow-based task completion with automatic payments
  2. Team Projects: Collaborative task management with role-based access
  3. Bounty Programs: Public tasks with SUI rewards
  4. Project Management: Secure, transparent task tracking
  5. DAO Operations: Decentralized task assignment and compensation

๐Ÿ”ฎ Future Enhancements

  • Multi-assignee support
  • Milestone-based payments
  • Task templates
  • Advanced search and filtering
  • Mobile app
  • Integration with more wallets
  • NFT-based task achievements
  • Reputation system
  • Task dependencies and sub-tasks
  • Calendar view and notifications

๐Ÿ“š Documentation


๐Ÿ‘ฅ Collaborators

This project was built by:

Huแปณnh Long Phรบ
Huแปณnh Long Phรบ

๐Ÿ’ฌ Telegram
๐Ÿ“ง Email
Nguyแป…n Tuแบฅn Anh
Nguyแป…n Tuแบฅn Anh

๐Ÿ’ฌ Telegram
๐Ÿ“ง Email
Nguyแป…n Mแบกnh Viแป‡t Khรดi
Nguyแป…n Mแบกnh Viแป‡t Khรดi

๐Ÿ’ฌ Telegram
๐Ÿ“ง Email
Trแบงn Anh Tuแบฅn
Trแบงn Anh Tuแบฅn

๐Ÿ’ฌ Telegram
๐Ÿ“ง Email
ฤแบทng Hoร ng Lรขm
ฤแบทng Hoร ng Lรขm

๐Ÿ’ฌ Telegram
๐Ÿ“ง Email

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is built for hackathon purposes. Please check with the repository owner for licensing details.


๐Ÿ†˜ Support

For setup issues, see SETUP.md troubleshooting section.

For bugs or feature requests, please open an issue on GitHub.


Built with โค๏ธ on Sui Blockchain

About

A decentralized task management system built on the Sui blockchain, featuring role-based access control, encrypted content storage via Walrus, and SUI token rewards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.7%
  • Move 8.6%
  • CSS 1.6%
  • Other 0.1%