@hachej/boring-core 0.1.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/CoreFront-CDeLdfb0.d.ts +19 -0
  4. package/dist/app/front/index.d.ts +18 -0
  5. package/dist/app/front/index.js +162 -0
  6. package/dist/app/front/styles.css +6 -0
  7. package/dist/app/server/index.d.ts +96 -0
  8. package/dist/app/server/index.js +507 -0
  9. package/dist/app/vite/index.d.ts +10 -0
  10. package/dist/app/vite/index.js +33 -0
  11. package/dist/authHook-vsRhOvnh.d.ts +38 -0
  12. package/dist/chunk-CZ4HIXII.js +2869 -0
  13. package/dist/chunk-H5KU6R6Y.js +68 -0
  14. package/dist/chunk-HSRBZLKT.js +1684 -0
  15. package/dist/chunk-HYNKZSTF.js +18 -0
  16. package/dist/chunk-MLKGABMK.js +9 -0
  17. package/dist/chunk-VTOS4C7B.js +3443 -0
  18. package/dist/connection-CE7z-wBp.d.ts +145 -0
  19. package/dist/front/index.d.ts +458 -0
  20. package/dist/front/index.js +126 -0
  21. package/dist/front/theme.css +168 -0
  22. package/dist/front/top-bar-slot.d.ts +10 -0
  23. package/dist/front/top-bar-slot.js +9 -0
  24. package/dist/index-COZa03RP.d.ts +266 -0
  25. package/dist/migrate-D49JsATX.d.ts +8 -0
  26. package/dist/server/db/index.d.ts +209 -0
  27. package/dist/server/db/index.js +18 -0
  28. package/dist/server/index.d.ts +395 -0
  29. package/dist/server/index.js +136 -0
  30. package/dist/shared/index.d.ts +1 -0
  31. package/dist/shared/index.js +13 -0
  32. package/drizzle/.gitkeep +0 -0
  33. package/drizzle/0000_easy_meggan.sql +53 -0
  34. package/drizzle/0001_groovy_smiling_tiger.sql +14 -0
  35. package/drizzle/0002_busy_iron_man.sql +16 -0
  36. package/drizzle/0003_aspiring_richard_fisk.sql +12 -0
  37. package/drizzle/0004_heavy_lenny_balinger.sql +9 -0
  38. package/drizzle/0005_flimsy_mastermind.sql +17 -0
  39. package/drizzle/0006_happy_callisto.sql +13 -0
  40. package/drizzle/0007_v7_substrate.sql +54 -0
  41. package/drizzle/0008_workspace_sandbox_handles.sql +32 -0
  42. package/drizzle/0009_workspace_runtime_resources.sql +39 -0
  43. package/drizzle/meta/0000_snapshot.json +380 -0
  44. package/drizzle/meta/0001_snapshot.json +471 -0
  45. package/drizzle/meta/0002_snapshot.json +599 -0
  46. package/drizzle/meta/0003_snapshot.json +693 -0
  47. package/drizzle/meta/0004_snapshot.json +753 -0
  48. package/drizzle/meta/0005_snapshot.json +886 -0
  49. package/drizzle/meta/0006_snapshot.json +968 -0
  50. package/drizzle/meta/_journal.json +76 -0
  51. package/drizzle/schema.ts +110 -0
  52. package/package.json +127 -0
