A small React + Vite TypeScript app to view and manage subscriptions. This repository contains a compact UI for listing subscriptions and cancelling them locally (client-side demo). It's built with React, TypeScript and Tailwind CSS.
- List subscriptions
- Cancel subscriptions (client-side state change)
- Accessible-first components (semantic HTML, ARIA attributes)
- React 19 + TypeScript
- Vite for dev server and build
- Tailwind CSS for styling
- Vitest + Testing Library for tests
Prerequisites: Node.js (18+ recommended) and npm.
- Install dependencies
npm install- Run the dev server
npm run devThis starts the Vite dev server (default port 5173). Open http://localhost:5173 in your browser.
- Build for production
npm run build- Preview the production build
npm run previewnpm run dev— start Vite dev servernpm run build— compile TypeScript and build for productionnpm run preview— preview the production buildnpm run lint— run ESLintnpm run test— run unit tests (Vitest)
Unit tests use Vitest and Testing Library. Run:
npm run testThis project follows accessible-first patterns (semantic HTML, focus management, ARIA where appropriate). Recommended checks during development and CI:
- Run Lighthouse accessibility audit in DevTools.
- Manual testing with keyboard-only navigation and a screen reader (NVDA, VoiceOver).
src/components/SubscriptionCard.tsx— card UI for a single subscriptionsrc/components/SubscriptionsList.tsx— list and page wrappersrc/api/fetchSubscriptions.ts— data fetching (mockable)src/utils/formatDate.ts— date formatting helper
- If the dev server doesn't start, check for port conflicts or run with
--port <n>. - For TypeScript errors, run
npx tsc --noEmitto inspect issues.