vibecarbon 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  <p align="center">
2
- <img src="carbon/src/client/assets/vibecarbon-logo-dark.svg" alt="Vibecarbon" width="500" />
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hyperformant/vibecarbon/main/carbon/src/client/assets/vibecarbon-logo-light.svg">
4
+ <img src="https://raw.githubusercontent.com/hyperformant/vibecarbon/main/carbon/src/client/assets/vibecarbon-logo-dark.svg" alt="Vibecarbon" width="500" />
5
+ </picture>
3
6
  </p>
4
7
 
5
8
  <p align="center"><strong>Professional Grade SaaS Architecture & Starter Kit</strong></p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibecarbon",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Create and manage production-ready Vibecarbon applications",
5
5
  "type": "module",
6
6
  "bin": "./src/cli.js",
@@ -85,6 +85,7 @@
85
85
  "@vitest/coverage-v8": "^4.1.1",
86
86
  "autocannon": "^8.0.0",
87
87
  "better-sqlite3": "^12.8.0",
88
+ "conventional-changelog-conventionalcommits": "^9.3.1",
88
89
  "msw": "^2.12.14",
89
90
  "semantic-release": "^23.0.8",
90
91
  "tsx": "^4.21.0",
@@ -1,5 +0,0 @@
1
- # Generated by dev-init.js — DO NOT COMMIT
2
- services:
3
- db:
4
- volumes:
5
- - ./volumes/db/super-admin.generated.sql:/docker-entrypoint-initdb.d/post-init/super-admin.sql:Z
@@ -1,113 +0,0 @@
1
- -- Create initial admin user in auth.users (Development Version)
2
- -- Uses credentials provided during `vibecarbon create`
3
-
4
- DO $$
5
- DECLARE
6
- admin_email TEXT := 'admin@example.com';
7
- admin_password_hash TEXT := '$2b$10$OWzZo/eSlFAb2S9oX4Ps5.prj7LzVfAWo7N1cFrL3N8Z3HLUZtvOm';
8
- new_user_id UUID;
9
- BEGIN
10
- -- Only create if admin email is provided and not empty
11
- IF admin_email IS NOT NULL AND admin_email != '' THEN
12
-
13
- -- Check if user already exists
14
- IF NOT EXISTS (SELECT 1 FROM auth.users WHERE email = admin_email) THEN
15
- -- Generate a new UUID for the user
16
- new_user_id := gen_random_uuid();
17
-
18
- -- Create admin user with bcrypt-hashed password
19
- -- Note: GoTrue expects token columns to be empty strings, not NULL
20
- INSERT INTO auth.users (
21
- instance_id,
22
- id,
23
- aud,
24
- role,
25
- email,
26
- encrypted_password,
27
- email_confirmed_at,
28
- confirmation_sent_at,
29
- raw_app_meta_data,
30
- raw_user_meta_data,
31
- created_at,
32
- updated_at,
33
- confirmation_token,
34
- recovery_token,
35
- email_change_token_new,
36
- email_change_token_current,
37
- email_change,
38
- phone,
39
- phone_change,
40
- phone_change_token,
41
- reauthentication_token
42
- ) VALUES (
43
- '00000000-0000-0000-0000-000000000000',
44
- new_user_id,
45
- 'authenticated',
46
- 'authenticated',
47
- admin_email,
48
- admin_password_hash,
49
- NOW(),
50
- NOW(),
51
- jsonb_build_object(
52
- 'provider', 'email',
53
- 'providers', ARRAY['email'],
54
- 'role', 'super_admin'
55
- ),
56
- '{}'::jsonb,
57
- NOW(),
58
- NOW(),
59
- '',
60
- '',
61
- '',
62
- '',
63
- '',
64
- '',
65
- '',
66
- '',
67
- ''
68
- );
69
-
70
- -- Create identity record for email provider
71
- INSERT INTO auth.identities (
72
- id,
73
- user_id,
74
- identity_data,
75
- provider,
76
- provider_id,
77
- last_sign_in_at,
78
- created_at,
79
- updated_at
80
- ) VALUES (
81
- gen_random_uuid(),
82
- new_user_id,
83
- jsonb_build_object(
84
- 'sub', new_user_id::text,
85
- 'email', admin_email,
86
- 'email_verified', true
87
- ),
88
- 'email',
89
- new_user_id::text,
90
- NOW(),
91
- NOW(),
92
- NOW()
93
- );
94
-
95
- RAISE NOTICE 'Created dev admin user: % with id: %', admin_email, new_user_id;
96
- ELSE
97
- -- Update existing user to have super_admin role if they don't already
98
- UPDATE auth.users
99
- SET raw_app_meta_data = raw_app_meta_data || '{"role": "super_admin"}'::jsonb,
100
- updated_at = NOW()
101
- WHERE email = admin_email
102
- AND (raw_app_meta_data->>'role' IS NULL OR raw_app_meta_data->>'role' != 'super_admin');
103
-
104
- IF FOUND THEN
105
- RAISE NOTICE 'Updated existing user % to admin role', admin_email;
106
- ELSE
107
- RAISE NOTICE 'User % already exists with admin role', admin_email;
108
- END IF;
109
- END IF;
110
- ELSE
111
- RAISE NOTICE 'Skipping admin user creation - no admin email configured';
112
- END IF;
113
- END $$;