Running three production SaaS products — Byvano, DeskTrust, and RxCompliant — on a small team requires a tech stack that maximizes developer productivity without sacrificing reliability. Here is exactly what we use and why.
The Core Stack
All three products share the same foundational technologies:
- Next.js 14 (App Router) — full-stack React framework for both frontend and API routes
- Prisma 5 — type-safe ORM for database access
- MySQL 8 — relational database
- Tailwind CSS 3.4 — utility-first CSS framework
- JWT + bcrypt — custom authentication (no NextAuth)
- PM2 — process management with cluster mode
- Nginx — reverse proxy with SSL (Let's Encrypt)
Why Next.js App Router
We chose Next.js because it eliminates the need for a separate backend. API routes live alongside frontend pages, reducing deployment complexity. The App Router (introduced in Next.js 13) gives us React Server Components for SEO-critical marketing pages and client components for interactive dashboard UIs.
The trade-off: App Router has a steeper learning curve than Pages Router, and some edge cases (like mixing server/client components) can be confusing. But the productivity gains are worth it.
Prisma as ORM
Prisma gives us type-safe database queries with excellent migration support. The schema file serves as documentation — you can read our data model and understand the entire application. We use for performance-critical queries (bulk updates, analytics aggregation) and Prisma Client for everything else.
One lesson: Prisma's @updatedAt directive does not trigger when you update a row to the same value. We discovered this when our employee monitoring heartbeat system was failing — the fix was switching to raw SQL for status updates that need to always refresh the timestamp.
Hosting: Hostinger VPS + AWS EC2
We run Byvano and RxCompliant on a Hostinger VPS (cost-effective for mid-traffic SaaS) and DeskTrust on AWS EC2 (needed for the real-time screenshot processing workload). Both use PM2 for process management and Nginx as reverse proxy.
Monthly hosting cost for all three products: under 0. That is one of the advantages of Next.js — the entire stack (frontend + API + SSR) runs as a single Node.js process, so you do not need separate frontend and backend servers.
AI Integration
We use AI across all three products:
- DeskTrust uses Google Gemini for screenshot transcription and daily activity summaries
- RxCompliant uses Claude (Anthropic) for prescription document analysis and NPI verification
- Byvano uses AI for automatic product tag suggestions and video content categorization
Our approach to AI costs: always use the cheapest model that meets the quality bar. For DeskTrust transcription, Gemini Flash is fast and cheap. For RxCompliant prescription analysis, we need Claude's superior document understanding.
Desktop Agent (DeskTrust-Specific)
DeskTrust's desktop agent is a Node.js application that runs on employee computers (Windows, macOS, Linux). It captures screenshots, detects active windows, monitors idle/lock state, and uploads data to the server. The agent includes auto-update capability — it checks the server for new versions on startup and self-updates.
Key technical decisions for the agent:
- Pure Node.js with minimal dependencies (screenshot-desktop, sharp, axios)
- Built-in HTTP server on port 19847 for local control (pause/resume/status)
- Native popup portal via Edge --app mode (no browser login needed)
- Keepalive pings during idle/lock to prevent false offline status
Deployment Pipeline
Our deployment is simple: git pull && npm run build && pm2 restart. No CI/CD pipeline, no Docker, no Kubernetes. For a team our size, this is the right level of complexity. We will add CI/CD when we need it, not before.
What We Would Do Differently
If starting over, we would:
- Use TypeScript from day one on all projects (RxCompliant uses it, the others do not)
- Set up a shared component library between the three products
- Implement proper CI/CD earlier (even just GitHub Actions for linting and tests)
- Use PostgreSQL instead of MySQL (Prisma works better with Postgres features like JSON queries)
Built with This Stack
See the products we built: Byvano, DeskTrust, RxCompliant