KaryaAI is an intelligent project and task management platform that leverages Google Gemini AI for automated workflow generation and smart task assignment. Built with modern technologies including Node.js, TypeScript, Firebase, and Next.js.
- Smart Workflow Generation: Convert natural language requirements into structured workflows
- Intelligent Task Assignment: AI-driven employee matching based on skills, workload, and availability
- Automated Project Planning: Generate comprehensive project structures from simple descriptions
- Role-Based Access Control: Admin, Employee, and Client roles with granular permissions
- JWT Authentication: Secure token-based authentication with httpOnly cookies
- Firebase Integration: Robust user management and real-time database capabilities
- Product Lifecycle: End-to-end product development tracking
- Workflow Orchestration: Hierarchical workflow and task organization
- Team Collaboration: Real-time task updates and progress tracking
- Performance Analytics: Employee workload balancing and productivity insights
KaryaAI/
├── backend/ # Node.js + Express API Server
│ ├── src/
│ │ ├── controllers/ # API endpoint handlers
│ │ ├── services/ # Business logic & AI integration
│ │ ├── middleware/ # Auth, validation, error handling
│ │ ├── config/ # Firebase & Gemini configuration
│ │ └── routes/ # API route definitions
│ └── package.json
├── frontend/ # Next.js React Application
│ ├── components/ # Reusable UI components
│ ├── pages/ # Next.js pages and API routes
│ ├── hooks/ # Custom React hooks
│ └── utils/ # Frontend utilities
├── docs/ # Documentation & guides
└── README.md # Project overview
- Node.js 20+ - JavaScript runtime environment
- Express.js - Web application framework
- TypeScript - Type-safe JavaScript development
- Firebase Firestore - NoSQL document database
- Firebase Auth - Authentication and user management
- Google Gemini AI - Advanced language model for AI features
- Zod - TypeScript-first schema validation
- Next.js - React framework with SSR/SSG
- React - Component-based UI library
- Tailwind CSS - Utility-first CSS framework
- React Query - Data fetching and state management
- Git - Version control
- Docker - Containerization
- PowerShell/Postman - API testing
- TypeScript ESLint - Code quality and consistency
- Node.js 20.0 or higher
- npm or yarn package manager
- Firebase project with Admin SDK credentials
- Google AI API key
# Clone the repository
git clone https://github.com/Zoroh26/KaryaAI.git
cd KaryaAI/backend
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env
# Edit .env with your credentials
# Start development server
npm run dev# Firebase Configuration
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_CLIENT_EMAIL=[email protected]
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_KEY\n-----END PRIVATE KEY-----"
# Google AI Configuration
GOOGLE_GEMINI_KEY=your-gemini-api-key
# Security
JWT_SECRET=your-secure-jwt-secret-minimum-32-charactersBase URL: http://localhost:3000/api
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/signup |
Register new user |
| POST | /auth/login |
User authentication |
| POST | /auth/logout |
User logout |
| Resource | Endpoints | Description |
|---|---|---|
| Users | GET/PATCH /users |
User management |
| Products | GET/POST/PATCH /products |
Product CRUD operations |
| Workflows | GET/POST/PATCH /workflows |
Workflow management |
| Tasks | GET/POST/PATCH /tasks |
Task operations |
| AI | POST /ai/generate-workflow |
AI-powered generation |
- Smart Assignment:
POST /tasks/assign- AI-powered task assignment - Role Access: Admin, Employee, Client role-based permissions
- Real-time Updates: WebSocket support for live updates
KaryaAI's intelligent task assignment system uses a sophisticated multi-factor algorithm:
- Skill Matching (40%) - Exact and partial skill matching with fuzzy logic
- Workload Balance (30%) - Current active tasks (max 3 per employee)
- Task Priority (20%) - High/Medium/Low priority weighting
- Availability (10%) - Employee availability status
# Admin triggers assignment
POST /api/tasks/assign
{
"taskIds": ["task1", "task2", "task3"]
}
# AI processes each task and returns optimal assignments
Response: {
"assignments": [{
"taskId": "task1",
"assignedTo": "employee_id",
"employeeName": "Alice Johnson",
"matchScore": 87.5,
"reason": "High skill match, low workload, high priority"
}]
}| Role | Permissions | Key Features |
|---|---|---|
| Admin | Full system access | User management, AI assignment, analytics |
| Employee | Personal task management | View/update own tasks, skill management |
| Client | Project ownership | Create products, generate workflows |
# Health check
GET http://localhost:3000/
# Authentication flow
POST /api/auth/login
{
"email": "[email protected]",
"password": "Admin@123"
}
# Test AI workflow generation
POST /api/ai/generate-workflow
{
"productId": "product_id",
"requirements": "Build a task management app with user auth and real-time updates"
}# Quick login test
$loginData = @{
email = "[email protected]"
password = "Admin@123"
} | ConvertTo-Json
$response = Invoke-RestMethod -Uri "http://localhost:3000/api/auth/login" `
-Method POST -Body $loginData -ContentType "application/json"
Write-Host "Token received: $($response.token)"cd backend
npm run dev # Starts on http://localhost:3000# Build and start
npm run build
npm start
# Using Docker
docker build -t karyaai-backend .
docker run -p 3000:3000 karyaai-backend- Development: Local Firebase project, test Gemini key
- Production: Production Firebase project, secured environment variables
KaryaAI
├── backend/ # Node.js API server
│ ├── src/
│ │ ├── controllers/ # API endpoint handlers
│ │ ├── services/ # Business logic & AI
│ │ ├── middleware/ # Auth & validation
│ │ └── config/ # Firebase & Gemini
│ └── README.md # Backend documentation
├── frontend/
└── README.md # Project overview
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Follow TypeScript best practices and existing code style
- Test your changes with provided test scripts
- Update documentation for new features
- Submit a Pull Request with clear description
- TypeScript strict mode enabled
- ESLint configuration for consistent code style
- Zod schemas for all API validation
- Error handling with centralized middleware
- Security best practices (JWT, CORS, validation)
- Backend API fully implemented and tested
- AI-powered workflow generation and task assignment
- Role-based authentication and authorization
- Comprehensive documentation and testing guides
-
Real-time Updates: WebSocket integration for live task updates
-
Advanced Analytics: Employee performance and project insights
-
Mobile Support: Responsive design and mobile-first approach
-
Integrations: Slack, email notifications, calendar sync
-
Discussions: Join project discussions for questions and ideas
-
Email: Contact the maintainer for enterprise inquiries
Built with ❤️ using modern technologies and AI-powered intelligence
