SaaS Platform — Jarvis

Jarvis — AI-Powered Personal Operations Platform

A production SaaS platform combining conversational AI with visual analytics

Jarvis is a full-stack SaaS platform running in production. Users interact via WhatsApp for quick task execution, while a web dashboard provides visual analytics for financial transactions and calendar management. Built on MCP for extensibility and designed with identity-awareness as a core security principle.

✓ Production SaaSFull-StackAI-Powered
Jarvis Dashboard - Financial analytics and calendar visualization

The Problem

Personal task management is fragmented. Users switch between calendar apps, note-taking tools, expense trackers, and messaging platforms to manage their daily operations. This creates friction, missed tasks, and duplicated effort.

Jarvis consolidates these workflows into a single conversational interface accessible from WhatsApp, where users already spend their time. No app switching. No manual data entry. Just natural language commands that execute real-world actions.

What Jarvis Does

  • Financial tracking: Record income and expenses conversationally
  • Note management: Create, retrieve, and delete notes without leaving WhatsApp
  • Calendar operations: List, create, edit, and delete Google Calendar events
  • Availability checks: Query free time slots and schedule conflicts
  • Contextual memory: Maintains conversation history for natural follow-ups

All actions are executed deterministically through MCP tools. The AI never performs side effects directly.

Dual Interface: Conversational + Visual

Jarvis operates through two complementary interfaces, each optimized for different use cases:

💬

WhatsApp Interface

Natural language commands for quick task execution. Users can log expenses, create calendar events, and take notes without leaving their messaging app.

"Add $50 expense for lunch" → Instant logging
📊

Web Dashboard

Visual analytics and data exploration. Users access interactive charts for financial insights, calendar views for schedule management, and historical data analysis.

  • • Financial transaction graphs
  • • Calendar event visualization
  • • Spending analytics by category

Design principle: Conversational for input, visual for analysis. Users execute tasks via WhatsApp and review insights via the dashboard.

System Architecture

WhatsApp → Webhook → n8n → AI Agent (LangChain) → MCP Tools → Supabase
Web Dashboard → Next.js → Supabase (shared database)
Getwat API (Payments) → Webhook → n8n → Supabase (user status)

n8n orchestrates the conversational workflow. The AI agent (LangChain) handles intent classification and reasoning. All real-world actions—database writes, API calls, calendar updates—are delegated to MCP tools with strict input/output contracts. The web dashboard reads from the same Supabase database, providing real-time visual analytics of user data.

n8n Agent Workflow - Jarvis conversational interface orchestration
MCP Tools Configuration - Extensible toolbox architecture

Subscription & Payment Management

Jarvis operates as a subscription-based SaaS platform. Payment processing and subscriber management are fully automated through a dedicated n8n workflow that receives real-time webhooks from the Getwat payment API.

When a payment event occurs (successful payment, subscription renewal, or cancellation), Getwat sends a webhook notification to the n8n workflow. The workflow processes the event, updates the user's subscription status in Supabase, and automatically grants or revokes access to the assistant based on payment status.

Real-time payment notifications via webhooks
Automated user status management (active/inactive)
Subscription lifecycle tracking
Zero manual intervention for access control

This automated billing workflow ensures users only have access when their subscription is active, eliminating manual account management overhead.

n8n Payment Workflow - Automated subscription and user status management via Getwat API

Identity-Aware Security

Before executing any action, Jarvis normalizes the incoming WhatsApp identifier and queries Supabase to retrieve the full user profile. User identity and the current date are injected into the system prompt, ensuring the assistant always knows who it's acting for and preventing cross-user data exposure.

Identity resolved before execution
Per-user context isolation
No cross-user data leakage
OAuth token management per user

Key Engineering Decisions

MCP as an extensible toolbox

MCP allows new capabilities to be added as isolated tools without rewriting the agent's system prompt or core logic. This reduces AI hallucination when selecting tools and makes the system maintainable as it grows.

OAuth token lifecycle management

Google Calendar integration required learning OAuth 2.0 token flows: access tokens, refresh tokens, expiration handling, and secure storage. This ensures calendar operations remain authorized without repeated user logins.

Deterministic execution boundaries

The AI agent never performs side effects directly. All database writes, API calls, and state mutations are delegated to MCP tools with strict contracts, ensuring auditability and preventing unintended actions.

Cost and latency optimization

GPT-4.0-Nano is used to balance response speed and operational cost. The system is designed for real-time conversational use, not batch processing.

Technical Challenges Overcome

🔥 Token Refresh Race Conditions

Problem: Multiple concurrent WhatsApp messages from the same user triggered parallel Google Calendar API calls, causing OAuth token refresh race conditions and authentication failures.

Solution: Implemented token refresh mutex lock in Supabase with atomic compare-and-swap operations. Each user's token refresh is now serialized, preventing concurrent refresh attempts.

⚡ WhatsApp Business API Rate Limits

Problem: WhatsApp Business API enforces strict rate limits (80 messages/second per user). High-volume conversations with rapid AI responses triggered 429 errors, breaking the user experience.

Solution: Built n8n queue with exponential backoff and retry logic. Messages are buffered, chunked, and sent within rate limit windows, ensuring delivery without errors.

💰 AI Cost Optimization

Problem: Initial implementation used GPT-4 for all requests, resulting in unsustainable operational costs ($0.30+ per conversation for token-heavy calendar queries).

Solution: Migrated to GPT-4.0-Nano (90% cost reduction) and implemented prompt compression techniques. System now maintains response quality while keeping costs under $0.02 per conversation.

Key Learnings

MCP as a "toolbox" pattern

The biggest architectural insight was treating MCP as a modular toolbox. New features can be added by creating new tools without touching the agent's core logic. This separation of concerns reduces prompt engineering complexity and makes the system easier to extend.

OAuth token management in production

Integrating Google Calendar required deep understanding of OAuth 2.0 flows: obtaining access tokens, securely storing refresh tokens, handling token expiration, and gracefully recovering from authorization failures. This was critical for maintaining persistent calendar access without repeated user authentication.

Tech Stack & Architecture Decisions

n8n

Self-hosted workflow orchestration with complex branching logic and webhook reliability. Chosen over Zapier for production control and cost efficiency.

LangChain

AI agent framework with built-in memory management and tool calling. Reduces boilerplate for conversational context handling.

GPT-4.0-Nano

Balances response quality with operational cost. 90% cheaper than GPT-4 while maintaining conversational coherence.

MCP

Standardized tool protocol for AI agents. Enables modular capabilities without prompt engineering complexity.

Supabase

Postgres with real-time subscriptions and built-in auth. Handles multi-user data isolation and OAuth token storage securely.

Next.js + React

SSR framework for dashboard with optimized data fetching. React for interactive charts and real-time updates.

WhatsApp Business API

Users already on platform. No app install friction. Official API ensures message delivery reliability.

Docker + VPS

Self-hosted infrastructure for full control over n8n workflows and data privacy. Avoids vendor lock-in.

Interested in Discussing This Project?

I'm open to discussing the technical architecture, engineering decisions, or potential collaborations. Whether you're a recruiter, technical lead, or fellow engineer, let's connect.

"Jarvis demonstrates that AI agents can safely manage real-world operations when identity, execution boundaries, and tool modularity are treated as architectural foundations, not afterthoughts."