OpenPumTa
Self-hosted productivity platform serving 300+ registered users and 10,000+ visits with cross-device WebSocket timer synchronization and Redis-cached analytics.
- Timeline
- Jan 2025 — Present
- Stack
- Next.js · React · TypeScript · Tailwind CSS · Zustand · Node.js · Express.js · REST APIs · WebSockets · PostgreSQL · SQL · Prisma · Redis · Docker · Nginx · Prometheus · Grafana · Linux
The problem
Most study and habit trackers fail under real daily usage in two ways: browser timers drift or desync across devices when tabs sleep, and analytics dashboards hammer the primary relational database on every page load.
- Orphaned and drifting Pomodoro sessions: a timer started on a laptop must stay accurate to the second on a phone, and recover cleanly if the browser tab crashes.
- Expensive streak and heatmap aggregations: computing 21-day habit streaks and study-hour leaderboards across 10,000+ visits directly in PostgreSQL creates unnecessary read amplification.
- Managed-cloud sprawl: running split frontend, backend, database, and cache tiers across separate hobby clouds added cross-region latency and unpredictable cold starts.
How it works
- 01
Server-authoritative WebSocket timer hub
Instead of trusting client-side setInterval ticks, the Express + WebSocket gateway stores authoritative start timestamps and state transitions, broadcasting delta-synced updates across all connected devices. - 02
30+ REST APIs & 10 Prisma models
Structured relational schemas in PostgreSQL for users, 21-day habit chains, Pomodoro sessions, tasks, and daily reflections, guarded by Zod request validation and centralized async error handlers. - 03
Redis write-through analytics cache
Cached expensive study-time rollups and streak aggregations in Redis with targeted key invalidation on session completion, cutting PostgreSQL read load by 80%. - 04
AI daily coaching reviews
Synthesized completed habits, task velocity, and focus-session duration into structured prompts to generate personalized daily retrospectives. - 05
Consolidated Linux VPS + Prometheus & Grafana
Migrated the entire stack into a single Docker Compose network behind Nginx with SSL termination, and instrumented Express, PostgreSQL, and Redis with Prometheus exporters and Grafana dashboards.
Architecture
Follow a study session and analytics query through the self-hosted Linux VPS stack.
- 01Clients connect over HTTPS & WSS
Desktop and mobile browsers open REST and persistent WebSocket connections to openpumta.com.
- 02Nginx terminates TLS on the VPS
A single Nginx reverse proxy routes /_next to Next.js, /api to Express, and upgrades /ws connections.
- 0330+ Express REST endpoints
Zod-validated controllers manage habits, tasks, study logs, and AI daily review generation.
- 04Authoritative WebSocket timer sync
Pomodoro start, pause, and completion events sync across all active tabs and devices in real time.
- 05Redis cache + PostgreSQL persistence
Hot dashboard aggregations hit Redis first (cutting DB load by 80%), while 10 Prisma models persist transactional records in PostgreSQL.
- 06Prometheus & Grafana observability
Request latency, active WebSocket connections, and container memory are scraped continuously into Grafana.
Production impact
- registered active users
- 300+
- total platform visits served
- 10,000+
- reduction in PostgreSQL read queries via Redis
- 80%
- validated REST APIs & 10 Prisma models
- 30+
- Redis Write-Through Cache38 ms
- Direct PostgreSQL Aggregation390 ms
Consolidating Next.js, Express, PostgreSQL, and Redis onto a single Docker Compose VPS eliminated cross-cloud network hops and kept p95 API latency under 50 ms.
Technical deep dive
Complete system specification, schemas, and implementation notes.
Stop burning out on sheer willpower. OpenPumTa is the only productivity system that tracks your focus, forces 21-day consistency, and uses AI to prevent dopamine burnout—all without locking your data in a walled garden.
The Problem
You rely on 5 different apps to study—Yeolpumta for timers, Notion for notes, and scattered habit trackers. None talk to each other. When you drop a habit, you lose momentum. The result? Distraction, burnout, and broken streaks.
The Outcome
A single, desktop-first workspace that locks you into deep work and builds unbreakable 21-day streaks.
How It Works (The Mechanism)
- The 6-Habit Limit: You are only allowed to track up to 6 habits at a time. This prevents overwhelm and forces you to focus on what matters.
- "Bad Day Plans": Every habit has a minimum baseline (e.g., "Do 1 pushup"). On low-energy days, you do the baseline to keep the streak alive. No zeros.
- AI Burnout Coach: The app uses Groq LLMs to analyze your daily reviews and focus logs, identifying burnout risks before you crash.
- Instant Timer Sync: Next.js and WebSockets guarantee your timer feels instantaneous across devices without crashing the database.
Architecture & System Design
openPumta utilizes a modern, decoupled architecture designed for scalability, real-time syncing, and deep observability.
The Value Stack
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, Zustand, TanStack Query, Recharts.
- Backend: Express, Node.js, WebSockets, TypeScript, Zod, Passport, Google OAuth.
- Data Layer: PostgreSQL (via Prisma ORM), Redis (Stats Caching).
- Infrastructure: Docker Compose, Nginx, Prometheus, Grafana.
- AI: Groq API for fast LLM-powered reports.
Detailed Features
Dashboard & Overview
The central hub for your entire day.

- Quick Actions: Immediately start a timer for any subject.
- Habit Section: Quickly check off your daily habits.
- Daily Review: Use this section as a journal/diary, with the ability to review previous journals.
- Analytics: View weekly and 21-day analysis charts of your study time and habits.
- Subject Setup: Click and quickly configure tracking subjects with a name, goal time per day, color, and difficulty. Link habits directly to subjects so they auto-complete after a certain amount of time passes!
Habits (21-Day Protocol)
Designed around strict, achievable consistency.

- The "Perfect Day": Complete just 4 habits to achieve a "Perfect Day" score. We celebrate your momentum: completing 2 habits triggers small confetti, and hitting 4 triggers a massive celebration!
- 21-Day Heatmap: Your progress is shown in a 21-day heatmap by default.
- Subject Linking: Habits can be linked to subjects for automatic completion during focus sessions.


Workspace
A Notion-like canvas for your personal productivity systems.

- Rich Text Blocks: Use todos, headings, paragraphs, and dividers.
- Build Your Systems: Create custom pages like a "Daily Planner" with a section for today's todos and another for the week's priorities.
- Notion Compatibility: Copy and paste your existing Notion templates directly into openPumta—they work seamlessly!
Clock & Focus
- Visual Progress: See the current subject time, total time of the day, and a visual progress ring.
- Evolving Avatar: Watch your avatar evolve as your focus time increases throughout the session!

Stats
We believe in "Show, Don't Tell" when it comes to stats. Dive into detailed visual breakdowns of your performance.



Settings
Easily configure your profile, subjects, and preferences.


The Proof
- Scaled to 300+ registered users and 10,000+ visits across 30+ REST APIs and 10 Prisma models.
- Reduced database load by over 80% using Redis analytics caching.
- Maintained zero downtime with sub-50ms WebSocket timer synchronization monitored via Prometheus and Grafana.