Orlando, FL
Posts

Inside the Build: Application Tracker

September 19, 2025
This post summarizes what I actually implemented in the first release of my Application Tracker: the stack, architecture, access rules, UI/UX, and the trade-offs behind them. The last section lists what has shipped since. I also explain why I used both Server Actions and REST—each in their best-fit role—to showcase range without adding fluff.

What problem does it solve (real scenario)?

Most candidates juggle applications in spreadsheets or notes. That fails when volume rises:
  • Timelines drift from reality.
  • Follow-ups get lost.
  • There’s no quick view of pipeline health.
Application Tracker fixes that with:
  • Truthful timelines — lists and KPIs sort by user-entered dateApplied, not createdAt.
  • Clear statuses: Applied, In Process, Rejected keep the pipeline simple and auditable.
  • Recent activity — last-30-days snapshots and a dashboard you can actually act on.
  • Ownership & privacy: users only see their own data.

The stack I used

  • Frontend: Next.js 15.4.4 (App Router), React 19, TypeScript 5.7, Tailwind 4, Headless UI, Heroicons
  • Backend: Payload CMS 3.54.0 (@payloadcms/next) with Vercel Postgres
  • Validation: Zod 4 for schema-driven, typed I/O
  • Email: Resend (Payload email adapter) for forgot-password and transactional messages
  • Deployment: Vercel

Project structure (as shipped)

  • Source code under src/
  • Pages/UI under src/app/(frontend)/...
  • API routes under src/app/(frontend)/api/...
  • Dynamic app details endpoint: /api/apps/[id]
    ↳ Uses new URL(req.url).pathname (Next 15 strict param handling)

Implemented features & routes

  • Auth & session
    • Payload CMS auth with a login page and server action for signIn.
    • Already-signed-in redirect from login → /dashboard.
    • Client logout path and improved handler wiring.
  • Profile & password
    • Profile modal updates user info via /api/me.
    • Password update via /api/me/password.
  • Dashboard
    • KPIs: total applications, per-status counts, and recent (last 30 days).
    • Queries are implemented as Server Actions in a dedicated folder.
  • Applications table
    • Collapsible sections, fixed column grid (e.g., TABLE_GRID_TEMPLATE), alignment fixes.
    • Sorting by dateApplied (manual input) — not DB creation time.
  • Calendar
    • Calendar view integrated; fetch issues debugged and fixed during deployment parity tests.
  • Navigation & search
    • Sidebar active-tab highlighting fix.
    • SearchApps quick-search component in the dashboard nav.

Data model (intentionally “boring” and durable)

  • Users: firstName, lastName, email
  • Applications:
    owner (FK), companyName, jobTitle, salary, level, applicationLink,
    jobDescription, dateApplied, status in { Applied, In Process, Rejected }

Migrations & indexing

  • Added first_name, last_name to users.
  • Added owner_id FK to applications with an index (applications_owner_idx).
  • FK uses ON DELETE SET NULL with explicit access checks in code.
  • Migration order corrected to ensure constraint creation and index stability.

Access control (what’s enforced)

  • Owner isolation: users only read/write their own applications.
  • No administrator bypass: the first release let administrator addresses read, change, and delete any record; I later removed that bypass, so the same owner rule now applies to every account.
  • Rules live server-side (Payload access functions + Server Actions), not in the client.

Why I used both Server Actions and REST

I showcased both patterns where each is strongest:
  • Server Actions (used for dashboard reads, lists, and user-scoped mutations)
    • Inputs validated with Zod before any query runs.
    • Secrets and cookies never hit the client.
    • Deterministic outputs (normalized DTOs) so components render predictable shapes.
    • Fits React Server Components and keeps the client thin.
  • REST endpoints (used for stable, externalizable surfaces like /api/me, /api/me/password, and /api/apps/[id])
    • Provide a URL contract that’s easy to test, document, and extend.
    • Ideal seam for future consumers (mobile/CLI) and operational governance (rate limiting, API keys, docs).
    • Evolvable independent of the UI.
This isn’t duplication; it’s audience-aware separation of concerns. UI-tight flows use Server Actions; integration-oriented flows use REST.

UX choices that improve outcomes

  • dateApplied is the truth field for ordering — matches how candidates think and act.
  • Global search accelerates navigation for active pipelines.
  • Collapsible table sections reduce cognitive load on long lists.
  • Profile modal keeps account edits in flow; no jarring context switches.

Notes on reliability, testing, and deployment

  • Resend email configured for forgot-password and email-verification flows.
  • Local vs production parity: caught and fixed issues (e.g., calendar fetch behavior and login redirects) revealed only after deploy.
  • Error handling: server actions and API routes surface clear messages for invalid credentials and guarded routes.

What shipped since

Since this post, I have shipped:
  • Kanban board: drag-and-drop between ten statuses (Applied, Assessment, Phone Screen, Interview, Technical, Offer, Accepted, Rejected, Withdrawn, Ghosted), replacing the three-status list above.
  • Interview calendar and an analytics page with status and salary charts.
  • English and Spanish UI.
  • PWA: installable, with an offline page.
  • Web Push notifications with per-device subscriptions.
  • Optional AI assistant on the Anthropic API for cover letters, job match analysis, and interview prep (off by default).
  • File storage on Vercel Blob.
  • Tests and CI: Vitest and Playwright tests; GitHub Actions runs lint, type checks, Vitest tests, and a production build.

Takeaways

  • Much of the work is lining up the seams: typed Server Actions for private, UI-tight paths; REST where you want durability and externalization.
  • Pick and defend a truth field. Building everything around dateApplied made the UI coherent and avoided subtle data mismatches.
  • Keep models simple and honest. It makes migrations, access control, and UI code straightforward.
  • Put enforcement on the server. Clients are for interaction; servers are for rules.

If you’re building a similar app, start by defining your truth fields and server boundaries. Make those decisions explicit, keep them typed, and let your UI be the beneficiary—not the battleground.