Clean starter for React apps that talk to REST APIs.
- React 19 + TypeScript + Vite 8
- Tailwind CSS 4
- Redux Toolkit for app state
- TanStack Query for server state
- REST API client with JWT support
- i18n: English, Uzbek, and Russian
- Biome instead of ESLint and Prettier
- Lightweight UI animations with Motion
npm install
cp .env.example .env
npm run devApp runs on http://localhost:3000.
npm run dev # start dev server
npm run build # type-check and build
npm run check # Biome lint + format check
npm run check:write # auto-fix safe Biome issues
npm run audit # security audit.env:
VITE_API_URL=http://localhost:8080/api
VITE_AUTH_STRATEGY=bearer
VITE_REQUEST_TIMEOUT_MS=15000Auth endpoints expected by default:
POST /auth/loginGET /auth/mePOST /auth/refreshPOST /auth/logout
Todo example endpoints:
GET /todosPOST /todosPATCH /todos/:idDELETE /todos/:id
For production, prefer server-set httpOnly, Secure, SameSite cookies. If backend requires bearer JWTs, set VITE_AUTH_STRATEGY=bearer and frontend sends Authorization: Bearer <token>.
src/
components/ shared UI
config/ env config
features/ feature modules: auth, todos
layouts/ app layouts
locales/ i18n dictionaries
pages/ route pages
plugins/ i18n setup
services/ REST client and token storage
store/ Redux Toolkit store
- Create
src/features/<name>. - Add
types.tsandservice.ts. - Use
api.get/post/put/patch/deletefromsrc/services/http.ts. - Add page or components.
- Add translation keys in
en.json,uz.json, andru.json.
This boilerplate is REST-first. GraphQL packages and config are intentionally not included.