Skip to main content

<DM />

Back to work

Web

SaaS

Lamima Workflow Management

Full Stack Engineer — App Router modules, server actions, Prisma repositories, auth

Internal operations platform for clients, employees, projects, workflows, quotations, timesheets, and reports—Next.js 16, Prisma, PostgreSQL, NextAuth v5, and .NET Aspire.

Overview

Lamima is a full-stack workflow and project operations system. It covers CRM-style clients, employee HR views, project tracking, a workflow designer with runnable instances and stages, quotations, timesheets, notifications, reports, and settings. The app uses Next.js 16 App Router with Server Components, Server Actions, a repository/service layer over Prisma/PostgreSQL, and NextAuth v5 sessions. Aspire runs the local stack.

Problem

Operations data (clients, staff, projects, quotes, time, pipeline stages) lived in disconnected tools. The business needed one authenticated system with clear modules and role-aware access.

Solution

Built a Next.js 16 dashboard monorepo with protected (dashboard) routes per domain, Server Actions + API routes for mutations, Prisma repositories and services for business logic, TanStack Query/Table on the client, and NextAuth v5 with a Prisma adapter.

Frontend

Next.js 16 App Router dashboard with RSC + client islands, Radix/Tailwind UI, TanStack Table for dense ops grids, and dark mode via next-themes.

Next.js 16 + Turbopack

React 19

Tailwind CSS 4

TanStack Query + Table

React Hook Form + Zod

Radix UI

Sonner

next-themes

  • Route groups: (auth) for login/register; (dashboard) for clients, employees, projects, workflows, instances, stages, quotations, timesheets, reports, notifications, settings
  • Server Components fetch where possible; client components for interactive tables and forms
  • TanStack Table for filterable/sortable operational lists
  • RHF + Zod for quotations, employee, and project forms with Sonner toasts
  • Shared UI primitives (Dialog, etc.) via Radix and CVA/clsx utilities

Backend

Next.js Server Actions and Route Handlers over a repository → service → Prisma stack on PostgreSQL, with NextAuth v5 sessions.

Next.js Server Actions

Route Handlers

Prisma 7

PostgreSQL

NextAuth.js v5

bcryptjs

.NET Aspire

  • repositories/ abstract Prisma queries; services/ hold business rules for workflows, quotes, timesheets
  • Substantial Prisma schema covering clients, employees, projects, workflow templates, instances, stages, quotations, timesheets, notifications
  • NextAuth v5 beta with Prisma adapter and database-backed sessions
  • proxy.ts for controlled external API routing when needed
  • Aspire AppHost + Docker Postgres for local orchestration; Jest for unit/integration coverage

Modules

Clients & employees

CRM contacts/companies and staff profiles with roles

Projects & quotations

Project lifecycle plus quote generation and approval paths

Workflows · instances · stages

Template designer, running instances, and pipeline stages

Timesheets & reports

Time logging and analytics dashboards for operations

API & integration highlights

  • Server Actions for form mutations across CRM, projects, and timesheets
  • Repository pattern isolating Prisma from UI and actions
  • NextAuth v5 session checks on dashboard and mutation paths
  • Seed scripts for realistic workflow/demo data

Challenges

  • Modeling workflows/instances/stages without a heavy external BPMN engine
  • Keeping RSC + Server Actions and TanStack Query caches consistent
  • Large Prisma schema maintainability across many ops modules
  • NextAuth v5 beta behavior while still shipping secure sessions

Impact

  • Single internal system for clients, projects, workflows, quotes, and time

  • Clear layered architecture (UI → actions → services → repositories → Prisma)

  • Dashboard modules that ops can grow without rewriting auth or data access

  • Aspire-local environment matching containerized Postgres

Architecture

Next.js 16 App Router (RSC + client)
Server Actions / API routes
Services + repositories
Prisma → PostgreSQL
NextAuth v5
.NET Aspire

Tech

React 19

Next.js 16

TypeScript

Tailwind CSS 4

Prisma 7

PostgreSQL

NextAuth.js v5

TanStack Query

TanStack Table

React Hook Form

Zod

Radix UI

.NET Aspire

Jest