Skip to main content
@kneeraazon
Live ProductWeb Apps & SaaSCase Study

Built for Product Teams · Next.js · Supabase · next-auth · Groq

TexecN Task Board

An AI-assisted task manager built with Next.js and Supabase. A four-column Kanban board (Draft, 2Execute, Executing, Executed) with subtasks, a per-task timer, automation rules, team workspaces with owner, admin, member and viewer roles, a workspace chat with an @ai reply, AI helpers for capture and risk-spotting, and hooks into Slack, Discord and Notion. Free and Pro plans, e-mail and Google sign-in, and a daily reminder e-mail. The first version worked but had no tests and trusted its callers too much; this version fixes 17 security findings and is covered by 757 tests.

OUTCOME.01757Automated tests passing
OUTCOME.02262 / 262Seeded bugs caught by the tests (recorded)
OUTCOME.0317Security findings fixed (recorded)
2D SYSTEM TOPOLOGY // END-TO-END REQUEST PIPELINE4-STAGE DATA FLOW

Next.js App → Server Actions → Supabase DB → Groq Helpers

FIG.01 // INTERFACE & SYSTEM CAPTURE1 / 10
The board: a dark sidebar with the workspace, AI tools and actions, and four colour-coded columns, Draft, 2Execute, Executing and Executed, holding ten task cards with priority, due date, subtask counts, logged time and an assignee avatar.
The board: a dark sidebar with the workspace, AI tools and actions, and four colour-coded columns, Draft, 2Execute, Executing and Executed, holding ten task cards with priority, due date, subtask counts, logged time and an assignee avatar.

Role

Full-Stack Developer

Duration

Since April 2025

Tech Stack

Next.js 16 (App Router)React and TypeScriptTailwind CSSSupabase (PostgreSQL, Storage)next-authGroq (AI helpers)VitestESLintVercel
SECTION 01 // PROBLEM STATEMENT

The Problem

A task board that several people share has to be right about who may do what. The first version of TexecN worked and was in use, but it had no tests, its rate limiter lived in one process's memory (useless on serverless hosting), and its handlers used a database client that bypasses row-level security without always asking who was calling.

The review found 17 problems, among them a cron endpoint that accepted 'Bearer undefined' when no secret was set, password sign-in that revealed which accounts exist, verification and reset tokens stored in clear and reusable, a 'test integration' route that fetched any URL for any signed-in user, stored integration tokens sent back to the browser, signed download links for any attachment path, and viewers who could change tasks, timers, attachments and chat although they were documented as read-only.

SECTION 02 // SYSTEM ARCHITECTURE & EXECUTION

My Approach

  1. Rules in one place. Who may do what is decided in lib/task-access.ts and lib/permissions.ts, and every server action and route handler asks them, instead of trusting a workspace id, assignee or user id sent by the client.
  2. Sign-in. Uniform error messages, rate limits kept in Postgres with an in-memory fallback, hashed single-use verification and reset tokens, and Google sign-in no longer links to an unverified account.
  3. Outgoing calls. Every webhook and integration call goes through one URL check, tokens are not returned to the browser, uploads are checked for type and name, and database, storage and AI errors go to the log, not to the caller.
  4. Cron and proxy. The reminder endpoint refuses every request without a secret of at least 16 characters; the proxy treats an undecryptable session cookie as signed out and clears it.
  5. Tests. 757 tests run against an in-memory stand-in for Supabase, and the security-relevant modules were mutation-checked: 262 deliberate bugs were put back one at a time.
  6. Delivery. Dependencies on current releases, a versions file, five documentation chapters, CI, and SQL migrations kept in the repository (the four tables that had been created by hand are now written down in migration 09).
SECTION 03 // VERIFIED OUTCOMES

Results & Impact

Re-run on 2026-11-14 in a scratch copy: the type-check and lint report nothing, 757 tests in 23 files pass, the production build succeeds, and npm audit for production dependencies finds 0 vulnerabilities.

The real app was also run locally that day on PostgreSQL 18, with a small PostgREST-compatible server of my own in place of Supabase and a rule-based stand-in for Groq. All eleven migrations applied, including 10 and 11, which the repository's notes say had never been executed. A fictional user signed up, the verification link was printed to the server log because no mail credentials were set, the user signed in and found the app's own seeded demo board of ten tasks, a Free account was blocked from creating tasks, an admin changed the plan to Pro on the admin page, Quick Capture parsed a sentence into a task with subtasks, the Risk Scan flagged the task due in three days, the four seeded automation rules were listed, and a team chat message and an @ai reply were posted. Every AI answer is labelled Sample.

Recorded in the repository's work-done.md (2026-11-09): 262 of 262 mutations killed on a green baseline, 91.7% statement coverage of the targeted modules, and the 17 findings above fixed.

Not verified: a real Supabase project (Auth, Realtime and Storage), mail sending, Google sign-in, Slack, Discord and Notion, a real Groq model, file and avatar uploads, the reminder cron job, drag and drop, payments, and whether toexecutenow.com runs this branch.