better-auth-studio 1.0.5 → 1.0.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 (44) hide show
  1. package/package.json +8 -1
  2. package/frontend/index.html +0 -13
  3. package/frontend/package-lock.json +0 -4675
  4. package/frontend/package.json +0 -52
  5. package/frontend/pnpm-lock.yaml +0 -4020
  6. package/frontend/postcss.config.js +0 -6
  7. package/frontend/src/App.tsx +0 -36
  8. package/frontend/src/components/CommandPalette.tsx +0 -219
  9. package/frontend/src/components/Layout.tsx +0 -159
  10. package/frontend/src/components/ui/badge.tsx +0 -40
  11. package/frontend/src/components/ui/button.tsx +0 -53
  12. package/frontend/src/components/ui/card.tsx +0 -78
  13. package/frontend/src/components/ui/input.tsx +0 -20
  14. package/frontend/src/components/ui/label.tsx +0 -19
  15. package/frontend/src/components/ui/select.tsx +0 -71
  16. package/frontend/src/index.css +0 -130
  17. package/frontend/src/lib/utils.ts +0 -6
  18. package/frontend/src/main.tsx +0 -10
  19. package/frontend/src/pages/Dashboard.tsx +0 -231
  20. package/frontend/src/pages/OrganizationDetails.tsx +0 -1281
  21. package/frontend/src/pages/Organizations.tsx +0 -874
  22. package/frontend/src/pages/Sessions.tsx +0 -623
  23. package/frontend/src/pages/Settings.tsx +0 -1019
  24. package/frontend/src/pages/TeamDetails.tsx +0 -666
  25. package/frontend/src/pages/Users.tsx +0 -728
  26. package/frontend/tailwind.config.js +0 -75
  27. package/frontend/tsconfig.json +0 -31
  28. package/frontend/tsconfig.node.json +0 -10
  29. package/frontend/vite.config.ts +0 -31
  30. package/src/auth-adapter.ts +0 -473
  31. package/src/cli.ts +0 -51
  32. package/src/config.ts +0 -320
  33. package/src/data.ts +0 -351
  34. package/src/routes.ts +0 -1585
  35. package/src/studio.ts +0 -86
  36. package/test-project/README.md +0 -0
  37. package/test-project/better-auth.db +0 -0
  38. package/test-project/better-auth_migrations/2025-08-27T15-55-04.099Z.sql +0 -7
  39. package/test-project/better-auth_migrations/2025-09-04T02-33-19.422Z.sql +0 -7
  40. package/test-project/package.json +0 -29
  41. package/test-project/pnpm-lock.yaml +0 -1728
  42. package/test-project/src/auth.ts +0 -47
  43. package/test-project/src/index.ts +0 -40
  44. 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
- }