A reusable React + TypeScript template focused on practical app scaffolding: auth flows (including OAuth callback support), forms, table primitives, routing, and API integration.
- Vite
- React 19
- TypeScript
- Chakra UI
- React Router
- TanStack Query
- React Hook Form + Zod
- Ky
- pnpm
Use the published CLI:
npx @tkorakas/create-react-template my-appThen run your new project:
cd my-app
pnpm install
pnpm run devIf your network or registry cache is stale, you can use a GitHub fallback:
npx github:tkorakas/react-template my-app- Node.js 20.19+ or 22.12+
- pnpm
This section is for developing this repository itself.
pnpm install
cp .env.dist .env
pnpm run devIn another terminal, run your API mock with Mockoon (see next section).
This template uses Mockoon instead of a custom Node mock server.
- Open Mockoon.
- Import
mocks/api.mockoon.json. - Start the environment on port
3001.
Vite is configured to proxy /api/* to http://localhost:3001, so frontend requests work without CORS changes.
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/verify-mfaGET /api/auth/mePOST /api/auth/logoutGET /api/auth/oauth/:provider/authorizePOST /api/auth/oauth/:provider/callbackGET /api/team-membersPOST /api/team-members
OAuth UI flow is kept in the template.
- Login/Register pages include the OAuth button.
- Callback route is
/oauth/:provider/callback. - In Mockoon, the authorize endpoint returns a local callback URL with a mock code.
For real OAuth provider integration, replace mock endpoints with your backend implementation.
src/
common/
ui/ # Shared UI primitives
data/
display/
feedback/
form/
form-fields/
layout/
features/ # Feature pages and handlers
ui/ # Reserved for project-specific UI surface (.gitkeep)
pnpm run dev- start Vite dev serverpnpm run build- type-check and production buildpnpm run test:run- run tests oncepnpm run lint- run ESLint
- Auth flow (email/password + MFA + OAuth callback route)
- Registration and login forms with validation
- Shared table with sorting/filtering hooks
- Team members demo (list/create)
- i18n setup