Foundations
Establish fluency in the core languages, runtime, and tooling that Wocul is built on.
TypeScript Essentials
- Type system fundamentals: interfaces, types, enums, generics, union/intersection types
- Utility types: Partial<T>, Pick<T>, Omit<T>, Record<K,V>
- Type narrowing and type guards
- Module system: ES modules vs CommonJS, barrel exports
- tsconfig.json configuration: strict, paths, target, moduleResolution
- Decorators (awareness — used in some patterns)
- Refactor a loosely-typed JavaScript module into strict TypeScript with zero any usage
- Build a generic CRUD service interface (ICrudService<T>) with proper typing for create, read, update, delete operations
- Write type guards for discriminated unions (e.g., a NotificationPayload that differs by platform: iOS, Android, Web)
Node.js Runtime
- Event loop mechanics: microtasks, macrotasks, process.nextTick vs setImmediate
- Async patterns: Promises, async/await, error propagation
- Streams and buffers (relevant for file upload service)
- child_process and worker threads (background processing patterns)
- Environment variables, .env management, config layering
- Build a simple stream pipeline that reads a large CSV, transforms rows, and writes output — without loading the entire file into memory
- Write a retry utility with exponential backoff (mirrors Wocul's payment retry logic)
Git & Development Workflow
- Branch strategy: feature branches, PRs, code review expectations
- Commit conventions (conventional commits)
- Merge vs rebase strategies
- Handling merge conflicts in package-lock.json and generated files
Backend Stack Deep Dive
Master the server framework, databases, and infrastructure services that power Wocul's backend.
Express 5 + API Design
- Express 5 differences from v4 (async error handling, path syntax changes)
- Middleware architecture: request lifecycle, ordering, error middleware
- Route organization patterns for 90+ endpoints
- Request validation with schemas (Zod or Joi)
- Rate limiting implementation (500 req/15min general, 20 req/15min auth, 3 req/hr demo)
- Response standardization: consistent envelope format, error codes
- Authentication middleware: Firebase Admin SDK token verification
- Role-based authorization middleware (OWNER, MEMBER, VIEWER checks)
- Build a mini API with auth middleware (Firebase token verification), role-based access, and rate limiting
- Implement a credit-check middleware that validates AI credit availability before processing a request (mirrors Wocul's pre-flight credit check pattern)
- Write comprehensive error middleware that handles validation errors, auth errors, and unexpected exceptions with consistent response shapes
MySQL (Relational Data Layer)
- Schema design: normalization, foreign keys, indexes, composite keys
- Wocul's entity model: User → Staff → ProjectMember → Project → Task/Sprint/Objective chains
- Query optimization: EXPLAIN, index usage, avoiding N+1 queries
- Transactions: when and how to use them (billing operations, task status changes with side effects)
- Migrations: schema versioning, safe migration practices (additive-first, backfill, then cleanup)
- Connection pooling configuration
- Soft deletes vs hard deletes (Wocul uses status-based archival: ACTIVE, ARCHIVED, REMOVED)
- Design the MySQL schema for the Task → Subtask → Approval → Watcher → Comment chain with proper indexes
- Write a query that fetches a project dashboard: task counts by status, overdue tasks, pending approvals — in a single optimized query
- Implement a billing transaction that atomically upgrades a subscription, allocates AI credits, and creates an invoice record
MongoDB (Logs, Queues, Analytics)
- Document modeling: when to embed vs reference
- Wocul's MongoDB collections: MySQL for domain entities, MongoDB for event-driven/temporal data
- Change Streams: real-time processing (used for notification queue processing)
- TTL indexes (PushNotification has 90-day TTL)
- Aggregation pipelines for analytics
- Mongoose schema design and validation
- Idempotency keys in queue collections (preventing duplicate processing)
- Design the NotificationQueue schema with status transitions (pending → processing → completed/failed), max retries, idempotency keys, and scheduled delivery
- Build a Change Stream listener that processes new queue entries in real-time, with a fallback polling mechanism (mirrors Wocul's 30-second cron fallback)
- Write an aggregation pipeline that computes "top performers" from the Feedback collection — average rating, count, and trend over the last 30 days
Redis
- Data structures: strings, hashes, sorted sets, lists
- TTL and expiration strategies
- Pub/sub patterns
- Session caching pattern (Wocul caches user context in Redis with 24h TTL)
- Rate limiter implementation using sliding window counters
- Cache-aside pattern for AI response caching (LLMCache)
- Connection management and sentinel/cluster awareness
- Implement a sliding-window rate limiter with Redis sorted sets
- Build a session cache layer: store user context on login, retrieve on each request, invalidate on logout
- Implement an LLM response cache with TTL and cache key strategy based on prompt hashing
AWS Services
- S3: File upload/download, pre-signed URLs, bucket policies, access control
- SES: Email sending, template management, bounce/complaint handling
- ECS Fargate: Container deployment basics (relevant for the upcoming agent service)
- IAM roles and least-privilege principles
- CloudWatch basics: logs, metrics, alarms
- Implement a file upload endpoint: receive multipart upload, validate file type/size (up to 100MB across 15+ file types), upload to S3, store metadata in MongoDB
- Send a templated email via SES with dynamic variables (mirrors Wocul's 18 email templates)
Firebase Admin SDK
- Token verification: validating Firebase ID tokens server-side
- Custom claims for role management
- FCM: sending push notifications with platform-specific payloads (iOS, Android, Web)
- Device token management
- Build the auth flow: receive Firebase token → verify → extract user ID → load user context from Redis (or MySQL fallback) → attach to request
Frontend Architecture
Understand the full frontend stack and be productive in the Wocul web application codebase.
Next.js 15 (Pages Router)
- Pages Router fundamentals: _app.tsx, _document.tsx, file-based routing
- Data fetching: getServerSideProps, getStaticProps, client-side fetching patterns
- API routes (if used for BFF patterns)
- Dynamic routes and catch-all routes
- Middleware for auth redirects
- Environment variables: NEXT_PUBLIC_* vs server-only
- Build optimization: code splitting, dynamic imports, image optimization
- Build a multi-step project creation wizard (mirrors /projects/create) with state preserved across steps
- Implement a protected route pattern: redirect unauthenticated users to /auth, redirect authenticated users away from /auth
React 18 Patterns
- Hooks: useState, useEffect, useCallback, useMemo, useRef, useContext
- Custom hooks: extracting reusable logic
- Component composition patterns: compound components, render props, HOCs
- Performance: React.memo, avoiding unnecessary re-renders, profiler usage
- Suspense and concurrent features (awareness)
- Error boundaries
- Build a useDeepWorkSession custom hook that manages session state (start, heartbeat, end, timeout), sends periodic heartbeat calls, and handles idle detection
- Create a useDebounce hook and apply it to the global search input (Wocul's search is rate-limited)
Redux Toolkit + Redux-Saga
- Redux Toolkit: createSlice, createAsyncThunk, selectors, entity adapters
- Saga fundamentals: take, call, put, fork, takeLatest, takeEvery
- Saga patterns: polling, cancellation, race conditions, optimistic updates
- Slice organization: one slice per domain (tasks, sprints, okrs, feedback, deepWork, billing, etc.)
- Persistence: selective persistence with redux-persist, choosing which slices to persist
- Normalized state: entity adapter patterns for collections
- Build the tasksSlice with CRUD actions, status transitions, and selectors for filtered views (by status, priority, assignee)
- Write a saga that polls for deep work heartbeat every N seconds, handles timeout, and dispatches session-end actions on failure
- Implement optimistic updates for task drag-drop between kanban columns (update UI immediately, revert on API failure)
UI Layer: Ant Design 4 + Styled Components
- Ant Design component library: Table, Form, Modal, Drawer, Select, DatePicker, notification/message
- Theme customization via Less variables
- Styled Components: theming, dynamic styles, extending Ant components
- Responsive patterns
- Accessibility basics
- Build a kanban board view using Ant Design Cards with drag-and-drop across columns (mirrors the sprint board UI)
- Create a styled notification preference panel: global toggles, per-category toggles, per-event-type toggles
Forms & Validation
- React Hook Form: useForm, useFieldArray, useWatch, controlled vs uncontrolled
- Zod schema validation: composable schemas, custom validators, error messages
- Complex form patterns: multi-step forms, conditional fields, dynamic field arrays
- File upload handling in forms
- Build the task creation form with all fields: title, description, priority (P1–P5), deadline, assignee, tags, visibility toggle, file attachments — with full Zod validation
Internationalization (i18n)
- next-i18next setup and configuration
- Translation file organization
- RTL (Right-to-Left) layout support for Arabic
- Pluralization, interpolation, date/number formatting per locale
- Language switching UX
- Add Hindi and Arabic translations for a settings page, handling RTL layout and number formatting
URL State Management
- nuqs: syncing filter/sort/pagination state to URL query parameters
- Benefits: shareable links, back-button support, state restoration on reload
- Patterns: typed URL params, default values, serialization
Wocul-Specific Systems
Understand the architectural decisions, cross-cutting concerns, and domain-specific patterns unique to Wocul.
Microservices Architecture
- Wocul's 5-service topology: core, notification, file, web, email-config
- Service boundaries: what lives where and why
- Inter-service communication patterns (HTTP, shared databases, event-driven)
- Shared npm packages (wocul-email-config as a library)
- Local development: running all services, Docker Compose setup, environment management
- Service health checks and monitoring
- Trace a complete user action through all services: "User creates a task with a file attachment and @mentions a teammate" — map which services are involved and what async operations are triggered
Notification System Deep Dive
- Full notification pipeline: event trigger → queue entry → Change Stream pickup (or cron fallback) → FCM/SES delivery
- 46+ notification event types across 6 categories
- Platform-specific payload construction (iOS, Android, Web)
- Notification preferences: global → category → event-type hierarchy, quiet hours with timezone
- DND integration: high-priority bypass, deferral queue, max 4 deferrals
- Email templates: the 18 template types, template variable injection, SES integration
- Retry logic: max 3 retries, idempotency, failure handling
- Implement the "task assigned" notification flow end-to-end: check preferences, check DND status, construct platform payloads, queue for delivery
- Build the quiet hours filter: given a notification, user timezone, and quiet hours config, decide whether to deliver now or defer
AI Feature Architecture
- Google Generative AI (Gemini) integration patterns
- Credit system: allocation, consumption tracking, pre-flight checks, overage budgets
- Input sanitization before LLM calls
- Response caching strategy (LLMCache in MongoDB)
- LLM metrics tracking: model, latency, cost, status (LLMMetrics collection)
- Async AI processing: AICommentQueue pattern — @wocul → queue → cron every 30s → AI response
- Context assembly: knowledge base documents feeding into task/sprint suggestions
- Upcoming multi-provider LLM routing layer: per-feature/per-project model routing, failover, circuit breakers
- Build the AI comment pipeline: @wocul mention → validate credits → queue → process with context → post response → deduct credits → log metrics
- Implement the credit check middleware: load subscription, check remaining credits, check overage budget, reject or allow
Billing & Subscription System
- Razorpay integration: payment processing, webhook handling, subscription lifecycle
- Plan tiers: FREE (100-day expiry), PRO (per-active-user, monthly/annual), ENTERPRISE (custom)
- Subscription state machine: ACTIVE → PENDING_PAYMENT → CANCELLED/EXPIRED/SUSPENDED
- Invoice generation: monthly cron, line items, active user calculation
- Grace period: 7 days for overdue invoices before suspension
- Payment retry: every 4 hours, max 3 attempts
- AI credit lifecycle: monthly allocation, consumption tracking, overage budget, reset on new cycle
- Implement the monthly billing cron: calculate active users, generate invoice with line items, handle edge cases (mid-month joins, downgrades)
- Write the payment webhook handler: receive Razorpay webhook → verify signature → update subscription → generate invoice → send receipt email
Cron Jobs & Background Processing
- Wocul's 19 scheduled jobs: the full cron landscape
- Cron design patterns: idempotency, distributed locking, failure recovery
- High-frequency crons: task overdue check (1 min), AI comment processing (30 sec)
- Daily crons: streak calculation, digest emails, cleanup, billing
- Timezone-aware scheduling (daily digest at 7 AM per user's timezone)
- Monitoring: ensuring crons are running, alerting on failures
- Implement the deep work streak calculator: check sessions yesterday per member, update streak, reset if broken
- Build the task overdue detector: query past-deadline tasks, update status, queue notifications — ensuring idempotency (don't re-notify)
File Service Architecture
- wocul_file_service internals: Express 4, JavaScript (legacy service)
- Upload pipeline: multipart parsing → type/size validation → S3 upload → MongoDB metadata
- Access control: two-tier system — path validation + role/permission checks
- Access types: USER, PERMISSION, PROJECT, TASK, ORGANISATION, DEPARTMENT
- Folder structure: nested directories via idParent
- Audio handling: duration tracking, transcript support
- File type restrictions: 15+ allowed types, 100MB max
Advanced Topics
Cover the cross-cutting concerns, performance patterns, and upcoming architectural directions.
Search Architecture
- Global full-text search across Tasks, Projects, Sprints, Objectives, Key Results, Tags
- Search indexing strategy
- Type filtering and project scoping
- Result snippet highlighting
- Rate limiting for search endpoints
- Performance optimization for large datasets
Real-Time Features
- Deep work team status: showing who's currently in a focus session
- Heartbeat mechanism: client sends periodic heartbeats, server tracks active sessions
- MongoDB Change Streams for real-time queue processing
- Polling patterns for near-real-time updates
- WebSocket considerations for future enhancements
Testing Strategy
- Unit testing: services, utilities, middleware, Redux slices, sagas
- Integration testing: API endpoints with test databases
- E2E testing: critical user flows (task creation, sprint management, billing)
- Test data management: factories, fixtures, seeding
- Mocking external services: Firebase, Razorpay, S3, SES, Gemini AI
- CI/CD pipeline integration
- Write unit tests for the credit check middleware: sufficient credits, insufficient credits, overage budget available, overage exceeded, free plan limits
- Write an integration test for task creation: authenticate, create task with all fields, verify database state, verify notification was queued
Security Practices
- Input sanitization (especially before LLM calls)
- Firebase token validation and session management
- Role-based access patterns: middleware chains for OWNER/MEMBER/VIEWER checks
- File access control: preventing unauthorized file downloads
- Rate limiting as a security measure
- Razorpay webhook signature verification
- Environment secrets management
- OWASP top 10 awareness in the context of Wocul's stack
Performance & Observability
- Database query optimization: indexing strategy, query analysis
- Redis caching strategies: cache-aside, write-through, TTL management
- API response time targets and monitoring
- LLM metrics: tracking model, latency, cost per feature
- Logging standards: structured logging, correlation IDs across services
- Error tracking and alerting
- MongoDB slow query analysis
Autonomous Agent Architecture
- Phase 0 — LLM Routing Layer: multi-provider, multi-model config; per-feature/per-project model routing; Redis caching; failover and circuit breakers
- Phase 1 — Agent Framework: Python + LangGraph; stateful graphs with conditional branching; human-in-the-loop interrupts; MongoDB checkpointing via MongoDBSaver
- Connector abstraction: BaseConnector with get_read_tools() / get_write_tools() — generalizing beyond software teams
- Agent capabilities: investigate P1 tasks, read GitHub/AWS, identify root causes, generate fix PRs, deploy to ECS Fargate sandboxes, human review gates
- 19 LLM feature keys and how they map to routing decisions
- How wocul-service-agent integrates with existing microservices
- Design the interface for a new industry connector (e.g., RetailConnector) implementing BaseConnector with appropriate read/write tools
- Map the P1 investigation flow as a LangGraph state machine: trigger → read context → investigate → root cause → generate fix → sandbox deploy → human review → proceed or rollback
Capstone Project
Demonstrate end-to-end proficiency by building a complete feature that touches multiple layers of the stack.
Recommended Resources
Onboarding Checklist
Before starting the curriculum, ensure each developer has:
- Local development environment set up (all 5 services running)
- Access to the GitHub repositories
- Firebase project access (dev environment)
- AWS console access (dev environment, read-only minimum)
- Database access (dev MySQL, MongoDB, Redis instances)
- Razorpay test mode credentials
- Postman/Insomnia collection for Wocul API endpoints
- Figma access for UI designs
- Slack channel access for engineering discussions
- Completed the PRD review (the full Wocul PRD should be the first document every developer reads)