hylekit 1.0.1 β†’ 1.0.2

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 +36 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,15 +2,47 @@
2
2
 
3
3
  Distributed BetterAuth library for SvelteKit and Next.js with Google OAuth and Turso cloud database.
4
4
 
5
+ > **Note:** HyleKit provides **only the authentication database**. You will need to provision your own separate database for storing application data.
6
+
5
7
  ## Features
6
8
 
7
9
  - πŸ” **Google OAuth** - Simple Google login integration
8
- - 🌐 **Distributed Auth** - Each app runs auth locally, sharing a Turso cloud database
10
+ - 🌐 **Distributed Auth** - Each app runs auth locally, sharing a centralized Turso auth database
9
11
  - πŸ“¦ **Framework Adapters** - First-class support for SvelteKit and Next.js
10
- - πŸ—„οΈ **Turso/LibSQL** - Edge-friendly SQLite database
12
+ - πŸ—„οΈ **Turso/LibSQL** - Edge-friendly SQLite database for auth
11
13
  - πŸ”„ **Session Management** - Automatic session handling with cookies
12
14
  - πŸš€ **BFF Pattern** - Built-in support for Backend-For-Frontend architecture with Express
13
15
 
16
+ ## Database Architecture
17
+
18
+ HyleKit uses a **centralized authentication database** that all your applications connect to. This database stores:
19
+ - User accounts
20
+ - Sessions
21
+ - OAuth tokens
22
+ - Verification tokens
23
+
24
+ **You must provision two databases:**
25
+
26
+ | Database | Purpose | Provided by |
27
+ |----------|---------|-------------|
28
+ | **Hyle Auth Database** | Stores users, sessions, and auth data | HyleKit (shared Turso instance) |
29
+ | **Your Application Database** | Stores your app's business data | You (separate database) |
30
+
31
+ ```
32
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
33
+ β”‚ Your Application β”‚
34
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
35
+ β”‚ Hyle Auth Database β”‚ Your Application Database β”‚
36
+ β”‚ (Turso - provided by Hyle) β”‚ (Postgres, MySQL, SQLite, etc.) β”‚
37
+ β”‚ β”œβ”€β”€ users β”‚ β”œβ”€β”€ products β”‚
38
+ β”‚ β”œβ”€β”€ sessions β”‚ β”œβ”€β”€ orders β”‚
39
+ β”‚ β”œβ”€β”€ accounts β”‚ β”œβ”€β”€ posts β”‚
40
+ β”‚ └── verification β”‚ └── ... your data β”‚
41
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
42
+ ```
43
+
44
+ > **Important:** Your application database can use any database technology you prefer. HyleKit does not manage or interact with your application dataβ€”only authentication.
45
+
14
46
  ## Installation
15
47
 
16
48
  ```bash
@@ -21,8 +53,8 @@ npm install hylekit
21
53
 
22
54
  ```bash
23
55
  # Turso Database
24
- DATABASE_URL=libsql://[db-name]-[org].turso.io
25
- DATABASE_AUTH_TOKEN=your-turso-token
56
+ HYLE_DATABASE_URL=libsql://[db-name]-[org].turso.io
57
+ HYLE_DATABASE_AUTH_TOKEN=your-turso-token
26
58
 
27
59
  # Google OAuth
28
60
  GOOGLE_CLIENT_ID=your-google-client-id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hylekit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Distributed BetterAuth library for SvelteKit and Next.js with Google OAuth and Turso",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",