create-fullstack-scaffold 0.4.24 → 0.4.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fullstack-scaffold",
3
- "version": "0.4.24",
3
+ "version": "0.4.25",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-fullstack-scaffold": "dist/cli/index.js"
@@ -1,101 +0,0 @@
1
- CREATE TABLE `todos` (
2
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
- `title` text NOT NULL,
4
- `description` text,
5
- `status` text DEFAULT 'pending' NOT NULL,
6
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
7
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
8
- );
9
- --> statement-breakpoint
10
- CREATE TABLE `notifications` (
11
- `id` text PRIMARY KEY NOT NULL,
12
- `type` text NOT NULL,
13
- `title` text NOT NULL,
14
- `message` text NOT NULL,
15
- `read` integer DEFAULT false NOT NULL,
16
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
17
- );
18
- --> statement-breakpoint
19
- CREATE TABLE `permissions` (
20
- `id` text PRIMARY KEY NOT NULL,
21
- `code` text NOT NULL,
22
- `name` text NOT NULL,
23
- `label` text NOT NULL,
24
- `category` text NOT NULL,
25
- `description` text,
26
- `sort_order` integer DEFAULT 0,
27
- `is_active` integer DEFAULT true,
28
- `created_at` integer,
29
- `updated_at` integer
30
- );
31
- --> statement-breakpoint
32
- CREATE UNIQUE INDEX `permissions_code_unique` ON `permissions` (`code`);--> statement-breakpoint
33
- CREATE TABLE `roles` (
34
- `id` text PRIMARY KEY NOT NULL,
35
- `code` text NOT NULL,
36
- `name` text NOT NULL,
37
- `label` text NOT NULL,
38
- `description` text,
39
- `is_system` integer DEFAULT false,
40
- `is_active` integer DEFAULT true,
41
- `sort_order` integer DEFAULT 0,
42
- `created_at` integer,
43
- `updated_at` integer
44
- );
45
- --> statement-breakpoint
46
- CREATE UNIQUE INDEX `roles_code_unique` ON `roles` (`code`);--> statement-breakpoint
47
- CREATE TABLE `role_permissions` (
48
- `role_id` text NOT NULL,
49
- `permission_id` text NOT NULL,
50
- `created_at` integer,
51
- PRIMARY KEY(`role_id`, `permission_id`),
52
- FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE cascade,
53
- FOREIGN KEY (`permission_id`) REFERENCES `permissions`(`id`) ON UPDATE no action ON DELETE cascade
54
- );
55
- --> statement-breakpoint
56
- CREATE TABLE `user_roles` (
57
- `id` text PRIMARY KEY NOT NULL,
58
- `user_id` text NOT NULL,
59
- `role_id` text NOT NULL,
60
- `assigned_by` text,
61
- `assigned_at` integer,
62
- `expires_at` integer,
63
- `is_active` integer DEFAULT true,
64
- FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE cascade
65
- );
66
- --> statement-breakpoint
67
- CREATE TABLE `routes` (
68
- `id` text PRIMARY KEY NOT NULL,
69
- `path` text NOT NULL,
70
- `method` text NOT NULL,
71
- `name` text,
72
- `description` text,
73
- `module` text,
74
- `is_public` integer DEFAULT false,
75
- `is_active` integer DEFAULT true,
76
- `created_at` integer,
77
- `updated_at` integer
78
- );
79
- --> statement-breakpoint
80
- CREATE UNIQUE INDEX `routes_path_method_unique` ON `routes` (`path`,`method`);--> statement-breakpoint
81
- CREATE TABLE `permission_routes` (
82
- `permission_id` text NOT NULL,
83
- `route_id` text NOT NULL,
84
- `created_at` integer,
85
- PRIMARY KEY(`permission_id`, `route_id`),
86
- FOREIGN KEY (`permission_id`) REFERENCES `permissions`(`id`) ON UPDATE no action ON DELETE cascade,
87
- FOREIGN KEY (`route_id`) REFERENCES `routes`(`id`) ON UPDATE no action ON DELETE cascade
88
- );
89
- --> statement-breakpoint
90
- CREATE TABLE `permission_audit_logs` (
91
- `id` text PRIMARY KEY NOT NULL,
92
- `user_id` text NOT NULL,
93
- `action` text NOT NULL,
94
- `resource_type` text NOT NULL,
95
- `resource_id` text,
96
- `old_value` text,
97
- `new_value` text,
98
- `ip_address` text,
99
- `user_agent` text,
100
- `created_at` integer
101
- );
@@ -1,12 +0,0 @@
1
- CREATE TABLE `todo_attachments` (
2
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
- `todo_id` integer NOT NULL,
4
- `file_name` text NOT NULL,
5
- `original_name` text NOT NULL,
6
- `mime_type` text NOT NULL,
7
- `size` integer NOT NULL,
8
- `path` text NOT NULL,
9
- `uploaded_by` text,
10
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
11
- FOREIGN KEY (`todo_id`) REFERENCES `todos`(`id`) ON UPDATE no action ON DELETE cascade
12
- );
@@ -1,89 +0,0 @@
1
- CREATE TABLE `orders` (
2
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
- `order_no` text NOT NULL,
4
- `customer_name` text NOT NULL,
5
- `customer_email` text NOT NULL,
6
- `product_name` text NOT NULL,
7
- `amount` integer NOT NULL,
8
- `status` text DEFAULT 'pending' NOT NULL,
9
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
10
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
11
- );
12
- --> statement-breakpoint
13
- CREATE TABLE `ticket_replies` (
14
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
15
- `ticket_id` integer NOT NULL,
16
- `content` text NOT NULL,
17
- `author` text NOT NULL,
18
- `is_customer` integer DEFAULT false NOT NULL,
19
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
20
- FOREIGN KEY (`ticket_id`) REFERENCES `tickets`(`id`) ON UPDATE no action ON DELETE cascade
21
- );
22
- --> statement-breakpoint
23
- CREATE TABLE `tickets` (
24
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
25
- `ticket_no` text NOT NULL,
26
- `customer_name` text NOT NULL,
27
- `customer_email` text NOT NULL,
28
- `subject` text NOT NULL,
29
- `description` text NOT NULL,
30
- `status` text DEFAULT 'open' NOT NULL,
31
- `priority` text DEFAULT 'medium' NOT NULL,
32
- `category` text NOT NULL,
33
- `assigned_to` text,
34
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
35
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
36
- );
37
- --> statement-breakpoint
38
- CREATE TABLE `disputes` (
39
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
40
- `dispute_no` text NOT NULL,
41
- `order_id` text NOT NULL,
42
- `order_no` text NOT NULL,
43
- `customer_name` text NOT NULL,
44
- `customer_email` text NOT NULL,
45
- `type` text NOT NULL,
46
- `status` text DEFAULT 'pending' NOT NULL,
47
- `description` text NOT NULL,
48
- `resolution` text,
49
- `amount` integer NOT NULL,
50
- `resolved_at` integer,
51
- `resolved_by` text,
52
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
53
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
54
- );
55
- --> statement-breakpoint
56
- CREATE TABLE `contents` (
57
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
58
- `title` text NOT NULL,
59
- `body` text NOT NULL,
60
- `excerpt` text,
61
- `category` text NOT NULL,
62
- `tags` text,
63
- `status` text DEFAULT 'draft' NOT NULL,
64
- `author` text NOT NULL,
65
- `view_count` integer DEFAULT 0 NOT NULL,
66
- `like_count` integer DEFAULT 0 NOT NULL,
67
- `published_at` integer,
68
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
69
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
70
- );
71
- --> statement-breakpoint
72
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
73
- CREATE TABLE `__new_todo_attachments` (
74
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
75
- `todo_id` integer NOT NULL,
76
- `file_name` text NOT NULL,
77
- `original_name` text NOT NULL,
78
- `mime_type` text NOT NULL,
79
- `size` integer NOT NULL,
80
- `path` text NOT NULL,
81
- `uploaded_by` text,
82
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
83
- FOREIGN KEY (`todo_id`) REFERENCES `todos`(`id`) ON UPDATE no action ON DELETE cascade
84
- );
85
- --> statement-breakpoint
86
- INSERT INTO `__new_todo_attachments`("id", "todo_id", "file_name", "original_name", "mime_type", "size", "path", "uploaded_by", "created_at") SELECT "id", "todo_id", "file_name", "original_name", "mime_type", "size", "path", "uploaded_by", "created_at" FROM `todo_attachments`;--> statement-breakpoint
87
- DROP TABLE `todo_attachments`;--> statement-breakpoint
88
- ALTER TABLE `__new_todo_attachments` RENAME TO `todo_attachments`;--> statement-breakpoint
89
- PRAGMA foreign_keys=ON;
@@ -1,100 +0,0 @@
1
- CREATE TABLE `developers` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `username` text NOT NULL,
4
- `email` text NOT NULL,
5
- `password_hash` text NOT NULL,
6
- `role` text DEFAULT 'developer' NOT NULL,
7
- `api_key` text NOT NULL,
8
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
9
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
10
- );
11
- --> statement-breakpoint
12
- CREATE UNIQUE INDEX `developers_username_unique` ON `developers` (`username`);--> statement-breakpoint
13
- CREATE UNIQUE INDEX `developers_email_unique` ON `developers` (`email`);--> statement-breakpoint
14
- CREATE UNIQUE INDEX `developers_api_key_unique` ON `developers` (`api_key`);--> statement-breakpoint
15
- CREATE TABLE `plugin_categories` (
16
- `id` text PRIMARY KEY NOT NULL,
17
- `name` text NOT NULL,
18
- `slug` text NOT NULL,
19
- `description` text,
20
- `icon` text,
21
- `sort_order` integer DEFAULT 0 NOT NULL
22
- );
23
- --> statement-breakpoint
24
- CREATE UNIQUE INDEX `plugin_categories_name_unique` ON `plugin_categories` (`name`);--> statement-breakpoint
25
- CREATE UNIQUE INDEX `plugin_categories_slug_unique` ON `plugin_categories` (`slug`);--> statement-breakpoint
26
- CREATE TABLE `plugin_category_mappings` (
27
- `plugin_id` text NOT NULL,
28
- `category_id` text NOT NULL,
29
- FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON UPDATE no action ON DELETE cascade,
30
- FOREIGN KEY (`category_id`) REFERENCES `plugin_categories`(`id`) ON UPDATE no action ON DELETE cascade
31
- );
32
- --> statement-breakpoint
33
- CREATE UNIQUE INDEX `plugin_category_mapping_unique` ON `plugin_category_mappings` (`plugin_id`,`category_id`);--> statement-breakpoint
34
- CREATE TABLE `plugin_reviews` (
35
- `id` text PRIMARY KEY NOT NULL,
36
- `plugin_id` text NOT NULL,
37
- `user_id` text NOT NULL,
38
- `user_name` text NOT NULL,
39
- `rating` integer NOT NULL,
40
- `title` text,
41
- `content` text,
42
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
43
- FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON UPDATE no action ON DELETE cascade
44
- );
45
- --> statement-breakpoint
46
- CREATE UNIQUE INDEX `plugin_review_user_unique` ON `plugin_reviews` (`plugin_id`,`user_id`);--> statement-breakpoint
47
- CREATE TABLE `plugin_versions` (
48
- `id` text PRIMARY KEY NOT NULL,
49
- `plugin_id` text NOT NULL,
50
- `version` text NOT NULL,
51
- `changelog` text,
52
- `package_url` text,
53
- `file_size` integer,
54
- `checksum` text,
55
- `status` text DEFAULT 'pending' NOT NULL,
56
- `published_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
57
- FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON UPDATE no action ON DELETE cascade
58
- );
59
- --> statement-breakpoint
60
- CREATE UNIQUE INDEX `plugin_version_unique` ON `plugin_versions` (`plugin_id`,`version`);--> statement-breakpoint
61
- CREATE TABLE `plugins` (
62
- `id` text PRIMARY KEY NOT NULL,
63
- `name` text NOT NULL,
64
- `slug` text NOT NULL,
65
- `description` text DEFAULT '' NOT NULL,
66
- `readme` text,
67
- `author_id` text NOT NULL,
68
- `author_name` text NOT NULL,
69
- `repository_url` text,
70
- `homepage_url` text,
71
- `npm_package` text,
72
- `license` text,
73
- `version` text DEFAULT '0.0.1' NOT NULL,
74
- `status` text DEFAULT 'pending' NOT NULL,
75
- `download_count` integer DEFAULT 0 NOT NULL,
76
- `view_count` integer DEFAULT 0 NOT NULL,
77
- `featured` integer DEFAULT false NOT NULL,
78
- `screenshot_url` text,
79
- `site_urls` text,
80
- `tags` text,
81
- `commands` text,
82
- `reject_reason` text,
83
- `created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
84
- `updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL
85
- );
86
- --> statement-breakpoint
87
- CREATE UNIQUE INDEX `plugins_slug_unique` ON `plugins` (`slug`);--> statement-breakpoint
88
- CREATE TABLE `tenants` (
89
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
90
- `name` text NOT NULL,
91
- `slug` text NOT NULL,
92
- `status` text DEFAULT 'trial' NOT NULL,
93
- `plan` text DEFAULT 'free' NOT NULL,
94
- `max_users` integer DEFAULT 5 NOT NULL,
95
- `settings` text,
96
- `created_at` text NOT NULL,
97
- `updated_at` text NOT NULL
98
- );
99
- --> statement-breakpoint
100
- CREATE UNIQUE INDEX `tenants_slug_unique` ON `tenants` (`slug`);
@@ -1,30 +0,0 @@
1
- -- Create merchants table
2
- CREATE TABLE `merchants` (
3
- `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
4
- `user_id` text NOT NULL,
5
- `tenant_id` integer NOT NULL,
6
- `business_name` text NOT NULL,
7
- `business_type` text NOT NULL,
8
- `status` text NOT NULL DEFAULT 'active',
9
- `description` text,
10
- `phone` text,
11
- `email` text,
12
- `address` text,
13
- `password` text NOT NULL,
14
- `created_at` text NOT NULL,
15
- `updated_at` text NOT NULL
16
- );
17
-
18
- -- Create products table
19
- CREATE TABLE `products` (
20
- `id` text PRIMARY KEY NOT NULL,
21
- `merchant_id` integer NOT NULL,
22
- `name` text NOT NULL,
23
- `description` text,
24
- `price` real NOT NULL,
25
- `status` text NOT NULL DEFAULT 'active',
26
- `stock` integer NOT NULL DEFAULT 0,
27
- `image_url` text,
28
- `created_at` integer NOT NULL,
29
- `updated_at` integer NOT NULL
30
- );