@@ -0,0 +1,76 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1777149089563,
9
+ "tag": "0000_easy_meggan",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1777203407098,
16
+ "tag": "0001_groovy_smiling_tiger",
17
+ "breakpoints": true
18
+ },
19
+ {
20
+ "idx": 2,
21
+ "version": "7",
22
+ "when": 1777205689369,
23
+ "tag": "0002_busy_iron_man",
24
+ "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "7",
29
+ "when": 1777206207592,
30
+ "tag": "0003_aspiring_richard_fisk",
31
+ "breakpoints": true
32
+ },
33
+ {
34
+ "idx": 4,
35
+ "version": "7",
36
+ "when": 1777206664757,
37
+ "tag": "0004_heavy_lenny_balinger",
38
+ "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "7",
43
+ "when": 1777206872080,
44
+ "tag": "0005_flimsy_mastermind",
45
+ "breakpoints": true
46
+ },
47
+ {
48
+ "idx": 6,
49
+ "version": "7",
50
+ "when": 1777207441386,
51
+ "tag": "0006_happy_callisto",
52
+ "breakpoints": true
53
+ },
54
+ {
55
+ "idx": 7,
56
+ "version": "7",
57
+ "when": 1777522800000,
58
+ "tag": "0007_v7_substrate",
59
+ "breakpoints": true
60
+ },
61
+ {
62
+ "idx": 8,
63
+ "version": "7",
64
+ "when": 1777526400000,
65
+ "tag": "0008_workspace_sandbox_handles",
66
+ "breakpoints": true
67
+ },
68
+ {
69
+ "idx": 9,
70
+ "version": "7",
71
+ "when": 1777536000000,
72
+ "tag": "0009_workspace_runtime_resources",
73
+ "breakpoints": true
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,110 @@
1
+ import { relations, sql } from "drizzle-orm";
2
+ import {
3
+ pgTable,
4
+ text,
5
+ timestamp,
6
+ boolean,
7
+ uuid,
8
+ index,
9
+ } from "drizzle-orm/pg-core";
10
+
11
+ export const users = pgTable("users", {
12
+ id: uuid("id")
13
+ .default(sql`pg_catalog.gen_random_uuid()`)
14
+ .primaryKey(),
15
+ name: text("name").notNull(),
16
+ email: text("email").notNull().unique(),
17
+ email_verified: boolean("email_verified").default(false).notNull(),
18
+ image: text("image"),
19
+ created_at: timestamp("created_at").defaultNow().notNull(),
20
+ updated_at: timestamp("updated_at")
21
+ .defaultNow()
22
+ .$onUpdate(() => /* @__PURE__ */ new Date())
23
+ .notNull(),
24
+ });
25
+
26
+ export const sessions = pgTable(
27
+ "sessions",
28
+ {
29
+ id: uuid("id")
30
+ .default(sql`pg_catalog.gen_random_uuid()`)
31
+ .primaryKey(),
32
+ expires_at: timestamp("expires_at").notNull(),
33
+ token: text("token").notNull().unique(),
34
+ created_at: timestamp("created_at").defaultNow().notNull(),
35
+ updated_at: timestamp("updated_at")
36
+ .defaultNow()
37
+ .$onUpdate(() => /* @__PURE__ */ new Date())
38
+ .notNull(),
39
+ ip_address: text("ip_address"),
40
+ user_agent: text("user_agent"),
41
+ userId: uuid("user_id")
42
+ .notNull()
43
+ .references(() => users.id, { onDelete: "cascade" }),
44
+ },
45
+ (table) => [index("sessions_userId_idx").on(table.userId)],
46
+ );
47
+
48
+ export const accounts = pgTable(
49
+ "accounts",
50
+ {
51
+ id: uuid("id")
52
+ .default(sql`pg_catalog.gen_random_uuid()`)
53
+ .primaryKey(),
54
+ account_id: text("account_id").notNull(),
55
+ provider_id: text("provider_id").notNull(),
56
+ userId: uuid("user_id")
57
+ .notNull()
58
+ .references(() => users.id, { onDelete: "cascade" }),
59
+ access_token: text("access_token"),
60
+ refresh_token: text("refresh_token"),
61
+ id_token: text("id_token"),
62
+ access_token_expires_at: timestamp("access_token_expires_at"),
63
+ refresh_token_expires_at: timestamp("refresh_token_expires_at"),
64
+ scope: text("scope"),
65
+ password: text("password"),
66
+ created_at: timestamp("created_at").defaultNow().notNull(),
67
+ updated_at: timestamp("updated_at")
68
+ .defaultNow()
69
+ .$onUpdate(() => /* @__PURE__ */ new Date())
70
+ .notNull(),
71
+ },
72
+ (table) => [index("accounts_userId_idx").on(table.userId)],
73
+ );
74
+
75
+ export const verification_tokens = pgTable(
76
+ "verification_tokens",
77
+ {
78
+ id: uuid("id")
79
+ .default(sql`pg_catalog.gen_random_uuid()`)
80
+ .primaryKey(),
81
+ identifier: text("identifier").notNull(),
82
+ value: text("value").notNull(),
83
+ expires_at: timestamp("expires_at").notNull(),
84
+ created_at: timestamp("created_at").defaultNow().notNull(),
85
+ updated_at: timestamp("updated_at")
86
+ .defaultNow()
87
+ .$onUpdate(() => /* @__PURE__ */ new Date())
88
+ .notNull(),
89
+ },
90
+ (table) => [index("verification_tokens_identifier_idx").on(table.identifier)],
91
+ );
92
+
93
+ export const usersRelations = relations(users, ({ many }) => ({
94
+ sessionss: many(sessions),
95
+ accountss: many(accounts),
96
+ }));
97
+
98
+ export const sessionsRelations = relations(sessions, ({ one }) => ({
99
+ users: one(users, {
100
+ fields: [sessions.userId],
101
+ references: [users.id],
102
+ }),
103
+ }));
104
+
105
+ export const accountsRelations = relations(accounts, ({ one }) => ({
106
+ users: one(users, {
107
+ fields: [accounts.userId],
108
+ references: [users.id],
109
+ }),
110
+ }));
package/package.json ADDED
@@ -0,0 +1,127 @@
1
+ {
2
+ "name": "@hachej/boring-core",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Foundation package for boring-ui-v2 apps: DB, auth, config, HTTP app factory, and frontend app shell.",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/hachej/boring-ui.git"
10
+ },
11
+ "homepage": "https://github.com/hachej/boring-ui",
12
+ "exports": {
13
+ "./server": {
14
+ "types": "./dist/server/index.d.ts",
15
+ "import": "./dist/server/index.js"
16
+ },
17
+ "./server/db": {
18
+ "types": "./dist/server/db/index.d.ts",
19
+ "import": "./dist/server/db/index.js"
20
+ },
21
+ "./app/server": {
22
+ "types": "./dist/app/server/index.d.ts",
23
+ "import": "./dist/app/server/index.js"
24
+ },
25
+ "./app/front": {
26
+ "types": "./dist/app/front/index.d.ts",
27
+ "import": "./dist/app/front/index.js"
28
+ },
29
+ "./app/front/styles.css": "./dist/app/front/styles.css",
30
+ "./app/vite": {
31
+ "types": "./dist/app/vite/index.d.ts",
32
+ "import": "./dist/app/vite/index.js"
33
+ },
34
+ "./front": {
35
+ "types": "./dist/front/index.d.ts",
36
+ "import": "./dist/front/index.js"
37
+ },
38
+ "./front/top-bar-slot": {
39
+ "types": "./dist/front/top-bar-slot.d.ts",
40
+ "import": "./dist/front/top-bar-slot.js"
41
+ },
42
+ "./shared": {
43
+ "types": "./dist/shared/index.d.ts",
44
+ "import": "./dist/shared/index.js"
45
+ },
46
+ "./theme.css": "./dist/front/theme.css"
47
+ },
48
+ "sideEffects": [
49
+ "**/*.css"
50
+ ],
51
+ "files": [
52
+ "dist",
53
+ "drizzle"
54
+ ],
55
+ "dependencies": {
56
+ "@fastify/cors": "^11.0.0",
57
+ "@fastify/helmet": "^13.0.1",
58
+ "@fastify/rate-limit": "^10.3.0",
59
+ "@hookform/resolvers": "^5.2.2",
60
+ "@react-email/components": "^1.0.12",
61
+ "@react-email/render": "^2.0.7",
62
+ "@tanstack/react-query": "^5.0.0",
63
+ "@zxcvbn-ts/core": "^3.0.4",
64
+ "@zxcvbn-ts/language-common": "^3.0.4",
65
+ "@zxcvbn-ts/language-en": "^3.0.2",
66
+ "better-auth": "^1.6.9",
67
+ "close-with-grace": "^2.2.0",
68
+ "drizzle-orm": "^0.45.2",
69
+ "fastify": "^5.3.3",
70
+ "fastify-plugin": "^5.1.0",
71
+ "isomorphic-dompurify": "^3.10.0",
72
+ "lucide-react": "^1.8.0",
73
+ "nodemailer": "^8.0.6",
74
+ "pino": "^10.3.1",
75
+ "postgres": "^3.4.9",
76
+ "react-helmet-async": "^2.0.5",
77
+ "react-hook-form": "^7.74.0",
78
+ "react-router-dom": "^7.14.2",
79
+ "smol-toml": "^1.6.1",
80
+ "zod": "^3.25.76",
81
+ "@hachej/boring-ui-kit": "0.1.0",
82
+ "@hachej/boring-workspace": "0.1.0",
83
+ "@hachej/boring-agent": "0.1.0"
84
+ },
85
+ "devDependencies": {
86
+ "@testing-library/jest-dom": "^6.9.1",
87
+ "@testing-library/react": "^16.3.2",
88
+ "@testing-library/user-event": "^14.6.1",
89
+ "@types/node": "^22.15.3",
90
+ "@types/nodemailer": "^8.0.0",
91
+ "@types/react": "^19.1.2",
92
+ "@types/react-dom": "^19.1.3",
93
+ "drizzle-kit": "^0.31.10",
94
+ "jsdom": "^29.0.2",
95
+ "react": "^19.1.0",
96
+ "react-dom": "^19.1.0",
97
+ "tsup": "^8.4.0",
98
+ "tsx": "^4.21.0",
99
+ "typescript": "^5.8.3",
100
+ "vitest": "^3.1.3"
101
+ },
102
+ "peerDependencies": {
103
+ "react": "^18.0.0 || ^19.0.0",
104
+ "react-dom": "^18.0.0 || ^19.0.0"
105
+ },
106
+ "peerDependenciesMeta": {
107
+ "react": {
108
+ "optional": true
109
+ },
110
+ "react-dom": {
111
+ "optional": true
112
+ }
113
+ },
114
+ "scripts": {
115
+ "build": "pnpm --filter @hachej/boring-ui-kit build && tsup && cp src/front/theme.css dist/front/theme.css && mkdir -p dist/app/front && cp src/app/front/styles.css dist/app/front/styles.css",
116
+ "dev": "tsup --watch",
117
+ "test": "vitest run --no-file-parallelism",
118
+ "test:watch": "vitest",
119
+ "typecheck": "pnpm --filter @hachej/boring-ui-kit build && tsc --noEmit",
120
+ "lint": "pnpm run typecheck",
121
+ "check:bundle-size": "tsx ./scripts/check-bundle-size.ts",
122
+ "clean": "rm -rf dist .tsbuildinfo",
123
+ "auth:generate-schema": "BETTER_AUTH_SCHEMA_GEN=1 npx @better-auth/cli generate --config src/server/auth/schema-config.ts --output drizzle/ --yes || BETTER_AUTH_SCHEMA_GEN=1 npx @better-auth/cli generate --config src/server/auth/schema-config.ts --output drizzle/schema.ts --yes",
124
+ "drizzle:generate": "drizzle-kit generate --config drizzle.config.ts",
125
+ "drizzle:migrate": "drizzle-kit migrate --config drizzle.config.ts"
126
+ }
127
+ }