@tkorakas/create-react-template
v0.1.2
Published
A reusable React + TypeScript template focused on practical app scaffolding: auth flows (including OAuth callback support), forms, table primitives, routing, and API integration.
Readme
React Template
A reusable React + TypeScript template focused on practical app scaffolding: auth flows (including OAuth callback support), forms, table primitives, routing, and API integration.
Tech stack
- Vite
- React 19
- TypeScript
- Chakra UI
- React Router
- TanStack Query
- React Hook Form + Zod
- Ky
- pnpm
Getting started
Create a new app from this template
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-appPrerequisites
- Node.js 20.19+ or 22.12+
- pnpm
Installation
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).
Mock API (Mockoon)
This template uses Mockoon instead of a custom Node mock server.
Setup
- Open Mockoon.
- Import
react-template-api.json. - Start the environment on port
3001.
Vite is configured to proxy /api/* to http://localhost:3001, so frontend requests work without CORS changes.
Included endpoints
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 notes
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.
Project structure
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)Scripts
pnpm run dev- start Vite dev serverpnpm run build- type-check and production buildpnpm run test:run- run tests oncepnpm run lint- run ESLint
Status highlights
- 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
