PROJECT / 2025
Oversee
Ops & AI Dashboard
Multi-tenant workshop management platform with role-based access, an AI assistant that can parse Excel files and manage reports through tool-calling, and Swedish-first analytics dashboards.
- stack
- TypeScript · Next.js 16 · React 19 · Tailwind CSS · Supabase · shadcn/ui · TanStack Table · TanStack Query · Vercel AI SDK · Z.AI GLM-4.7 · Zod · react-hook-form · Recharts · MDX · Framer Motion · Firecrawl · Vitest · Playwright
How it works
Excel files
uploaded reportsassistant
GLM with tool callingSupabase
scoped per org and roledashboards
analytics in Swedish
01 / Overview
Workshop management system where organizations track vehicle repairs, assign technicians, and monitor performance. Users create reports with registration numbers, problem descriptions, categories, and time tracking. An org-scoped AI assistant powered by Z.AI GLM-4.7 handles multi-step workflows — parsing Excel uploads into reports, querying the database, generating charts, and bulk-updating records — with human-in-the-loop approval before any destructive action. The whole interface is Swedish-first, built for field teams who may not be familiar with AI tools.
02 / Key features
- –Role-based multi-tenancy: owners, admins, members, and technicians each see different data and controls, enforced by Supabase RLS
- –AI assistant with 20+ tools for database queries, report CRUD, Excel parsing, chart generation, analytics, and web search — all scoped to the active organization
- –Human-in-the-loop approval dialogs before the AI creates, updates, or deletes reports
- –Report management with registration numbers, categories, technician assignment, time tracking, and bulk operations via drag-reorderable data tables
- –Dashboard analytics: KPI cards, daily/weekly/monthly trend charts, category distribution, technician performance bars, and top reported issues, plus SLA, flow, WIP, and insurance analytics for vehicle cases
- –Vehicle case tracking (Bilkollen) with funding source, insurance status, inline editing, a change log, and an archive, alongside repair reports
- –Realtime in-app messaging with direct and group conversations, built on Supabase Realtime
- –Invitation system with join requests, org creation flow, and onboarding for new users
03 / Challenges
- –Z.AI's GLM-4.7 only supports Chat API, rejects system role messages, and doesn't handle images — so the integration needed workarounds for message formatting and graceful degradation when users attach files
- –Multi-step AI workflows like Excel import (fetch technician names → category names → parse → create reports) had to fit in the agent's five-step limit and keep context without blowing up the token budget
- –Technicians should only see their own reports while admins see everything — getting RLS policies right for that asymmetry across all query paths took careful testing
- –Base64 images from screenshots can exceed Vercel's request size limit, so the client compresses them iteratively before sending
04 / Solution
System prompt gets prepended to the first user message to work around GLM's missing system role. AI tools use names_only flags and pagination to keep token usage low during multi-step operations. RLS policies enforce org + role scoping at the database level, and server actions validate membership before any mutation. Client-side Canvas API compression shrinks image payloads with iterative quality reduction. Rate limiting (60 chat requests/hour per user per org) prevents abuse without blocking normal usage.
05 / Outcome
Deployed on Vercel behind a login. Beyond the KPI dashboard it covers repair reports, vehicle cases, messaging and onboarding, and the AI assistant turns an uploaded Excel export into structured reports once a user approves them.