@kevinmarrec/create-app 0.10.1 → 0.12.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.
@@ -1,15 +1,36 @@
1
1
  # Project Template
2
2
 
3
- A full-stack application template with a Vue.js frontend, Bun-based API backend, PostgreSQL database, and Docker Compose setup for local development.
3
+ A full-stack application template with Vue.js frontend, Bun-based API backend, and PostgreSQL database.
4
4
 
5
- ## Overview
6
-
7
- This template provides a modern full-stack application structure with:
5
+ ## Tech Stack
8
6
 
9
- - **Frontend (app)**: Vue 3 application with Vite, UnoCSS, TypeScript, and TanStack Query
10
- - **Backend (api)**: Bun-based API server with oRPC, Better Auth, and Drizzle ORM
11
- - **Database**: PostgreSQL with Drizzle migrations
12
- - **Infrastructure**: Docker Compose with Traefik reverse proxy, PostgreSQL, and Metabase
7
+ ### Core Stack
8
+
9
+ - [Bun](https://bun.sh/) as package manager & runtime
10
+ - [TypeScript](https://www.typescriptlang.org/) as the language
11
+ - [Vue 3](https://vuejs.org/) as frontend framework
12
+ - [Vite](https://vitejs.dev/) as build tool
13
+ - [Vite SSG](https://github.com/antfu-collective/vite-ssg) for static site generation
14
+ - [UnoCSS](https://unocss.dev/) for styling
15
+ - [TanStack Query](https://tanstack.com/query/latest) for data fetching
16
+ - [Unhead](https://unhead.unjs.io/) for head management
17
+ - [Vue I18n](https://github.com/kevinmarrec/vue-i18n) for internationalization
18
+ - [oRPC](https://orpc.dev/) for API layer
19
+ - [Better Auth](https://www.better-auth.com/) for authentication
20
+ - [Pino](https://getpino.io/) for logging
21
+ - [Drizzle ORM](https://orm.drizzle.team/) as SQL-first TypeScript ORM
22
+ - [Valibot](https://valibot.dev/) for validation
23
+ - [PostgreSQL](https://www.postgresql.org/) as database
24
+ - [Docker Compose](https://docs.docker.com/compose/) & [Traefik](https://traefik.io/) for infrastructure
25
+
26
+ ### Development Tools
27
+
28
+ - [ESLint](https://eslint.org/) & [Stylelint](https://stylelint.io/) for linting
29
+ - [Knip](https://knip.dev/) for detecting unused dependencies, exports, and files
30
+ - [Metabase](https://www.metabase.com/) for Business Intelligence (BI)
31
+ - [Drizzle Studio](https://gateway.drizzle.team/) for database management (web GUI)
32
+ - [Umami](https://umami.is/) for web analytics
33
+ - [Mailpit](https://mailpit.axllent.org/) for email testing
13
34
 
14
35
  ## Prerequisites
15
36
 
@@ -27,14 +48,18 @@ project/
27
48
  │ │ ├── auth/ # Authentication setup (Better Auth)
28
49
  │ │ ├── database/ # Database schema and migrations (Drizzle)
29
50
  │ │ ├── orpc/ # Router definitions (oRPC)
51
+ │ │ ├── utils/ # Utility functions (CORS, logger, etc.)
30
52
  │ │ ├── env.ts # Environment variable loading and validation (Valibot)
31
53
  │ │ └── main.ts # API entry point
32
54
  │ └── package.json
33
55
  ├── app/ # Frontend Vue application
56
+ │ ├── public/ # Public static assets
34
57
  │ ├── src/
35
58
  │ │ ├── components/ # Vue components
36
59
  │ │ ├── composables/ # Vue composables (auth, etc.)
37
60
  │ │ ├── lib/ # Library utilities (oRPC client)
61
+ │ │ ├── locales/ # Internationalization files (i18n)
62
+ │ │ ├── App.vue # Main Vue component
38
63
  │ │ └── main.ts # App entry point
39
64
  │ └── package.json
40
65
  ├── compose.yaml # Docker Compose configuration
@@ -51,60 +76,40 @@ bun install
51
76
 
52
77
  ### 2. Set Up Environment Variables
53
78
 
54
- > **Note**: If `.env.development` (API) or `.env` (App) files already exist in the template, you may skip this step. Otherwise, create them as described below.
55
-
56
- #### API Environment Variables
57
-
58
- Create a `.env.development` file in the `api/` directory with the following variables:
79
+ #### API (`api/.env.development`)
59
80
 
60
81
  ```bash
61
- # api/.env.development
82
+ ALLOWED_ORIGINS=https://app.dev.localhost
62
83
  AUTH_SECRET=your-secret-key-here
63
84
  DATABASE_URL=postgresql://user:password@postgres:5432/app
64
- ALLOWED_ORIGINS=https://app.dev.localhost
65
85
  LOG_LEVEL=info
66
86
  HOST=0.0.0.0
67
87
  PORT=4000
68
88
  ```
69
89
 
70
- **Required variables:**
71
-
72
- - `AUTH_SECRET` - Secret key for authentication encryption
73
- - `DATABASE_URL` - PostgreSQL connection string
74
-
75
- **Optional variables:**
76
-
77
- - `ALLOWED_ORIGINS` - Comma-separated list of allowed CORS origins (default: empty)
78
- - `LOG_LEVEL` - Logging level: `fatal`, `error`, `warn`, `info`, `debug`, `trace`, or `silent` (default: `info`)
79
- - `HOST` - Server host (default: `0.0.0.0`)
80
- - `PORT` - Server port (default: `4000`)
90
+ **Required:** `ALLOWED_ORIGINS`, `AUTH_SECRET`, `DATABASE_URL`
81
91
 
82
- #### App Environment Variables
92
+ **Optional:** `LOG_LEVEL` (default: `info`), `HOST` (default: `0.0.0.0`), `PORT` (default: `4000`)
83
93
 
84
- Create a `.env` file in the `app/` directory with the following variables:
94
+ #### App (`app/.env`)
85
95
 
86
96
  ```bash
87
- # app/.env
88
97
  VITE_API_URL=https://api.dev.localhost
98
+ VITE_ANALYTICS_URL=https://analytics.dev.localhost
99
+ VITE_ANALYTICS_WEBSITE_ID=your-website-id-here
89
100
  ```
90
101
 
91
- **Required variables:**
92
-
93
- - `VITE_API_URL` - API base URL for the frontend
102
+ **Required:** `VITE_API_URL`, `VITE_ANALYTICS_URL`, `VITE_ANALYTICS_WEBSITE_ID`
94
103
 
95
104
  ### 3. Set Up Local TLS Certificates
96
105
 
97
- To access the HTTPS URLs (`https://*.dev.localhost`), you need to set up trusted local TLS certificates using [mkcert](https://github.com/FiloSottile/mkcert).
98
-
99
- Check their [installation guide](https://github.com/FiloSottile/mkcert#installation) for detailed instructions on installing mkcert.
100
-
101
- Then, run the following command to generate the certificates:
106
+ Install [mkcert](https://github.com/FiloSottile/mkcert), then run:
102
107
 
103
108
  ```bash
104
109
  .docker/traefik/bin/install_cert
105
110
  ```
106
111
 
107
- This will generate the certificates in `.docker/traefik/certs/` and install the mkcert root CA into your system trust store.
112
+ This generates certificates in `.docker/traefik/certs/` and installs the root CA into your system trust store.
108
113
 
109
114
  > [!IMPORTANT]
110
115
  > If your system is running on WSL and you are using Firefox or Zen Browser, **you must import the mkcert root CA into your browser trust store.**
@@ -122,209 +127,103 @@ This will generate the certificates in `.docker/traefik/certs/` and install the
122
127
  > - Check **"Trust this CA to identify websites"**
123
128
  > - Click **OK**
124
129
 
125
- ### 4. Start Docker Services and Access the Application
126
-
127
- Start all services (Traefik, PostgreSQL, Metabase, API, and App):
130
+ ### 4. Start Services
128
131
 
129
132
  ```bash
130
- docker compose up -d
133
+ bun run dev up -d
131
134
  ```
132
135
 
133
- Once the services are running, you can access:
136
+ **Services:**
134
137
 
135
138
  - Frontend: https://app.dev.localhost
136
139
  - API: https://api.dev.localhost
137
- - Traefik Dashboard: https://traefik.dev.localhost
140
+ - Traefik: https://traefik.dev.localhost
138
141
  - Metabase: https://metabase.dev.localhost
142
+ - Drizzle Studio: https://studio.dev.localhost (password: `foobar`)
143
+ - Umami: https://analytics.dev.localhost
144
+ - Mailpit: https://mail.dev.localhost
139
145
 
140
- ### 5. Stopping Services
141
-
142
- To stop all Docker services:
143
-
144
- ```bash
145
- docker compose down
146
- ```
147
-
148
- To stop and remove volumes (⚠️ this will delete database data):
146
+ **Stop services:**
149
147
 
150
148
  ```bash
151
- docker compose down -v
149
+ bun run dev down # Stop services
150
+ bun run dev down -v # Stop and remove volumes (⚠️ deletes data)
152
151
  ```
153
152
 
154
- ## Development
155
-
156
- ### Running Services Locally (without Docker)
157
-
158
- You can also run the services locally without Docker. Note that you'll still need PostgreSQL running (either locally or via Docker).
153
+ ## Scripts
159
154
 
160
- #### API Server
155
+ **Root:**
161
156
 
162
- ```bash
163
- cd api
164
- bun run dev
165
- ```
166
-
167
- The API will run on `http://localhost:4000` (or the port specified in `PORT`).
157
+ - `bun run dev` - Docker Compose shortcut
158
+ - `bun run check` - Run all checks (lint, typecheck, unused deps)
159
+ - `bun run lint` - Run ESLint and Stylelint
160
+ - `bun run update` - Update dependencies
168
161
 
169
- #### Frontend App
162
+ **API (`cd api`):**
170
163
 
171
- ```bash
172
- cd app
173
- bun run dev
174
- ```
164
+ - `bun run dev` - Dev server (auto-migrations, hot reload)
165
+ - `bun run build` - Build production binary
166
+ - `bun run db:generate` - Generate migrations
167
+ - `bun run db:migrate` - Run migrations
175
168
 
176
- The app will run on `http://localhost:5173` (Vite default port).
169
+ **App (`cd app`):**
177
170
 
178
- ### Database Management
171
+ - `bun run dev` - Dev server (HMR)
172
+ - `bun run build` - Build for production
173
+ - `bun run build:analyze` - Build with bundle analyzer
174
+ - `bun run preview` - Preview production build
179
175
 
180
- #### Generate Migrations
176
+ ## Database Migrations
181
177
 
182
178
  After modifying the database schema in `api/src/database/schema/`, generate migrations:
183
179
 
184
180
  ```bash
185
- cd api
186
- bun run db:generate
181
+ cd api && bun run db:generate
187
182
  ```
188
183
 
189
- #### Run Migrations
190
-
191
184
  Migrations run automatically when starting the API in dev mode. To run manually:
192
185
 
193
186
  ```bash
194
- cd api
195
- bun run db:migrate
187
+ cd api && bun run db:migrate
196
188
  ```
197
189
 
198
- ## Available Scripts
199
-
200
- ### Root Level Scripts
201
-
202
- - `bun run check` - Run all checks (ESLint, Stylelint, unused dependencies, TypeScript)
203
- - `bun run lint` - Run linting (ESLint and Stylelint)
204
- - `bun run lint:inspect` - Open ESLint config inspector
205
- - `bun run update` - Update dependencies
206
-
207
- ### API Scripts (`cd api`)
190
+ ## Docker Services
208
191
 
209
- - `bun run dev` - Start development server with hot reload
210
- - `bun run build` - Build production binary
211
- - `bun run db:generate` - Generate database migrations
212
- - `bun run db:migrate` - Run database migrations
213
-
214
- ### App Scripts (`cd app`)
215
-
216
- - `bun run dev` - Start development server with HMR (Hot Module Replacement)
217
- - `bun run build` - Build for production (static site)
218
- - `bun run build:analyze` - Build with bundle analyzer
219
- - `bun run preview` - Preview production build
220
-
221
- ## Docker Compose Services
222
-
223
- ### Traefik
224
-
225
- Reverse proxy and load balancer that handles:
226
-
227
- - HTTPS termination
228
- - SSL certificate management (requires certificates in `.docker/traefik/certs/`)
229
- - Routing to services based on hostnames
230
- - Dashboard accessible at https://traefik.dev.localhost
231
-
232
- ### PostgreSQL
233
-
234
- Database service with:
235
-
236
- - Default database: `app`
237
- - Default user: `user`
238
- - Default password: `password`
239
- - Port: `5432`
240
- - Persistent volume: `postgres_data`
241
-
242
- ### Metabase
243
-
244
- Business intelligence tool for data visualization and analytics with:
245
-
246
- - Persistent volume: `metabase_data`
247
- - Accessible via Traefik at https://metabase.dev.localhost (runs on port `3000` internally)
248
-
249
- ### API
250
-
251
- Backend API service running Bun with:
192
+ - **Traefik** - Reverse proxy (HTTPS termination, routing)
193
+ - **PostgreSQL** - Database (`postgresql://user:password@postgres:5432/app`, port `5432`)
194
+ - **API** - Backend (`/health`, `/auth/*`, `/rpc/*`)
195
+ - **App** - Frontend (Vue + Vite)
196
+ - **Metabase** - BI tool
197
+ - **Drizzle Studio** - DB management (password: `foobar`)
198
+ - **Umami** - Analytics
199
+ - **Mailpit** - Email testing (REST API at `/api/v1/`)
252
200
 
253
- - Hot reload enabled
254
- - Automatic database migrations on startup
255
- - Health check endpoint: `/health`
256
- - Auth endpoints: `/auth/*`
257
- - RPC endpoints: `/rpc/*`
258
- - Accessible via Traefik at https://api.dev.localhost (runs on port `4000` internally)
201
+ ## Production Build
259
202
 
260
- ### App
261
-
262
- Frontend Vue application with:
263
-
264
- - Vite dev server
265
- - Hot module replacement
266
- - Accessible via Traefik at https://app.dev.localhost (runs on port `5173` internally)
267
-
268
- ## Environment Variables
269
-
270
- For detailed environment variable setup, see [Set Up Environment Variables](#2-set-up-environment-variables) in the Getting Started section.
271
-
272
- **Quick reference:**
273
-
274
- - **API** (`.env.development`): `AUTH_SECRET` (required), `DATABASE_URL` (required), `ALLOWED_ORIGINS`, `LOG_LEVEL`, `HOST`, `PORT`
275
- - **App** (`.env`): `VITE_API_URL` (required)
276
-
277
- ## Building for Production
278
-
279
- ### Build API
203
+ **API:**
280
204
 
281
205
  ```bash
282
- cd api
283
- bun run build
206
+ cd api && bun run build
284
207
  ```
285
208
 
286
- This creates a compiled binary at `api/dist/api`.
209
+ Output: `api/dist/api`
287
210
 
288
- ### Build App
211
+ **App:**
289
212
 
290
213
  ```bash
291
- cd app
292
- bun run build
214
+ cd app && bun run build
293
215
  ```
294
216
 
295
- This creates a static site in `app/dist/`.
217
+ Output: `app/dist/`
296
218
 
297
219
  ## Troubleshooting
298
220
 
299
- ### Port Already in Use
300
-
301
- If ports 80, 443, or 5432 are already in use, modify the port mappings in `compose.yaml`.
221
+ **Port conflicts:** Modify port mappings in `compose.yaml` if ports 80, 443, or 5432 are in use.
302
222
 
303
- ### SSL Certificate Warnings
223
+ **SSL warnings:** Complete [TLS setup](#3-set-up-local-tls-certificates). Without certificates, Traefik may fail to start.
304
224
 
305
- If you see SSL certificate warnings when accessing `https://*.dev.localhost` URLs, ensure you have completed the [Local TLS Setup](#3-set-up-local-tls-certificates) to generate trusted certificates using mkcert.
306
-
307
- **Note**: Without proper certificates, Traefik may fail to start or services may not be accessible via HTTPS.
308
-
309
- ### Service Logs
310
-
311
- To view logs for a specific service:
225
+ **View logs:**
312
226
 
313
227
  ```bash
314
- docker compose logs -f <service-name>
228
+ bun run dev logs -f <service-name> # e.g., api, app, traefik
315
229
  ```
316
-
317
- For example:
318
-
319
- - `docker compose logs -f api` - View API logs
320
- - `docker compose logs -f app` - View app logs
321
- - `docker compose logs -f traefik` - View Traefik logs
322
-
323
- ## Tech Stack
324
-
325
- - **Runtime**: Bun
326
- - **Language**: TypeScript
327
- - **Frontend**: Vue 3, Vite, UnoCSS, TanStack Query
328
- - **Backend**: Bun, oRPC, Better Auth, Drizzle ORM
329
- - **Database**: PostgreSQL
330
- - **Infrastructure**: Docker Compose, Traefik
@@ -0,0 +1,45 @@
1
+ # --- Stage 1: Dependency Installation & Caching (The Build Stage) ---
2
+
3
+ ARG TARGETARCH
4
+
5
+ # Use a bun-alpine image for a fast build environment
6
+ FROM oven/bun:1.3.3-slim AS build
7
+
8
+ # Set the working directory inside the container
9
+ WORKDIR /build
10
+
11
+ # 1. Copy necessary files for the cache layer
12
+ # IMPORTANT: The path to the root lock file is relative to the Docker build context.
13
+ # If you run 'docker build -f api/Dockerfile .', the context is the root (.).
14
+ # If you run 'docker build api', the context is api (and this approach fails).
15
+ # ASSUMPTION: You are running the build command from the root level.
16
+
17
+ # Copy workspace root files (This ensures the locked install)
18
+ COPY package.json bun.lock ./
19
+
20
+ # Copy service package.json files
21
+ COPY api/package.json ./api/package.json
22
+ COPY app/package.json ./app/package.json
23
+
24
+ # 2. Perform a frozen install
25
+ RUN bun install --filter api --frozen-lockfile
26
+
27
+ # Copy API source code
28
+ COPY api/ ./api/
29
+
30
+ # 3. Build the API
31
+ RUN bun --cwd api build --target bun-linux-$TARGETARCH-modern
32
+
33
+ # --- Stage 2: Final Image (The Runtime Stage) ---
34
+
35
+ # Use a minimal image for production (less attack surface, smaller size)
36
+ FROM debian:trixie-slim
37
+
38
+ # Copy the compiled binary from builder stage
39
+ COPY --from=build /build/api/dist/api /usr/local/bin/
40
+
41
+ # Expose port
42
+ EXPOSE 4000
43
+
44
+ # Run the binary
45
+ ENTRYPOINT ["/usr/local/bin/api"]
@@ -10,16 +10,18 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@libsql/client": "^0.15.15",
13
- "@orpc/server": "^1.11.2",
14
- "better-auth": "^1.3.34",
13
+ "@orpc/server": "^1.12.0",
14
+ "better-auth": "^1.4.3",
15
15
  "drizzle-orm": "^0.44.7",
16
16
  "pino": "^10.1.0",
17
- "valibot": "^1.1.0"
17
+ "valibot": "^1.2.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/bun": "^1.3.2",
20
+ "@kevinmarrec/tsconfig": "^1.5.8",
21
+ "@types/bun": "^1.3.3",
21
22
  "drizzle-kit": "^0.31.7",
22
23
  "pg": "^8.16.3",
23
- "pino-pretty": "^13.1.2"
24
+ "pino-pretty": "^13.1.2",
25
+ "typescript": "~5.9.3"
24
26
  }
25
27
  }
@@ -2,16 +2,29 @@ import * as v from 'valibot'
2
2
 
3
3
  const schema = v.object({
4
4
  auth: v.object({
5
- secret: v.string(),
5
+ secret: v.pipe(
6
+ v.string(),
7
+ v.nonEmpty(),
8
+ ),
6
9
  }),
7
10
  cors: v.object({
8
11
  allowedOrigins: v.pipe(
9
- v.optional(v.string(), ''),
12
+ v.string(),
13
+ v.nonEmpty(),
10
14
  v.transform(input => input.split(',').filter(Boolean)),
15
+ v.array(v.pipe(
16
+ v.string(),
17
+ v.trim(),
18
+ v.startsWith('https://'),
19
+ )),
11
20
  ),
12
21
  }),
13
22
  database: v.object({
14
- url: v.string(),
23
+ url: v.pipe(
24
+ v.string(),
25
+ v.nonEmpty(),
26
+ v.startsWith('postgresql://'),
27
+ ),
15
28
  }),
16
29
  log: v.object({
17
30
  level: v.optional(v.union([
@@ -28,8 +41,8 @@ const schema = v.object({
28
41
  host: v.optional(v.string(), '0.0.0.0'),
29
42
  port: v.pipe(
30
43
  v.optional(v.string(), '4000'),
31
- v.decimal(),
32
- v.transform(input => Number(input)),
44
+ v.digits(),
45
+ v.toNumber(),
33
46
  ),
34
47
  }),
35
48
  })
@@ -13,7 +13,7 @@ export function cors(handler: (req: Request) => Promise<Response>) {
13
13
  : await handler(req)
14
14
 
15
15
  if (req.method === 'OPTIONS') {
16
- response.headers.append('Access-Control-Allow-Headers', 'Content-Type')
16
+ response.headers.append('Access-Control-Allow-Headers', 'Content-Type, Authorization, User-Agent')
17
17
  response.headers.append('Access-Control-Allow-Methods', 'GET, HEAD, PUT, POST, DELETE, PATCH')
18
18
  response.headers.append('Access-Control-Max-Age', '7200') // 2 hours https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Max-Age
19
19
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../tsconfig.json",
2
+ "extends": "@kevinmarrec/tsconfig",
3
3
  "compilerOptions": {
4
4
  "lib": ["ESNext"]
5
5
  }
package/template/app/.env CHANGED
@@ -1 +1,3 @@
1
1
  VITE_API_URL=https://api.dev.localhost
2
+ VITE_ANALYTICS_URL=https://analytics.dev.localhost
3
+ VITE_ANALYTICS_WEBSITE_ID=bcb4bcfc-9f60-4dc1-8fd3-e522e3089c6f
@@ -6,6 +6,9 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="color-scheme" content="dark light" />
8
8
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
9
+ <link rel="preconnect" href="%VITE_API_URL%" crossorigin />
10
+ <link rel="dns-prefetch" href="%VITE_ANALYTICS_URL%" />
11
+ <script defer src="%VITE_ANALYTICS_URL%/script.js" data-website-id="%VITE_ANALYTICS_WEBSITE_ID%"></script>
9
12
  <title>Title</title>
10
13
  </head>
11
14
  <body class="font-sans">
@@ -10,26 +10,30 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@kevinmarrec/vue-i18n": "^1.1.3",
13
- "@orpc/client": "^1.11.2",
14
- "@orpc/tanstack-query": "1.11.2",
15
- "@tanstack/query-core": "^5.90.10",
16
- "@tanstack/vue-query": "^5.91.2",
13
+ "@orpc/client": "^1.12.0",
14
+ "@orpc/tanstack-query": "^1.12.0",
15
+ "@tanstack/query-core": "^5.90.11",
16
+ "@tanstack/vue-query": "^5.92.0",
17
17
  "@unhead/vue": "^2.0.19",
18
- "@vueuse/core": "^14.0.0",
19
- "better-auth": "^1.3.34",
20
- "unocss": "^66.5.6",
21
- "vue": "^3.5.24"
18
+ "@vueuse/core": "^14.1.0",
19
+ "better-auth": "^1.4.3",
20
+ "unocss": "^66.5.9",
21
+ "vue": "^3.5.25"
22
22
  },
23
23
  "devDependencies": {
24
- "@kevinmarrec/unocss-config": "^1.5.6",
24
+ "@kevinmarrec/tsconfig": "^1.5.8",
25
+ "@kevinmarrec/unocss-config": "^1.5.8",
25
26
  "@kevinmarrec/vite-plugin-dark-mode": "^1.1.2",
26
27
  "@modyfi/vite-plugin-yaml": "^1.1.1",
27
28
  "@unhead/addons": "^2.0.19",
28
- "@vitejs/plugin-vue": "^6.0.1",
29
+ "@vitejs/plugin-vue": "^6.0.2",
29
30
  "beasties": "^0.3.5",
30
31
  "rollup-plugin-visualizer": "^6.0.5",
31
- "vite": "^7.2.2",
32
- "vite-plugin-vue-devtools": "^8.0.3",
32
+ "typescript": "~5.9.3",
33
+ "valibot": "^1.2.0",
34
+ "vite": "^7.2.4",
35
+ "vite-plugin-valibot-env": "^1.0.1",
36
+ "vite-plugin-vue-devtools": "^8.0.5",
33
37
  "vite-ssg": "^28.2.2",
34
38
  "vite-tsconfig-paths": "^5.1.4"
35
39
  }
@@ -6,11 +6,6 @@ import { useAuth, useContent, useHead, useI18n } from '~/app/composables'
6
6
  const { t } = useI18n()
7
7
  useHead({
8
8
  title: () => t('title'),
9
- link: [{
10
- rel: 'preconnect',
11
- href: new URL(import.meta.env.VITE_API_URL).origin,
12
- crossorigin: '',
13
- }],
14
9
  })
15
10
 
16
11
  const { user, signIn, signUp, signOut } = useAuth()
@@ -1,8 +1,6 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
- interface ImportMetaEnv {
4
- readonly VITE_API_URL: string
5
- }
3
+ interface ImportMetaEnv extends ViteEnv {}
6
4
 
7
5
  interface ImportMeta {
8
6
  readonly env: ImportMetaEnv
@@ -1,6 +1,11 @@
1
1
  {
2
- "extends": "../tsconfig.json",
2
+ "extends": "@kevinmarrec/tsconfig",
3
3
  "compilerOptions": {
4
- "lib": ["ESNext", "DOM", "DOM.Iterable"]
5
- }
4
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
5
+ "paths": {
6
+ "~/api/*": ["../api/src/*"],
7
+ "~/app/*": ["./src/*"]
8
+ }
9
+ },
10
+ "exclude": ["**/dist/**"]
6
11
  }