This repository contains a small React + TypeScript app (Vite) used to track which houses have candy for Halloween.
The app is intentionally minimal and demonstrates:
- React + TypeScript with Vite
- Simple fetch-based API client (configured via env var)
- Small component structure (table + new address form)
Quick start
-
Install dependencies:
npm install
-
Start dev server:
npm run dev
-
Build for production:
npm run build
Environment variables
-
The app expects an environment variable named
VITE_API_BASE_URLpointing to the backend API base URL (e.g.http://localhost:3000/houses). Create a.envfile in the project root or export it in your shell. Example.env:VITE_API_BASE_URL=http://localhost:3000/houses
Project structure (important files)
src/api.ts— small API helper and CRUD callssrc/types.ts— shared TypeScript typessrc/App.tsx— main app componentsrc/components/HousesTable.tsx— list & actionssrc/components/NewAddress.tsx— form to add a house
Localization
- This repo includes a Hungarian translation of the README:
README.hu.md.
Contributing
- Improve docs, add tests, or introduce i18n if you want to support multiple languages in the UI.
License
- This project is private by default. Update
package.json/LICENSE as needed.
If you'd like, I can also add a minimal i18n wiring (react-intl or react-i18next) so UI strings can be switched between English and Hungarian at runtime.