create-app-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/boilerplate/README.md +18 -0
- package/boilerplate/react-base/.env.example +1 -0
- package/boilerplate/react-base/README.md +3 -0
- package/boilerplate/react-base/components.json +19 -0
- package/boilerplate/react-base/eslint.config.js +32 -0
- package/boilerplate/react-base/index.html +12 -0
- package/boilerplate/react-base/package.json +71 -0
- package/boilerplate/react-base/postcss.config.js +6 -0
- package/boilerplate/react-base/prettier.config.js +6 -0
- package/boilerplate/react-base/src/api/axios.ts +20 -0
- package/boilerplate/react-base/src/app/store.ts +13 -0
- package/boilerplate/react-base/src/components/data-table.tsx +919 -0
- package/boilerplate/react-base/src/components/ui/accordion.tsx +44 -0
- package/boilerplate/react-base/src/components/ui/alert-dialog.tsx +105 -0
- package/boilerplate/react-base/src/components/ui/alert.tsx +40 -0
- package/boilerplate/react-base/src/components/ui/avatar.tsx +30 -0
- package/boilerplate/react-base/src/components/ui/badge.tsx +27 -0
- package/boilerplate/react-base/src/components/ui/bar-chart.tsx +76 -0
- package/boilerplate/react-base/src/components/ui/breadcrumb.tsx +87 -0
- package/boilerplate/react-base/src/components/ui/button.tsx +34 -0
- package/boilerplate/react-base/src/components/ui/calendar.tsx +63 -0
- package/boilerplate/react-base/src/components/ui/card.tsx +36 -0
- package/boilerplate/react-base/src/components/ui/chart.tsx +280 -0
- package/boilerplate/react-base/src/components/ui/checkbox.tsx +51 -0
- package/boilerplate/react-base/src/components/ui/context-menu.tsx +173 -0
- package/boilerplate/react-base/src/components/ui/date-picker.tsx +42 -0
- package/boilerplate/react-base/src/components/ui/dialog.tsx +87 -0
- package/boilerplate/react-base/src/components/ui/drawer.tsx +81 -0
- package/boilerplate/react-base/src/components/ui/dropdown-menu.tsx +81 -0
- package/boilerplate/react-base/src/components/ui/dropdown-types.ts +28 -0
- package/boilerplate/react-base/src/components/ui/field.tsx +194 -0
- package/boilerplate/react-base/src/components/ui/hover-card.tsx +26 -0
- package/boilerplate/react-base/src/components/ui/input-group.tsx +98 -0
- package/boilerplate/react-base/src/components/ui/input-otp.tsx +63 -0
- package/boilerplate/react-base/src/components/ui/input.tsx +12 -0
- package/boilerplate/react-base/src/components/ui/item.tsx +152 -0
- package/boilerplate/react-base/src/components/ui/kbd.tsx +13 -0
- package/boilerplate/react-base/src/components/ui/label.tsx +14 -0
- package/boilerplate/react-base/src/components/ui/line-chart.tsx +65 -0
- package/boilerplate/react-base/src/components/ui/menubar.tsx +217 -0
- package/boilerplate/react-base/src/components/ui/multi-select-dropdown.tsx +200 -0
- package/boilerplate/react-base/src/components/ui/navigation-menu.tsx +120 -0
- package/boilerplate/react-base/src/components/ui/pie-chart.tsx +87 -0
- package/boilerplate/react-base/src/components/ui/popover.tsx +29 -0
- package/boilerplate/react-base/src/components/ui/progress.tsx +19 -0
- package/boilerplate/react-base/src/components/ui/radio-group.tsx +36 -0
- package/boilerplate/react-base/src/components/ui/scroll-area.tsx +38 -0
- package/boilerplate/react-base/src/components/ui/searchable-dropdown.tsx +118 -0
- package/boilerplate/react-base/src/components/ui/select.tsx +140 -0
- package/boilerplate/react-base/src/components/ui/separator.tsx +20 -0
- package/boilerplate/react-base/src/components/ui/sheet.tsx +70 -0
- package/boilerplate/react-base/src/components/ui/sidebar.tsx +470 -0
- package/boilerplate/react-base/src/components/ui/skeleton.tsx +11 -0
- package/boilerplate/react-base/src/components/ui/slider.tsx +23 -0
- package/boilerplate/react-base/src/components/ui/sonner.tsx +21 -0
- package/boilerplate/react-base/src/components/ui/sparkline.tsx +38 -0
- package/boilerplate/react-base/src/components/ui/spinner.tsx +10 -0
- package/boilerplate/react-base/src/components/ui/switch.tsx +16 -0
- package/boilerplate/react-base/src/components/ui/table.tsx +80 -0
- package/boilerplate/react-base/src/components/ui/tabs.tsx +32 -0
- package/boilerplate/react-base/src/components/ui/textarea.tsx +12 -0
- package/boilerplate/react-base/src/components/ui/toggle-group.tsx +49 -0
- package/boilerplate/react-base/src/components/ui/toggle.tsx +33 -0
- package/boilerplate/react-base/src/components/ui/tooltip.tsx +23 -0
- package/boilerplate/react-base/src/components/ui/typography.tsx +76 -0
- package/boilerplate/react-base/src/config/constants.ts +3 -0
- package/boilerplate/react-base/src/config/theme.ts +432 -0
- package/boilerplate/react-base/src/config/user.ts +52 -0
- package/boilerplate/react-base/src/context/theme-provider.tsx +12 -0
- package/boilerplate/react-base/src/features/auth/authSlice.ts +19 -0
- package/boilerplate/react-base/src/hooks/index.ts +1 -0
- package/boilerplate/react-base/src/hooks/use-mobile.ts +17 -0
- package/boilerplate/react-base/src/lib/utils.ts +6 -0
- package/boilerplate/react-base/src/routes/index.tsx +7 -0
- package/boilerplate/react-base/src/styles/globals.css +15 -0
- package/boilerplate/react-base/src/vite-env.d.ts +31 -0
- package/boilerplate/react-base/tailwind.config.ts +75 -0
- package/boilerplate/react-base/tsconfig.app.json +20 -0
- package/boilerplate/react-base/tsconfig.json +7 -0
- package/boilerplate/react-base/tsconfig.node.json +16 -0
- package/boilerplate/react-base/vite.config.ts +12 -0
- package/dist/bin/index.js +8 -0
- package/dist/src/cli-args.js +52 -0
- package/dist/src/generator.js +85 -0
- package/dist/src/installer.js +7 -0
- package/dist/src/paths.js +61 -0
- package/dist/src/prompts.js +79 -0
- package/dist/src/replace-placeholders.js +22 -0
- package/dist/src/utils.js +16 -0
- package/package.json +63 -0
- package/templates/admin-portal/README.md +26 -0
- package/templates/admin-portal/src/App.tsx +85 -0
- package/templates/admin-portal/src/assets/auth-hero.jpg +0 -0
- package/templates/admin-portal/src/assets/brand-logo.png +0 -0
- package/templates/admin-portal/src/components/app-breadcrumb.tsx +41 -0
- package/templates/admin-portal/src/components/app-header.tsx +20 -0
- package/templates/admin-portal/src/components/app-sidebar.tsx +78 -0
- package/templates/admin-portal/src/components/auth-layout.tsx +66 -0
- package/templates/admin-portal/src/components/dashboard-metric-card.tsx +105 -0
- package/templates/admin-portal/src/components/data-table.tsx +919 -0
- package/templates/admin-portal/src/components/layout-shell.tsx +23 -0
- package/templates/admin-portal/src/components/notifications-sheet.tsx +91 -0
- package/templates/admin-portal/src/components/sidebar-nav.tsx +164 -0
- package/templates/admin-portal/src/components/user-avatar.tsx +26 -0
- package/templates/admin-portal/src/components/user-menu.tsx +163 -0
- package/templates/admin-portal/src/config/branding.ts +17 -0
- package/templates/admin-portal/src/config/chart-data.ts +44 -0
- package/templates/admin-portal/src/config/navigation.ts +42 -0
- package/templates/admin-portal/src/context/auth-context.tsx +32 -0
- package/templates/admin-portal/src/lib/breadcrumbs.ts +58 -0
- package/templates/admin-portal/src/main.tsx +18 -0
- package/templates/admin-portal/src/pages/components/demo-columns.tsx +170 -0
- package/templates/admin-portal/src/pages/components.tsx +1368 -0
- package/templates/admin-portal/src/pages/dashboard.tsx +143 -0
- package/templates/admin-portal/src/pages/login.tsx +81 -0
- package/templates/admin-portal/src/pages/settings/notifications.tsx +31 -0
- package/templates/admin-portal/src/pages/settings/profile.tsx +26 -0
- package/templates/admin-portal/src/pages/signup.tsx +81 -0
- package/templates/admin-portal/src/pages/users.tsx +12 -0
- package/templates/admin-portal/tsconfig.json +10 -0
- package/templates/blank/README.md +15 -0
- package/templates/blank/src/App.tsx +5 -0
- package/templates/blank/src/main.tsx +15 -0
- package/templates/blank/src/pages/home.tsx +20 -0
- package/templates/blank/tsconfig.json +10 -0
- package/templates/tsconfig.overlay.base.json +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Omobio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# create-app-ui
|
|
2
|
+
|
|
3
|
+
Enterprise React UI boilerplate generator. Ships shared boilerplate plus template overlays so generated apps are ready to run.
|
|
4
|
+
|
|
5
|
+
## Use with npx (after publish)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx create-app-ui@latest my-app
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Non-interactive:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx create-app-ui@latest my-app -y --template admin-portal --no-install
|
|
15
|
+
npx create-app-ui@latest my-app -y --template blank --no-install --no-git
|
|
16
|
+
npx create-app-ui@latest my-app -y --template admin-portal --git --company "Acme Inc"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Templates: `admin-portal`, `blank`.
|
|
20
|
+
|
|
21
|
+
Then:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd my-app
|
|
25
|
+
npm install
|
|
26
|
+
npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Monorepo development
|
|
30
|
+
|
|
31
|
+
From `ui-platform/create-app-ui`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install
|
|
35
|
+
npm run build
|
|
36
|
+
npm link
|
|
37
|
+
create-app-ui my-app
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or from `ui-platform` root:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run create
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## How generation works
|
|
47
|
+
|
|
48
|
+
1. **Boilerplate** — `boilerplate/react-base` (shared UI, theme, configs)
|
|
49
|
+
2. **Template overlay** — `templates/<template>` (admin-portal or blank)
|
|
50
|
+
3. Placeholder replacement and optional `npm install` / `git init`
|
|
51
|
+
|
|
52
|
+
In the monorepo, assets live under `ui-platform/`. The published npm package bundles copies of `boilerplate/` and `templates/` next to `dist/`.
|
|
53
|
+
|
|
54
|
+
## Publish to npm
|
|
55
|
+
|
|
56
|
+
Prerequisites: [npm account](https://www.npmjs.com/signup), unique package name (`create-app-ui` may already be taken — use a scoped name if needed, e.g. `@your-org/create-app-ui`).
|
|
57
|
+
|
|
58
|
+
1. Log in:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm login
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. Verify the tarball (includes CLI, boilerplate, templates):
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cd ui-platform/create-app-ui
|
|
68
|
+
npm run pack:check
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
3. Publish (first time or new version):
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm publish
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Scoped public package:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm publish --access public
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
4. Bump version for updates:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm version patch # or minor / major
|
|
87
|
+
npm publish
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Consumers then run:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx create-app-ui@latest my-app
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### If the package name is taken
|
|
97
|
+
|
|
98
|
+
Edit `package.json` `name` to e.g. `@omobio/create-app-ui`, then:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx @omobio/create-app-ui@latest my-app
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Add a new template
|
|
105
|
+
|
|
106
|
+
1. Add `../templates/<template-name>/` in the monorepo (overlay files only).
|
|
107
|
+
2. Register it in `src/prompts.ts` and `src/cli-args.ts`.
|
|
108
|
+
3. Rebuild and publish.
|
|
109
|
+
|
|
110
|
+
## Scripts
|
|
111
|
+
|
|
112
|
+
| Script | Description |
|
|
113
|
+
|--------|-------------|
|
|
114
|
+
| `npm run build` | Compile TypeScript to `dist/` |
|
|
115
|
+
| `npm run prepare-publish` | Copy boilerplate + templates into this package |
|
|
116
|
+
| `npm run pack:check` | Dry-run `npm pack` |
|
|
117
|
+
| `npm run start` | Run CLI via `tsx` (local dev) |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Shared React boilerplate
|
|
2
|
+
|
|
3
|
+
`react-base/` is copied into every generated app **before** a template overlay is applied.
|
|
4
|
+
|
|
5
|
+
## Included
|
|
6
|
+
|
|
7
|
+
- Vite + TypeScript + Tailwind + ESLint/Prettier
|
|
8
|
+
- `src/components/ui/*` — themed shadcn-style primitives
|
|
9
|
+
- `src/components/data-table.tsx` — TanStack table; icon-only toolbar inside table border (tooltips)
|
|
10
|
+
- `src/config/theme.ts` — single-file design system
|
|
11
|
+
- `src/api/axios.ts` — shared HTTP client
|
|
12
|
+
- `src/app/store.ts` — store bootstrap stub
|
|
13
|
+
- `src/features/auth/` — auth module stub
|
|
14
|
+
- `src/hooks/` — shared hooks
|
|
15
|
+
- `src/routes/` — route table stub
|
|
16
|
+
- `src/lib/`, `src/context/theme-provider.tsx`, `src/styles/`
|
|
17
|
+
|
|
18
|
+
Templates only add app-specific pages, layouts, navigation, and `App.tsx` / `main.tsx`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VITE_API_BASE_URL=http://localhost:3000/api
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "default",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "tailwind.config.ts",
|
|
8
|
+
"css": "src/styles/globals.css",
|
|
9
|
+
"baseColor": "slate",
|
|
10
|
+
"cssVariables": true
|
|
11
|
+
},
|
|
12
|
+
"aliases": {
|
|
13
|
+
"components": "@/components",
|
|
14
|
+
"utils": "@/lib/utils",
|
|
15
|
+
"ui": "@/components/ui",
|
|
16
|
+
"lib": "@/lib",
|
|
17
|
+
"hooks": "@/hooks"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
4
|
+
import reactRefresh from "eslint-plugin-react-refresh";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ["dist"] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ["**/*.{ts,tsx}"],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
"react-hooks": reactHooks,
|
|
18
|
+
"react-refresh": reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
"react-refresh/only-export-components": [
|
|
23
|
+
"warn",
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
"@typescript-eslint/no-unused-vars": [
|
|
27
|
+
"warn",
|
|
28
|
+
{ argsIgnorePattern: "^_" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>__APP_TITLE__</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-base-boilerplate",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"format": "prettier --write ."
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
15
|
+
"@radix-ui/react-alert-dialog": "^1.1.4",
|
|
16
|
+
"@radix-ui/react-avatar": "^1.1.1",
|
|
17
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
18
|
+
"@radix-ui/react-context-menu": "^2.2.4",
|
|
19
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
20
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
21
|
+
"@radix-ui/react-hover-card": "^1.1.4",
|
|
22
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
23
|
+
"@radix-ui/react-menubar": "^1.1.4",
|
|
24
|
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
|
25
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
26
|
+
"@radix-ui/react-progress": "^1.1.2",
|
|
27
|
+
"@radix-ui/react-radio-group": "^1.2.2",
|
|
28
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
29
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
30
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
31
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
32
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
33
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
34
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
35
|
+
"@radix-ui/react-toggle": "^1.1.1",
|
|
36
|
+
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
37
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
38
|
+
"@tanstack/react-table": "^8.20.6",
|
|
39
|
+
"axios": "^1.7.9",
|
|
40
|
+
"class-variance-authority": "^0.7.1",
|
|
41
|
+
"clsx": "^2.1.1",
|
|
42
|
+
"date-fns": "^3.6.0",
|
|
43
|
+
"input-otp": "^1.4.1",
|
|
44
|
+
"lucide-react": "^0.469.0",
|
|
45
|
+
"react": "^18.3.1",
|
|
46
|
+
"react-day-picker": "^8.10.1",
|
|
47
|
+
"react-dom": "^18.3.1",
|
|
48
|
+
"react-router-dom": "^6.28.1",
|
|
49
|
+
"recharts": "^3.8.1",
|
|
50
|
+
"sonner": "^1.7.1",
|
|
51
|
+
"tailwind-merge": "^2.5.4",
|
|
52
|
+
"vaul": "^1.1.2"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@eslint/js": "^9.17.0",
|
|
56
|
+
"@types/react": "^18.3.17",
|
|
57
|
+
"@types/react-dom": "^18.3.5",
|
|
58
|
+
"@vitejs/plugin-react-swc": "^3.7.2",
|
|
59
|
+
"autoprefixer": "^10.4.20",
|
|
60
|
+
"eslint": "^9.17.0",
|
|
61
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
62
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
63
|
+
"globals": "^15.14.0",
|
|
64
|
+
"postcss": "^8.4.49",
|
|
65
|
+
"prettier": "^3.4.2",
|
|
66
|
+
"tailwindcss": "^3.4.16",
|
|
67
|
+
"typescript": "^5.7.2",
|
|
68
|
+
"typescript-eslint": "^8.18.2",
|
|
69
|
+
"vite": "^6.0.5"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { APP_NAME } from "@/config/constants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared Axios instance — configure base URL and interceptors here.
|
|
6
|
+
* Set `VITE_API_BASE_URL` in `.env` for your backend.
|
|
7
|
+
*/
|
|
8
|
+
export const apiClient = axios.create({
|
|
9
|
+
baseURL: import.meta.env.VITE_API_BASE_URL ?? "/api",
|
|
10
|
+
timeout: 30_000,
|
|
11
|
+
headers: {
|
|
12
|
+
"Content-Type": "application/json",
|
|
13
|
+
"X-Client": APP_NAME,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
apiClient.interceptors.response.use(
|
|
18
|
+
(response) => response,
|
|
19
|
+
(error) => Promise.reject(error),
|
|
20
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application store setup.
|
|
3
|
+
* Wire Redux, Zustand, or another state library here.
|
|
4
|
+
*
|
|
5
|
+
* Example with Redux Toolkit:
|
|
6
|
+
* import { configureStore } from "@reduxjs/toolkit";
|
|
7
|
+
* import { authReducer } from "@/features/auth/authSlice";
|
|
8
|
+
* export const store = configureStore({ reducer: { auth: authReducer } });
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export type AppStore = Record<string, never>;
|
|
12
|
+
|
|
13
|
+
export const store: AppStore = {};
|