Commit 58159b9
authored
feat(kysely): add kysely to starter-kit (#517)
## Summary
- Add Kysely integration with Prisma for type-safe raw SQL queries
- Add prisma-kysely generator to auto-generate Kysely types from Prisma schema
- Add prisma-zod-generator for Zod schema generation
- this has been configured with the `minimal` set up so it generates crud and abit more on top
- it's also possible to just generate model typings but i thought since most apps will be crud anyway for db, might as well just shove this in
- Configure prisma-extension-kysely for seamless Prisma + Kysely usage
- Move dependencies to pnpm catalog for centralized version management
## Changes
### New Dependencies
- `kysely` - Type-safe SQL query builder
- `prisma-extension-kysely` - Prisma extension for Kysely integration
- `prisma-kysely` - Generator for Kysely types from Prisma schema
- `prisma-zod-generator` - Generator for Zod schemas from Prisma schema
### Configuration
- Updated Prisma schema with Kysely and Zod generators
- Reorganized generated output to `src/generated/prisma`, `src/generated/kysely`, and `src/generated/zod`
- Added `prisma-extension-kysely` and `prisma-kysely` to pnpm catalog
## Test plan
- [ ] Run `pnpm prisma generate` to verify all generators work correctly
- [ ] Verify Kysely types are generated in `packages/db/src/generated/kysely`
- [ ] Verify Zod schemas are generated in `packages/db/src/generated/zod`
- [ ] Test Kysely queries with the Prisma extension
- [ ] Ensure existing Prisma client usage still works1 parent 7225059 commit 58159b9
File tree
15 files changed
+1369
-19
lines changed- apps/web
- src/server/modules/auth
- packages/db
- prisma
- src
15 files changed
+1369
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | | - | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
0 commit comments