Postchi Development TODO
Last updated: 2025-11-09
Table of Contents
Automation Flows
✅ Completed
- Database schema (Flow, FlowVersion, FlowRun, FlowNodeExecution)
- Flow CRUD API endpoints
- Flow versioning (draft/publish workflow)
- Visual flow builder UI with React Flow
- Custom node components (Trigger, SendEmail, Delay, Condition, TagContact)
- Node toolbar for adding actions
- Node editor for configuring properties
- Multi-step wizard for creating flows from scratch
- Template-based flow creation
- Flow list page with status indicators
- Trigger configuration (list/tag selection)
🚧 In Progress
- Flow execution engine (Phase 1 - MVP)
- Create flow-execution.worker.ts in worker package
- Implement trigger detection hooks
- Basic node executors (send_email, delay, tag_contact)
- Sequential execution logic
- Flow run status tracking
📋 Planned (Phase 2)
- Advanced node execution
- Condition node logic with branching
- Parallel execution paths
- Wait-until conditions
- Custom field updates
- Flow analytics & monitoring
- Flow run history UI
- Success/failure rate metrics
- Node execution logs viewer
- Real-time flow status updates
- Advanced features
- A/B testing nodes
- Goal tracking
- Flow templates marketplace
- Import/export flows
🐛 Known Issues
- None currently
Email Delivery
✅ Completed
- Email queue with BullMQ
- Email worker processing
- Postfix integration setup
- DKIM signing configuration
- Message tracking schema
- Bounce handling
- Suppression list management
🚧 In Progress
- None currently
📋 Planned
- Click tracking
- Link rewriting in emails
- Click event recording
- Click analytics API
- Open tracking
- Tracking pixel implementation
- Open event recording
- Open rate analytics
- Email templates
- Template editor UI
- Variable substitution
- Template versioning
- Preview functionality
- Batch sending
- Bulk email API endpoint
- Rate limiting per domain
- Progress tracking
- Advanced features
- Attachment support
- Inline images
- Email scheduling
- Send time optimization
🐛 Known Issues
- None currently
Dashboard UI
✅ Completed
- Authentication (login/register)
- Dashboard layout with navigation
- Domain management page
- Suppression list page
- Contacts management
- Lists management
- Tags management
- Segments builder
- Flow builder (visual editor)
- Flow template selector
- Responsive design with Tailwind CSS
🚧 In Progress
- None currently
📋 Planned
- Analytics dashboard
- Message volume charts
- Delivery rate graphs
- Engagement metrics
- Domain performance
- Flow analytics
- Flow run timeline
- Node execution logs
- Success/error rates
- Contact journey view
- Settings pages
- Organization settings
- User management
- API key management
- Billing integration
- UI improvements
- Dark mode
- Keyboard shortcuts
- Bulk actions
- Advanced filtering
- Notifications
- In-app notifications
- Email alerts for critical events
- Webhook delivery status
🐛 Known Issues
- None currently
API & Backend
✅ Completed
- Express server setup
- Authentication with JWT
- API key authentication
- Multi-tenancy (organization isolation)
- Domain CRUD operations
- DNS verification (SPF, DKIM, DMARC)
- Contact management API
- List management API
- Tag management API
- Segment builder API
- Suppression list API
- Webhook CRUD operations
- Flow management API
- Message tracking API
🚧 In Progress
- None currently
📋 Planned
- Webhook delivery system
- Webhook queue worker
- Retry logic with exponential backoff
- Delivery logging
- Signature verification
- Rate limiting improvements
- Per-endpoint limits
- Dynamic rate limits based on tier
- Rate limit headers
- API improvements
- Batch operations
- GraphQL endpoint (optional)
- Pagination improvements
- Advanced search/filtering
- Event system
- Event bus implementation
- Event streaming
- Audit logs
- Admin features
- Super admin endpoints
- Organization management
- User impersonation
- System health endpoints
🐛 Known Issues
- None currently
Infrastructure
✅ Completed
- Docker Compose setup for development
- PostgreSQL database
- Redis for caching and queues
- Postfix mail server
- BullMQ queue system
- Prisma ORM setup
- Environment configuration
- Monorepo with pnpm workspaces
🚧 In Progress
- None currently
📋 Planned
- Production deployment
- Kubernetes manifests
- Helm charts
- Docker production images
- CI/CD pipeline (GitHub Actions)
- Staging environment
- Monitoring & observability
- Prometheus metrics
- Grafana dashboards
- Error tracking (Sentry)
- Log aggregation (ELK/Loki)
- Distributed tracing
- Security
- Security audit
- Dependency scanning
- Secrets management
- SSL/TLS configuration
- Rate limiting at infrastructure level
- Performance
- Database optimization
- Query performance monitoring
- Caching strategy
- CDN for static assets
- Backup & recovery
- Automated database backups
- Disaster recovery plan
- Point-in-time recovery
🐛 Known Issues
- None currently
Testing & Documentation
✅ Completed
- Basic project README
- Database schema documentation (in code)
- Environment variable examples
🚧 In Progress
- None currently
📋 Planned
- Testing
- Unit tests for services
- Integration tests for API endpoints
- E2E tests for critical flows
- Performance tests
- Load tests for email delivery
- Documentation
- API documentation (OpenAPI/Swagger)
- Flow builder user guide
- Architecture documentation
- Deployment guides
- Troubleshooting guides
- Migration guides
- Developer experience
- Code examples
- SDK libraries (Node.js, Python, PHP)
- Postman collection
- Contributing guidelines
- Code of conduct
🐛 Known Issues
- None currently
Current Sprint: Flow Execution (Phase 1 - MVP)
Goal: Make automation flows actually execute when triggered
Tasks:
-
Create flow execution worker
- Add
flow-execution.worker.tsto worker package - Set up flow execution queue
- Implement worker lifecycle (start/stop/graceful shutdown)
- Add
-
Implement trigger detection
- Add hook in contact.service.ts for list additions
- Add hook in tag.service.ts for tag assignments
- Add hook in contact.service.ts for subscriptions
- Create flow-trigger.service.ts to find matching flows
-
Build node executors
- Implement send_email executor (queue email job)
- Implement delay executor (re-queue with delay)
- Implement tag_contact executor (add tag to contact)
- Create node executor registry
-
Flow execution logic
- Load flow version and parse nodes/edges
- Implement sequential node execution
- Track execution state in FlowRun
- Create FlowNodeExecution records
- Handle execution errors
-
Testing & validation
- Test contact added to list trigger
- Test send email node
- Test delay node
- Test tag contact node
- Test complete flow end-to-end
Estimated Effort: 2-3 hours
Success Criteria:
- User creates flow in UI
- User publishes flow
- When contact is added to configured list, flow executes
- Email is sent via email queue
- Flow run is tracked in database
- Flow status shows as completed
Priority Matrix
🔴 High Priority (Next Up)
- Flow execution engine (Phase 1)
- Webhook delivery system
- Email click/open tracking
- API documentation
🟡 Medium Priority
- Flow analytics dashboard
- Email templates
- Production deployment setup
- Testing suite
🟢 Low Priority
- Dark mode
- Advanced flow features (A/B testing, goals)
- SDK libraries
- Template marketplace
Notes
- Focus on completing automation flows end-to-end before adding more features
- Keep worker package separate for scalability
- Document trigger points for future integrations
- Consider webhook events for all major actions (contact added, email sent, etc.)
- Plan for horizontal scaling of workers