@gorth-io/structure 0.0.0-alpha.6 → 0.0.0-alpha.7

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 (2) hide show
  1. package/README.md +78 -7
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,12 +1,83 @@
1
- # @gorth/structure
1
+ # @gorth-io/structure
2
2
 
3
- Shared, configurable runtime infrastructure for the Gorth ecosystem.
4
- Better Auth owns login, OAuth, sessions, token encryption and renewal; Structure
5
- provides direct SDK exports and small reusable infrastructure helpers.
3
+ TypeScript infrastructure for HTTP clients, authentication coordination,
4
+ Supabase, and database integrations in the **gorth-io** ecosystem.
6
5
 
7
- See [auth](docs/auth.md) for the native SDK boundaries, new helpers and
8
- **breaking removal of the legacy custom auth engines**, and
9
- [modules](docs/modules.md) for the public module inventory and verification.
6
+ | Includes | Public imports |
7
+ | --- | --- |
8
+ | HTTP callers, fetchers, and responses | `@gorth-io/structure/modules/http` |
9
+ | Authentication retry and freshness policies | `@gorth-io/structure/modules/auth/client` |
10
+ | Server authentication infrastructure | `@gorth-io/structure/modules/auth/server` |
11
+ | Desktop infrastructure | `@gorth-io/structure/modules/desktop` |
12
+ | Axios, Zod, Supabase, and database SDKs | `@gorth-io/structure/cores/*` |
13
+
14
+ ## Installation
15
+
16
+ Use Node.js 24 and install from the npm registry with Bun:
17
+
18
+ ```bash
19
+ bun add @gorth-io/structure
20
+ ```
21
+
22
+ Example dependency declaration (`0.0.0` is a demo version; replace it with an available release):
23
+
24
+ ```json
25
+ {
26
+ "dependencies": {
27
+ "@gorth-io/structure": "0.0.0"
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ Import the public entrypoint for the integration you need:
35
+
36
+ ```ts
37
+ import axios from "@gorth-io/structure/cores/axios";
38
+ import { z } from "@gorth-io/structure/cores/zod";
39
+
40
+ const User = z.object({
41
+ id: z.string(),
42
+ name: z.string(),
43
+ });
44
+
45
+ export async function getUser() {
46
+ const response = await axios.get("/user", { withCredentials: true });
47
+ return User.parse(response.data);
48
+ }
49
+ ```
50
+
51
+ Each application supplies its own URLs, credentials, database connections, and
52
+ authentication configuration. Import only the entrypoints suitable for your
53
+ runtime; keep server credentials and database operations outside browser code.
54
+
55
+ ## Authentication
56
+
57
+ Better Auth owns login, OAuth, sessions, token encryption, and renewal. Structure
58
+ provides SDK exports and small reusable infrastructure helpers, including
59
+ request retry coordination and freshness policies. It does not replace the
60
+ authentication provider or create a configured auth instance for your app.
61
+
62
+ See the [authentication guide](https://github.com/gorth-io/base-structure/blob/main/docs/auth.md)
63
+ and [public module inventory](https://github.com/gorth-io/base-structure/blob/main/docs/modules.md)
64
+ for integration details and migration notes.
10
65
 
11
66
  No application configuration, env reads, API keys, database connection or
12
67
  configured auth instance belongs in this package.
68
+
69
+ ## Development
70
+
71
+ ```bash
72
+ bun install --frozen-lockfile
73
+ bun run build
74
+ bun run typecheck
75
+ bun run test
76
+ bun run test:types
77
+ bun run test:exports
78
+ ```
79
+
80
+ ## Related packages
81
+
82
+ - [@gorth-io/primitive](https://www.npmjs.com/package/@gorth-io/primitive): React UI, themes, and application components.
83
+ - [@gorth-io/principle](https://www.npmjs.com/package/@gorth-io/principle): backend middleware and server integrations.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gorth-io/structure",
3
- "version": "0.0.0-alpha.6",
4
- "description": "",
3
+ "version": "0.0.0-alpha.7",
4
+ "description": "TypeScript infrastructure for HTTP clients, authentication coordination, Supabase, and database integrations in the gorth-io ecosystem.",
5
5
  "type": "module",
6
6
  "author": "Gorthenburg",
7
7
  "license": "GORTH",
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public",
26
+ "tag": "alpha",
26
27
  "registry": "https://registry.npmjs.org"
27
28
  },
28
29
  "main": "./dist/index.cjs",