You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A mini proof-of-concept demonstrating a modern automated testing architecture using Playwright + TypeScript for a tenant repair request portal, built with React, Tailwind CSS, and an Express mock API.
🏗️ Architecture
┌────────────────────┐ ┌────────────────────┐
│ React Frontend │ POST /api/repair-requests │ Express Mock API │
│ (Vite + Tailwind)│ ──────────────────────────────────▶ │ (Node.js + TS) │
│ :3000 │ ◀────── 201 { ticketId } │ :4000 │
└────────────────────┘ └────────────────────┘
▲ ▲
│ │
└──────────────── Playwright Test Suite ────────────────────┘
(Page Object Model Pattern)
📦 Tech Stack
Layer
Technology
Frontend
React 18, Tailwind CSS 3, Vite 6, React Router 7
API
Express 4, uuid, in-memory store
Testing
Playwright 1.50, TypeScript 5.7
Runtime
Node.js 18+
✨ Features
Feature
Route
Description
New Request
/
Form with validation → submits → shows ticket ID
Ticket List
/tickets
Table view with priority/status badges
Ticket Detail
/tickets/:id
Full ticket info + assign worker dropdown
Workers
/workers
Add/delete maintenance workers by specialization
🚀 Quick Start
# 1. Install dependencies
npm install
# 2. Install Playwright browsers
npx playwright install chromium
# 3. Start the app (API + Frontend concurrently)
npm run dev
# 4. (Optional) Seed with sample data
npx tsx scripts/seed.ts
# Run all tests (headless) — auto-starts API + frontend
npm test# Run tests with Playwright UI (interactive mode)
npm run test:ui
# View the last HTML test report
npm run test:report
Note: The webServer config in playwright.config.ts automatically starts both the API and frontend servers before running tests. No manual server startup required.