better-auth-studio 1.0.6 → 1.0.8

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 (51) hide show
  1. package/dist/config.d.ts +1 -0
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +126 -29
  4. package/dist/config.js.map +1 -1
  5. package/dist/routes.d.ts.map +1 -1
  6. package/dist/routes.js +28 -2
  7. package/dist/routes.js.map +1 -1
  8. package/package.json +8 -1
  9. package/frontend/index.html +0 -13
  10. package/frontend/package-lock.json +0 -4675
  11. package/frontend/package.json +0 -52
  12. package/frontend/pnpm-lock.yaml +0 -4020
  13. package/frontend/postcss.config.js +0 -6
  14. package/frontend/src/App.tsx +0 -36
  15. package/frontend/src/components/CommandPalette.tsx +0 -219
  16. package/frontend/src/components/Layout.tsx +0 -159
  17. package/frontend/src/components/ui/badge.tsx +0 -40
  18. package/frontend/src/components/ui/button.tsx +0 -53
  19. package/frontend/src/components/ui/card.tsx +0 -78
  20. package/frontend/src/components/ui/input.tsx +0 -20
  21. package/frontend/src/components/ui/label.tsx +0 -19
  22. package/frontend/src/components/ui/select.tsx +0 -71
  23. package/frontend/src/index.css +0 -130
  24. package/frontend/src/lib/utils.ts +0 -6
  25. package/frontend/src/main.tsx +0 -10
  26. package/frontend/src/pages/Dashboard.tsx +0 -231
  27. package/frontend/src/pages/OrganizationDetails.tsx +0 -1281
  28. package/frontend/src/pages/Organizations.tsx +0 -874
  29. package/frontend/src/pages/Sessions.tsx +0 -623
  30. package/frontend/src/pages/Settings.tsx +0 -1019
  31. package/frontend/src/pages/TeamDetails.tsx +0 -666
  32. package/frontend/src/pages/Users.tsx +0 -728
  33. package/frontend/tailwind.config.js +0 -75
  34. package/frontend/tsconfig.json +0 -31
  35. package/frontend/tsconfig.node.json +0 -10
  36. package/frontend/vite.config.ts +0 -31
  37. package/src/auth-adapter.ts +0 -473
  38. package/src/cli.ts +0 -51
  39. package/src/config.ts +0 -320
  40. package/src/data.ts +0 -351
  41. package/src/routes.ts +0 -1585
  42. package/src/studio.ts +0 -86
  43. package/test-project/README.md +0 -0
  44. package/test-project/better-auth.db +0 -0
  45. package/test-project/better-auth_migrations/2025-08-27T15-55-04.099Z.sql +0 -7
  46. package/test-project/better-auth_migrations/2025-09-04T02-33-19.422Z.sql +0 -7
  47. package/test-project/package.json +0 -29
  48. package/test-project/pnpm-lock.yaml +0 -1728
  49. package/test-project/src/auth.ts +0 -47
  50. package/test-project/src/index.ts +0 -40
  51. package/tsconfig.json +0 -21
@@ -1,47 +0,0 @@
1
- import { betterAuth } from "better-auth";
2
- import Database from "better-sqlite3";
3
- import { organization } from "better-auth/plugins";
4
- // Better Auth configuration
5
- export const auth = betterAuth({
6
- secret: process.env.AUTH_SECRET || "better-auth-secret-123456789",
7
- database: new Database("./better-auth.db"),
8
- socialProviders: {
9
- github: {
10
- clientId: process.env.GITHUB_CLIENT_ID!,
11
- clientSecret: process.env.GITHUB_CLIENT_SECRET!,
12
- redirectUri: "http://localhost:3000/api/auth/callback/github"
13
- }
14
- },
15
- emailAndPassword: {
16
- enabled: true,
17
- disableSignUp: false,
18
- requireEmailVerification: true,
19
- minPasswordLength: 8,
20
- maxPasswordLength: 128,
21
- autoSignIn: true,
22
- sendResetPassword: async ({ user, url, token }) => {
23
- // Send reset password email
24
- console.log(`Reset password email for ${user.email}: ${url}`);
25
- },
26
- resetPasswordTokenExpiresIn: 3600 // 1 hour
27
- },
28
- plugins: [
29
- organization({
30
- teams: {
31
- enabled: true
32
- }
33
- })
34
- ],
35
- session: {
36
- expiresIn: 60 * 60 * 24 * 7, // 7 days
37
- updateAge: 60 * 60 * 24 // 1 day
38
- },
39
- rateLimit: {
40
- enabled: true,
41
- window: 10,
42
- max: 100
43
- },
44
- telemetry: {
45
- enabled: false
46
- }
47
- });
@@ -1,40 +0,0 @@
1
- import express from 'express';
2
- import { auth } from './auth.js';
3
-
4
- const app = express();
5
- const PORT = process.env.PORT || 3000;
6
- // Middleware
7
- app.use(express.json());
8
- // Health check
9
- app.get('/health', (req, res) => {
10
- res.json({
11
- status: 'ok',
12
- message: 'Better Auth Test Project Running',
13
- timestamp: new Date().toISOString()
14
- });
15
- });
16
-
17
- // Root endpoint
18
- app.get('/', async (req, res) => {
19
- const users = await (await auth.$context).adapter.findMany({
20
- model: "user",
21
- })
22
- console.log({users})
23
- res.json({
24
- message: 'Better Auth Test Project',
25
- description: 'This is a test project for Better Auth Studio',
26
- users: JSON.stringify(users, null, 2),
27
- endpoints: {
28
- health: '/health',
29
- auth: '/api/auth/*'
30
- }
31
- });
32
- });
33
-
34
- // Better Auth routes
35
- app.use('/api/auth', auth);
36
-
37
- // Start server
38
- app.listen(PORT, () => {
39
- console.log(`🚀 Better Auth Test Project running on http://localhost:${PORT}`);
40
- });
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": ["ES2020"],
6
- "outDir": "./dist",
7
- "rootDir": "./src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "declarationMap": true,
14
- "sourceMap": true,
15
- "resolveJsonModule": true,
16
- "moduleResolution": "node",
17
- "allowSyntheticDefaultImports": true
18
- },
19
- "include": ["src/**/*"],
20
- "exclude": ["node_modules", "dist", "public"]
21
- }