Alejo Castillo

Full-stack Developer

Front-end focused, fast shipping, clean UX.

I design and build full-stack apps with auth, resilient APIs, E2E-tested flows, and UX that holds up in production.

Projects

AI Story Generator main page

AI Story Generator

Problem: Streaming RAG story generator with agents, guardrails, and evals.

Stack: Vercel AI SDK · pgvector · Neon · TypeScript

Read more
Mini Ecommerce main page

Fake E-commerce

Problem: Auth-aware storefront with resilient APIs and CI-backed checkout.

Stack: Next.js · Clerk · TypeScript · Playwright

Read more
Mini Job Board main page

Mini Job Board

Problem: Vanilla job board with testable filters and shareable URL state.

Stack: HTML · CSS · Vanilla JS · Playwright

Read more
Saravá Espacio Cultural site

Saravá — Espacio Cultural

Problem: Zero-cost cultural hub for live radio and community archival.

Stack: Next.js · TypeScript · GitHub Pages

Read more
Code Quest world map hub with XP stats and quest nodes

Interactive companion

Code Quest

Purpose: Play the architecture tradeoffs behind my featured repos.

Stack: Vanilla JS · GitHub Pages · i18n

Alejo Castillo profile photo

La Plata, Buenos Aires, Argentina

About Me

I build end-to-end web products with the depth junior portfolios usually skip: authentication, resilient API layers, observability hooks, and automated tests in CI. I ship fast, but I also ship things that survive real usage.

  • Full-stack focus — Next.js, React, TypeScript, Node.js, and serverless APIs with real auth and checkout flows.
  • Production habits — HTTP resilience, Sentry, Playwright E2E, and GitHub Actions CI on featured projects.
  • UX that holds up — loading states, error boundaries, and flows that work when APIs fail—not just on the happy path.

Focus: product UI, auth-aware flows, and CI-backed quality.

Skills

Frontend

  • React
  • Next.js
  • TypeScript
  • Tailwind CSS
  • SSG/ISR
  • Context API
  • Custom hooks
  • Error Boundaries
  • JavaScript

Backend & Auth

  • Node.js
  • REST
  • GraphQL
  • Clerk
  • Serverless
  • Redis
  • Neon pgvector
  • Vercel AI SDK
  • WebSockets

Reliability & State

  • HTTP resilience
  • State management
  • Loading/error UI
  • Sentry

Testing & Delivery

  • Vitest
  • Testing Library
  • Playwright
  • GitHub Actions
  • Vercel
  • GitHub Pages
  • Engineering docs

Engineering Practices

How I ship: tests at every layer, CI on every push, auth and secrets treated seriously, and observability plus docs so the next person (or future me) isn't guessing.

Testing

  • Vitest unit tests on pure logic and React components
  • CartContext integration tests on checkout flows
  • Playwright E2E across all four featured repos

CI / Delivery

  • GitHub Actions: lint, type-check, test, build on every PR
  • Vercel previews + production; GitHub Pages for static sites

Auth & Security

  • Clerk OIDC sign-in with session-aware middleware
  • Protected routes and per-user order scoping
  • Secrets hygiene: .env.example, gitignored keys, no creds in client bundles

Observability & Docs

  • Sentry, structured logger.ts, and React error boundaries
  • Definition of Done and PR templates in repo docs

Verify CI locally

Every featured repo ships a GitHub Actions workflow (lint, tests, build, and Playwright E2E) that runs on every push and pull request. You can also run the exact same pipeline locally with the steps below.

  1. Clone a featured repo, then npm ci.
  2. Run npm run ci for the core pipeline (same steps as CI minus E2E).
  3. Run npx playwright install chromium once, then npm run ci:full to include E2E—or npm run test:e2e after npm run ci.
  • mini-ecommercelint, type-check, Vitest, production build
  • mini-job-boardJS syntax, JSON schema validation, filter unit tests
  • ia-storiestypecheck, Vitest (64 tests), .env.example validation; E2E in ci:full

Workflow files live in .github/workflows/ci.yml in each repo; READMEs repeat these commands for reviewers.

Open Source

