InvoiceFLOW - SaaS Invoice Generator

Generador de facturas online actuando como SaaS

Next.jsNext.jsv15ReactReactv19TypeScriptTypeScriptTailwind CSSTailwind CSSShadcn UISWRNextAuthNextAuthNestJSNestJSPrisma ORMPrisma ORMPostgreSQLPostgreSQLBullMQBullMQRedisRedisSwagger / OpenAPIDockerDockerTurborepoTurborepo
InvoiceFLOW - SaaS Invoice Generator - Vista 1
1/10

🔍 Overview

InvoiceFLOW is a B2B SaaS platform designed to streamline invoicing and client management for freelancers and SMBs. The web client is built using React 19 and Next.js (App Router), integrated within a monorepo architecture that allows sharing domain entities and strictly typed API contracts between Frontend and Backend.

🌟 Key Features

  • Type-Safe Monorepo Architecture: Utilizes shared packages (@repo/core, @repo/application) to maintain a single source of truth for TypeScript types across the entire platform.
  • Dynamic Template System: Real-time invoice rendering with multiple visual styles using interactive React components.
  • Reactive Dashboard: Built with Shadcn UI and Tailwind CSS, optimized via SWR to ensure financial metrics stay updated without page reloads.
  • Secure Authentication: Session lifecycle managed by NextAuth.js, featuring hybrid route protection (Middleware and Server Components) to guarantee multi-tenant data isolation.
  • Asynchronous Queue System: NestJS backend coupled with BullMQ and Redis to delegate heavy PDF generation to background workers, freeing the main event loop.

🧠 Challenges & Learnings

State Management in App Router: The main challenge was finding the optimal balance between React Server Components (RSC) for security/performance and Client Components for interactivity. I implemented SWR alongside a custom API service layer to inject JWTs dynamically, ensuring a fluid UX.

Distributed Task Processing: Offloading PDF generation to secondary processes using BullMQ on top of Redis was a crucial milestone. It prevented API blocking under concurrent loads and stabilized response latencies below 150ms.

🎯 Outcome

A highly scalable and maintainable enterprise-grade product. Thanks to Turbopack migration and strict monorepo layering, build times were significantly slashed, and the overall user experience feels instantaneous due to SWR caching mechanisms.

Developed by L0fgD3v, with ❤️

|