React + Vite + TypeScript UI integrated with the Spring Boot backend.
Note: The backend is hosted on Render (free tier) and may take ~1–2 minutes to spin up on the first request. Once active, responses are fast.
- Node.js 18+
- pnpm
- Backend running at
http://localhost:8080
- Copy environment variables:
cp .env.example .env- Install dependencies:
pnpm install- Start development server:
pnpm dev- Base URL is configured via
VITE_API_BASE_URL. - Axios client is in
src/api/client.ts. - JWT token is persisted in
localStorageand attached via interceptor. - Auth, expenses, transactions, and admin APIs are in
src/api. - TanStack Query hooks are in
src/hooks. - Auth state helpers are in
src/store/authStore.ts.
- User routes require
USERrole and redirect to/dashboard. - Admin routes require
ADMINrole and redirect to/admin. - Authenticated users hitting
/loginor/registerare redirected by role.