Contributing to vercel/ai — improving v6 tool error handling docs (draft PR #16869).

Roadmap

What I'm building next — completed items link to the proof on GitHub.

Phase 1Completed

Phase 1.1

  • mini-job-board — README case study + CI + validation checks
  • mini-ecommerce — README case study + CI (lint, type-check, test, build)
  • ia-stories — README case study + CI + env/syntax/test checks

Phase 1.2

  • mini-job-board — filter/sort unit tests + CI test stage
  • mini-ecommerce — cart unit tests + CartContext integration + CI
  • ia-stories — API helper + handler tests
  • E2E happy path on all 3 featured projects
  • mini-job-board — Playwright E2E
  • ia-stories — Playwright E2E generate flow

Phase 1.3

  • Resilient HTTP client (http-client, AppError, ApiState, tests)
  • Clerk auth — protected routes, per-user orders, admin demo
  • Next.js rendering — SSG/ISR catalog + PDP
  • Custom hooks — useDebouncedValue, useAsyncResource, useApiMutation
  • Observability — Sentry, error boundaries, structured logging
  • Engineering docs — DoD, testing strategy, PR template
  • Playwright checkout E2E in GitHub Actions
  • Auth E2E — middleware redirect + public sign-in/up pages
  • Input validation hardening on all public API routes
  • Lighthouse + accessibility pass (a11y 100 on key pages)
  • Vercel — Clerk env vars on Preview + Production

Phase 1.3.1

  • Client HTTP resilience (http.js) + tests + README troubleshooting

Phase 1.4

  • GitHub Actions billing — substitute local CI + README badges
  • CI badges in all featured repo READMEs
  • mini-job-board — local CI + Pages badges + billing note
  • sarava — local CI + Pages badges + CI commands in README
  • Repo hygiene — MIT LICENSE + homepage + topics (all 5 repos)
  • Screenshot compression — WebP <100KB across featured repos
  • Legacy PNG cleanup after WebP conversion
  • ia-stories — API rate limiting + input validation + safe 500s

Phase 1.4.1

  • portfolio — hero CSS fix + Space Grotesk + basic SEO + favicon
  • mini-job-board — wire filter-logic.mjs + URL race fix + escapeHtml
  • mini-job-board — MIT LICENSE + package.json metadata
  • sarava — missing image assets + automated docs/ deploy
  • sarava — MIT LICENSE + package.json metadata

Phase 1.4.2

  • mini-ecommerce — server-side order totals + Redis persistence
  • mini-ecommerce — protect /favorites + static assets (og-image, products)
  • portfolio — Saravá case-study card parity (i18n + bullets)
  • portfolio — profile image me.webp (~24 KB)

Phase 1.4.3

  • mini-ecommerce — delete dead code (cart.ts, products.ts, navbar.tsx)
  • ia-stories — multi-turn story continuation in UI
  • ia-stories — E2E fallback path (mock 402)
  • ia-stories — expand check:syntax to all frontend modules
  • sarava — per-page SEO (generateMetadata)
  • sarava — README Decap CMS / public/admin cleanup
  • sarava — UI refactor (dynamic hero, archive components)
  • mini-job-board — saved-jobs apply flow parity
  • mini-job-board — document Playwright E2E in README

Phase 1.5

  • Ecommerce case-study bullets on project card
  • How I use AI in development section
  • Job-board + ia-stories case-study bullets + Engineering Practices
  • About Me + resume CTA (EN/ES) + Verify CI locally panel
  • Fresh project card screenshots
  • Project card WebP compression
Phase 2Completed

Phase 2.1

  • Prisma schema + order-store adapter
  • Neon Postgres on Vercel + live checkout verified
  • Fix duplicate order creation on checkout success
  • README — Redis cart vs Postgres orders persistence
  • Fix Docker Compose WebSocket URL for local dev
  • Legacy Redis → Postgres order backfill + stale-key cleanup script

Phase 2.2

  • Case study page (mini-ecommerce) with Postgres migration story
  • Case study page (mini-job-board) — filter module, URL state, vanilla depth
  • Case study page (ia-stories) — AI orchestration, fallback, rate limiting
  • Case study page (sarava) — static export, dynamic [slug] routes, Zod content pipeline
  • Card “Read more” links to dedicated pages
  • Portfolio link checker in CI
  • Page polish — close mobile nav on anchor click + i18n copy-email feedback
  • Page checks in GitHub Actions (html-validate + linkinator on push)
  • Fix check-pages CI — bump Node 20 → 22 for html-validate fs.globSync
  • Shared layout — generate <head>/header/footer from one source (build-layout.mjs)

Phase 2.3

  • Individual post pages (`/espacio-cultural/[slug]`)
  • Content validation script in CI
  • Compress club-lectura-las-indignas image → WebP (425 KB → 24 KB)
  • Move about-content.ts → content/about.json (Zod-validated content pipeline)
  • Hero a11y (prefers-reduced-motion) + dead code cleanup

Phase 2.4

  • Saved-jobs page E2E (save → navigate → apply)
  • Error UI when jobs.json fetch fails
  • Extract shared utils (escapeHtml, slugify, URL helpers) into one module

Phase 2.5

  • De-flake checkout E2E + harden order flow (retry 5xx, safe auth, error logging)

Phase 2.5.1

  • Require passing CI status checks before merge on all 4 featured repos
  • Vercel preview deployments on PRs (mini-ecommerce + ia-stories)

Phase 2.6

  • API route integration tests (checkout + orders, REST + GraphQL)
  • Client bundle split — dynamic import of Clerk + Sentry

Phase 2.6.1

  • Use normalizeApiError() for granular fallback messages (remove dead code)
  • CSP + security headers on Vercel (vercel.json)
  • Rename package historia-minima → ai-stories

Phase 2.7

  • 1 merged PR in a public JS/TS repo
  • Open Source section on portfolio
Phase 3Completed

Phase 3.0

  • Portfolio copy pass — reframe ia-stories toward AI engineering
  • Tailwind keyword + UI refresh on ia-stories

Phase 3.1

  • TypeScript migration — make ia-stories TS end-to-end
  • Add Vercel AI SDK + provider abstraction
  • Stream generation — streamText / streamObject
  • Zod structured output — story turn schema
  • Provider abstraction seam for tests (createHandler)
  • Update API + fallback tests for new stack
  • Free-tier provider swap — Groq (llama-3.3-70b-versatile) replaces Replicate
  • Story history UX — per-item delete + clear all (localStorage)

Phase 3.2

  • Provision pgvector on Neon DB branch
  • Pick a finite corpus (story-craft references / world bible)
  • Ingestion script — chunk → embed → upsert documents
  • Retrieval — top-k cosine query, inject context, cite sources
  • Vercel production env — DATABASE_URL + AI provider vars for live RAG

Phase 3.3

  • Output validation against Zod schema — refuse/repair on invalid
  • Prompt-injection defense — sanitize retrieved + user content

Phase 3.4

  • Golden set — 10 input/expected pairs
  • Graders — deterministic checks + optional LLM-as-judge
  • CI regression gate — npm run eval fails on score regression
  • Observability — AI SDK telemetry or LangFuse (prompts, tokens, latency, cost)

Phase 3.5

  • Portfolio case study — RAG diagram, streaming, guardrails, eval harness
  • README + architecture doc — RAG pipeline, eval methodology, safety model

Phase 3.6

  • Server Action — syncCartAction for cart persistence (cart-store + docs)

Phase 3.7

  • Pick a target — vercel/ai, colinhacks/zod, or pgvector tooling
  • 1 meaningful merged PR (bug fix / test / docs gap)
  • Portfolio Open Source section — draft PR #16869 linked
Phase 4In progress

Phase 4.1

  • Order idempotency — Idempotency-Key on POST /api/orders
  • Stripe Checkout test mode — webhook → Prisma order
  • Audit bumps — Next.js + AI SDK security patches

Phase 4.2

  • 1 meaningful merged PR — vercel/ai #16869

Phase 4.3

  • Scroll progress bar — contiguous unique pastels per section (GSAP scrub)

How I use AI in development

I use AI tools to accelerate scaffolding, ideation, and refactoring—not to skip thinking. Every change still goes through the same bar I'd use on any team: tests, type-checks, and manual review before it ships.

  • Development workflow — Draft boilerplate, explore refactors, and speed up docs; I review and edit everything before merge.
  • Product integration — Evolving AI Story Generator from an LLM wrapper into streaming + RAG on Neon pgvector, with Zod guardrails, eval graders, and a deterministic fallback when providers fail.
  • Quality guardrails — CI (lint, type-check, tests, E2E where it matters) catches regressions whether code came from me or an assistant.
  • Ownership — I own architecture choices, error handling, and production readiness—not the tool.

Contact

Open to full-time roles, contract work, and collaborations. Email is the fastest way to reach me.

alejoworkstuff@gmail.com