DEV Community

Mamoor Ahmad
Mamoor Ahmad

Posted on

I was paying $600/mo for 5 SaaS tools. So I built one that does all of them โ€” and open-sourced it.

Last year I was running a 12-person team and paying for:

  • ๐Ÿ“‹ Trello โ€” task management ($12/user/mo)
  • ๐Ÿ“ Notion โ€” knowledge base ($10/user/mo)
  • โšก Zapier โ€” workflow automation ($30/mo)
  • ๐Ÿ“ง Gmail โ€” email (free, but 5 tabs of context switching)
  • ๐Ÿค– Some chatbot tool โ€” AI assistant ($50/mo)

Total: ~$600/month. Five tools. Five bills. Five places where information went to die. ๐Ÿ˜ฉ

I kept thinking: why can't one thing do all of this? ๐Ÿค”

So I built HiveOps ๐Ÿ โ€” a self-hosted company operating system with AI agents that actually execute tasks, not just chat.

And I open-sourced it. ๐ŸŽ‰


๐Ÿ›  What HiveOps Actually Does

It's a full-stack Node.js app that gives your team:

๐Ÿ“‹ Task Management โ€” priority levels, status tracking, assign to users or AI agents, comments, file attachments.

๐Ÿค– AI Agents โ€” not chatbots. Real agents that execute tasks with retry logic, exponential backoff, and a dead letter queue. Assign a task to an agent and it runs it. โšก

๐Ÿ”„ Workflow Automation โ€” event-driven rules. Trigger โ†’ Conditions โ†’ Actions. Example: "When an urgent task is created, notify the department manager and auto-assign it to an agent."

๐Ÿ“ง Real Email โ€” inbox, sent, drafts, starred. IMAP polling for inbound. SMTP for outbound. AI drafts replies. Not a mock โ€” real email. โœ‰๏ธ

๐Ÿ’ฌ Real-Time Chat โ€” Socket.IO with typing indicators, channels, direct agent chat.

๐Ÿ“š Knowledge Base โ€” full-text search, categories, CRUD.

โฐ Scheduler โ€” DB-persisted cron. Interval, daily, weekly. Auto-creates tasks and triggers agents.


๐Ÿ— The Tech Stack

๐Ÿ–ฅ๏ธ Backend:    Node.js + Express
๐ŸŽจ Frontend:   Next.js 14 (App Router) + Tailwind
๐Ÿ’พ Database:   SQLite (dev) or PostgreSQL (production)
โšก Real-time:  Socket.IO
๐Ÿ” Auth:       JWT + bcrypt
๐Ÿง  AI:         Any OpenAI-compatible API
๐Ÿ“ง Email:      Nodemailer + ImapFlow
๐Ÿš€ Deploy:     docker-compose up
Enter fullscreen mode Exit fullscreen mode

The database adapter is the part I'm most proud of. Same API, two backends:

// This works on SQLite AND PostgreSQL โ€” zero changes needed โœจ
const user = await db.prepare('SELECT * FROM users WHERE id = ?').get(id);
const tasks = await db.prepare('SELECT * FROM tasks WHERE status = ?').all('pending');
await db.prepare('INSERT INTO users (...) VALUES (...)').run(...);
Enter fullscreen mode Exit fullscreen mode

SQLite for local dev (no Docker needed ๐Ÿ™Œ). PostgreSQL for production (one env var). Auto-converts ? placeholders to $1, $2. Auto-handles boolean differences. Auto-coerces bigint strings from COUNT queries. ๐Ÿ”ง


๐Ÿค– The AI Agent System (This Is The Interesting Part)

Most "AI agent" projects are chatbots with extra steps. HiveOps agents are different:

// ๐Ÿ”„ Agent auto-execution loop:
// 1. Pick pending tasks assigned to active agents
// 2. Execute via LLM with the agent's system prompt
// 3. On failure -> retry with exponential backoff (10s, 20s, 40s)
// 4. After 3 retries -> dead letter queue + notify task creator ๐Ÿ’€
Enter fullscreen mode Exit fullscreen mode

Agents can also delegate to each other ๐Ÿค:

// Agent A (marketing) delegates to Agent B (engineering)
await agentDelegate(marketingAgentId, engineeringAgentId,
  "We need a landing page for the Q2 campaign", taskId);
Enter fullscreen mode Exit fullscreen mode

And the workflow engine ties it all together ๐Ÿ”—:

// When a task is created with priority "urgent":
// -> Check: is priority === "urgent"? โš ๏ธ
// -> Action 1: notify the department manager ๐Ÿ“ข
// -> Action 2: auto-assign to the ops agent ๐Ÿค–
// -> Action 3: send a message to the #urgent channel ๐Ÿ’ฌ
Enter fullscreen mode Exit fullscreen mode

No Zapier. No monthly fee. Just rules that run. โœ…


๐Ÿš€ How to Run It

git clone https://github.com/mamoor123/hiveops.git && cd hiveops
cp .env.example .env
openssl rand -base64 32  # paste into JWT_SECRET ๐Ÿ”‘
docker-compose up --build
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:3000. That's it. ๐ŸŽฏ

Or if you don't want Docker โ€” SQLite mode works out of the box:

cd server && npm install && npm run migrate
JWT_SECRET=your-secret npm run dev
Enter fullscreen mode Exit fullscreen mode

๐Ÿง  What I Learned Building This

1๏ธโƒฃ Dual-database adapters are worth the effort. Supporting SQLite + PostgreSQL from day one means devs can contribute without Docker, and you deploy with Postgres for real workloads. The adapter is ~250 lines and handles all the quirks (bigint strings, boolean differences, placeholder syntax). ๐Ÿ”ง

2๏ธโƒฃ AI agents need execution infrastructure, not just prompts. The prompt is 10% of the work. The retry logic, error handling, dead letter queues, concurrency control โ€” that's the other 90%. ๐Ÿ’ช

3๏ธโƒฃ Real-time is a superpower for internal tools. Socket.IO notifications feel alive compared to polling. Users notice the difference. โšก

4๏ธโƒฃ Open source is a force multiplier. I built this for myself, but open-sourcing it means I get bug reports, feature requests, and contributors for free. ๐ŸŒ


๐Ÿ”ฎ What's Next

  • ๐Ÿ“ฑ Mobile-friendly responsive UI
  • ๐Ÿ“… Calendar view for tasks
  • ๐Ÿ”— Webhook integrations
  • ๐Ÿข Multi-tenant support
  • ๐Ÿ” SSO (SAML/OIDC)

โญ Try It

GitHub: github.com/mamoor123/hiveops ๐Ÿ

Star it โญ if you find it useful. Open an issue ๐Ÿ› if you find a bug. PRs welcome ๐Ÿ™

If you're paying for 5+ tools and your team is under 50 people โ€” give it a spin. You might save $600/month like I did. ๐Ÿ’ฐ


What tools are you paying for that you wish were one thing? Drop a comment below ๐Ÿ‘‡ โ€” I'd love to hear!

Top comments (2)

Collapse
 
survivor profile image
Survivor

This is really impressive. I like that you didnโ€™t just build another โ€œAI chatbot,โ€ but a full operating system for a small team with tasks, workflows, email, chat, and actual execution through agents.
The dual database adapter is also a very smart design choice. SQLite for local development and PostgreSQL for production makes the project much easier for others to try and contribute to.
Open-sourcing it was definitely the right move. Thanks for sharing this โ€” I can see this being very useful for small teams that want more control and lower costs.

Collapse
 
mamoor_ahmad profile image
Mamoor Ahmad

Thanks ๐Ÿ™