← Back to Projects

Tactyqal Launchpad

Full Stack Developer · Live

Overview

A redesigned Next.js homepage and a secure, tested blog API for Tactyqal Labs, built for their Fullstack Developer Intern hire-a-thon. A responsive Next.js 16 + Tailwind 4 site keeps the original content and section order under a new design system, backed by an Express REST API on SQLite with CRUD, search, tags, pagination, drafts and an admin UI. Deployed on Vercel (site) and Render (API); the free-tier API sleeps when idle, so the first request can take around 50 seconds.

Key Highlights

  • ▹143 automated tests pass locally (45 API unit, edge, contract and fuzz; 7 frontend; 91 Playwright including axe WCAG A/AA, visual regression, API-down and icon-first audits); the repository README counts 162 with the live-site suites
  • ▹OpenAPI 3.1 contract enforced by tests; a seeded fuzzer fires 600 hostile requests per seed with zero 5xx responses
  • ▹Writes are closed by default — with no admin key every write returns 401, and open writes are refused in production
  • ▹Axe found and fixed 7 accessibility defects; visual-regression thresholds were mutation-checked

Tech Stack

Next.jsReact.jsTailwind CSSNode.jsExpress.jsSQLiteOpenAPIPlaywrightaxeVercelRender

Architecture

Next.js 16 server components on Vercel → REST + JSON → Express API on Render with closed-by-default writes → SQLite (posts, tags, post_tags). The API's OpenAPI 3.1 contract (docs/openapi.json) is enforced by tests, and Playwright, axe and fuzz suites gate both the site and the API.

Challenges & Solution

Free-tier hosting means the API can be asleep for up to about 50 seconds. Every server-side fetch has an 8-second timeout and reports "offline" instead of throwing; pages then show a friendly retry state that re-requests automatically (up to six times, every 9 seconds) before falling back to a manual button, and a second build of the site pointed at a dead API is part of the Playwright suite so that experience is tested.

Security was designed to fail closed: with no ADMIN_KEY every write returns 401, keys must be at least 24 characters and are compared in constant time, and open writes are refused when NODE_ENV is production. The contract, the 600-request seeded fuzzer and the accessibility and visual suites gate both the site and the API.

Performance Optimizations

Measured on the live site with a mobile profile (4× CPU, 4G; median of 5 cold-cache runs, 2026-11-24): LCP 1.1–1.4 s on the public pages (home 1.42 s, blog 1.38 s, post 1.08 s), CLS 0.000 and roughly 170 KB per page, about 140 KB of which is the React/Next framework. These replace the earlier 1.0–1.3 s and ~155 KB, which predate the icon-first UI (it added about 4–10 KB of HTML per page).

On the backend, deep pagination (page 400 of 5,000 posts, 10 concurrent clients, re-measured against the pre-fix commit) went from a p50 of about 3 s to about 43 ms, and from 3 to 170–230 requests per second, after indexing the sort order, dropping full-body reads from list queries and loading tags in the same query.

Lessons Learned

Performance numbers age. The original LCP and weight figures predated the icon-first UI, and a re-measure moved them. Two optimisations I expected to help (CSS-only tooltips instead of a hydrated component per icon, gradients instead of a blurred hero) showed no difference against run-to-run noise in 7–15 round paired tests, so they were not shipped; the framework's own JavaScript is most of every page. The repository's total-blocking-time budget (200 ms) is exceeded on the mobile profile (317–410 ms on public pages) and is documented as such.

Future Improvements

Rate limiting, API security headers and cover-image URL validation, GitHub Actions CI, idempotency keys, full-text search and a PostgreSQL migration — all listed as planned in the repository's project status.