base44 0.0.1 → 0.0.3

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 (83) hide show
  1. package/README.md +116 -42
  2. package/dist/cli/index.js +19303 -12
  3. package/dist/cli/templates/backend-and-client/README.md +41 -0
  4. package/dist/cli/templates/backend-and-client/base44/config.jsonc.ejs +17 -0
  5. package/dist/cli/templates/backend-and-client/base44/entities/task.jsonc +16 -0
  6. package/dist/cli/templates/backend-and-client/components.json +16 -0
  7. package/dist/cli/templates/backend-and-client/index.html +13 -0
  8. package/dist/cli/templates/backend-and-client/jsconfig.json +13 -0
  9. package/dist/cli/templates/backend-and-client/package.json +24 -0
  10. package/dist/cli/templates/backend-and-client/postcss.config.js +6 -0
  11. package/dist/cli/templates/backend-and-client/src/App.jsx +148 -0
  12. package/dist/cli/templates/backend-and-client/src/api/base44Client.js.ejs +5 -0
  13. package/dist/cli/templates/backend-and-client/src/components/Base44Logo.jsx +15 -0
  14. package/dist/cli/templates/backend-and-client/src/components/ui/button.jsx +23 -0
  15. package/dist/cli/templates/backend-and-client/src/components/ui/checkbox.jsx +20 -0
  16. package/dist/cli/templates/backend-and-client/src/components/ui/input.jsx +13 -0
  17. package/dist/cli/templates/backend-and-client/src/index.css +37 -0
  18. package/dist/cli/templates/backend-and-client/src/main.jsx +6 -0
  19. package/dist/cli/templates/backend-and-client/tailwind.config.js +41 -0
  20. package/dist/cli/templates/backend-and-client/vite.config.js +12 -0
  21. package/dist/cli/templates/backend-only/base44/.env.local.ejs +6 -0
  22. package/dist/cli/templates/backend-only/base44/config.jsonc.ejs +17 -0
  23. package/dist/cli/templates/templates.json +16 -0
  24. package/package.json +30 -15
  25. package/dist/cli/commands/auth/login.d.ts +0 -3
  26. package/dist/cli/commands/auth/login.d.ts.map +0 -1
  27. package/dist/cli/commands/auth/login.js +0 -25
  28. package/dist/cli/commands/auth/login.js.map +0 -1
  29. package/dist/cli/commands/auth/logout.d.ts +0 -3
  30. package/dist/cli/commands/auth/logout.d.ts.map +0 -1
  31. package/dist/cli/commands/auth/logout.js +0 -24
  32. package/dist/cli/commands/auth/logout.js.map +0 -1
  33. package/dist/cli/commands/auth/whoami.d.ts +0 -3
  34. package/dist/cli/commands/auth/whoami.d.ts.map +0 -1
  35. package/dist/cli/commands/auth/whoami.js +0 -24
  36. package/dist/cli/commands/auth/whoami.js.map +0 -1
  37. package/dist/cli/index.d.ts +0 -3
  38. package/dist/cli/index.d.ts.map +0 -1
  39. package/dist/cli/index.js.map +0 -1
  40. package/dist/cli/utils/index.d.ts +0 -3
  41. package/dist/cli/utils/index.d.ts.map +0 -1
  42. package/dist/cli/utils/index.js +0 -3
  43. package/dist/cli/utils/index.js.map +0 -1
  44. package/dist/cli/utils/packageVersion.d.ts +0 -2
  45. package/dist/cli/utils/packageVersion.d.ts.map +0 -1
  46. package/dist/cli/utils/packageVersion.js +0 -12
  47. package/dist/cli/utils/packageVersion.js.map +0 -1
  48. package/dist/cli/utils/runCommand.d.ts +0 -8
  49. package/dist/cli/utils/runCommand.d.ts.map +0 -1
  50. package/dist/cli/utils/runCommand.js +0 -14
  51. package/dist/cli/utils/runCommand.js.map +0 -1
  52. package/dist/core/config/auth.d.ts +0 -5
  53. package/dist/core/config/auth.d.ts.map +0 -1
  54. package/dist/core/config/auth.js +0 -47
  55. package/dist/core/config/auth.js.map +0 -1
  56. package/dist/core/config/constants.d.ts +0 -4
  57. package/dist/core/config/constants.d.ts.map +0 -1
  58. package/dist/core/config/constants.js +0 -6
  59. package/dist/core/config/constants.js.map +0 -1
  60. package/dist/core/config/index.d.ts +0 -3
  61. package/dist/core/config/index.d.ts.map +0 -1
  62. package/dist/core/config/index.js +0 -3
  63. package/dist/core/config/index.js.map +0 -1
  64. package/dist/core/index.d.ts +0 -4
  65. package/dist/core/index.d.ts.map +0 -1
  66. package/dist/core/index.js +0 -4
  67. package/dist/core/index.js.map +0 -1
  68. package/dist/core/schemas/auth.d.ts +0 -8
  69. package/dist/core/schemas/auth.d.ts.map +0 -1
  70. package/dist/core/schemas/auth.js +0 -7
  71. package/dist/core/schemas/auth.js.map +0 -1
  72. package/dist/core/schemas/index.d.ts +0 -2
  73. package/dist/core/schemas/index.d.ts.map +0 -1
  74. package/dist/core/schemas/index.js +0 -2
  75. package/dist/core/schemas/index.js.map +0 -1
  76. package/dist/core/utils/fs.d.ts +0 -5
  77. package/dist/core/utils/fs.d.ts.map +0 -1
  78. package/dist/core/utils/fs.js +0 -46
  79. package/dist/core/utils/fs.js.map +0 -1
  80. package/dist/core/utils/index.d.ts +0 -2
  81. package/dist/core/utils/index.d.ts.map +0 -1
  82. package/dist/core/utils/index.js +0 -2
  83. package/dist/core/utils/index.js.map +0 -1
@@ -0,0 +1,41 @@
1
+ # Todo App
2
+
3
+ A simple todo list app built with React and Base44 backend.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ base44/ # Backend configuration
9
+ ├── config.jsonc # Project settings
10
+ └── entities/ # Data schemas
11
+ └── task.jsonc # Task entity
12
+
13
+ src/ # Frontend code
14
+ ├── App.jsx # Main todo app
15
+ ├── api/ # Base44 client
16
+ ├── components/ui/ # UI components
17
+ └── lib/ # Utilities
18
+ ```
19
+
20
+ ## Development
21
+
22
+ ```bash
23
+ npm install
24
+ npm run dev
25
+ ```
26
+
27
+ ## Commands
28
+
29
+ | Command | Description |
30
+ |---------|-------------|
31
+ | `npm run dev` | Start dev server |
32
+ | `npm run build` | Build for production |
33
+ | `npm run preview` | Preview production build |
34
+
35
+ ## Base44 CLI
36
+
37
+ ```bash
38
+ base44 login # Authenticate
39
+ base44 entities push # Push entity schemas
40
+ base44 deploy # Deploy backend + hosting
41
+ ```
@@ -0,0 +1,17 @@
1
+ // Base44 Project Configuration
2
+ // JSONC enables inline documentation and discoverability directly in config files.
3
+ // Full-stack template with backend and client configuration.
4
+
5
+ {
6
+ "name": "<%= name %>"<% if (description) { %>,
7
+ "description": "<%= description %>"<% } %>,
8
+
9
+ // Site/hosting configuration for the client application
10
+ // Docs: https://docs.base44.com/configuration/hosting
11
+ "site": {
12
+ "buildCommand": "npm run build",
13
+ "serveCommand": "npm run dev",
14
+ "outputDirectory": "./dist",
15
+ "installCommand": "npm ci"
16
+ }
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "Task",
3
+ "type": "object",
4
+ "properties": {
5
+ "title": {
6
+ "type": "string",
7
+ "description": "Task title"
8
+ },
9
+ "completed": {
10
+ "type": "boolean",
11
+ "default": false,
12
+ "description": "Whether the task is completed"
13
+ }
14
+ },
15
+ "required": ["title"]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": false,
6
+ "tailwind": {
7
+ "config": "tailwind.config.js",
8
+ "css": "src/index.css",
9
+ "baseColor": "slate",
10
+ "cssVariables": true
11
+ },
12
+ "aliases": {
13
+ "components": "@/components",
14
+ "ui": "@/components/ui"
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="https://base44.com/logo_v2.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Todo App</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.jsx"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "@/*": ["./src/*"]
6
+ },
7
+ "jsx": "react-jsx",
8
+ "module": "esnext",
9
+ "moduleResolution": "bundler",
10
+ "target": "esnext"
11
+ },
12
+ "include": ["src"]
13
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "base44-app",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "@base44/sdk": "^0.8.3",
13
+ "lucide-react": "^0.475.0",
14
+ "react": "^18.2.0",
15
+ "react-dom": "^18.2.0"
16
+ },
17
+ "devDependencies": {
18
+ "@vitejs/plugin-react": "^4.3.4",
19
+ "autoprefixer": "^10.4.20",
20
+ "postcss": "^8.5.3",
21
+ "tailwindcss": "^3.4.17",
22
+ "vite": "^6.1.0"
23
+ }
24
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -0,0 +1,148 @@
1
+ import { useState, useEffect } from "react";
2
+ import { base44 } from "@/api/base44Client";
3
+ import { Button } from "@/components/ui/button";
4
+ import { Checkbox } from "@/components/ui/checkbox";
5
+ import { Input } from "@/components/ui/input";
6
+ import { Base44Logo } from "@/components/Base44Logo";
7
+ import { Plus, Trash2, CheckCircle2 } from "lucide-react";
8
+
9
+ const Task = base44.entities.Task;
10
+
11
+ export default function App() {
12
+ const [tasks, setTasks] = useState([]);
13
+ const [newTaskTitle, setNewTaskTitle] = useState("");
14
+ const [isLoading, setIsLoading] = useState(true);
15
+
16
+ const fetchTasks = async () => {
17
+ const data = await Task.list();
18
+ setTasks(data);
19
+ setIsLoading(false);
20
+ };
21
+
22
+ useEffect(() => {
23
+ fetchTasks();
24
+ }, []);
25
+
26
+ const handleSubmit = async (e) => {
27
+ e.preventDefault();
28
+ if (!newTaskTitle.trim()) return;
29
+ await Task.create({ title: newTaskTitle.trim(), completed: false });
30
+ setNewTaskTitle("");
31
+ fetchTasks();
32
+ };
33
+
34
+ const toggleTask = async (id, completed) => {
35
+ await Task.update(id, { completed });
36
+ fetchTasks();
37
+ };
38
+
39
+ const deleteTask = async (id) => {
40
+ await Task.delete(id);
41
+ fetchTasks();
42
+ };
43
+
44
+ const clearCompleted = async () => {
45
+ await Promise.all(
46
+ tasks.filter((t) => t.completed).map((t) => Task.delete(t.id))
47
+ );
48
+ fetchTasks();
49
+ };
50
+
51
+ const completedCount = tasks.filter((t) => t.completed).length;
52
+ const totalCount = tasks.length;
53
+
54
+ return (
55
+ <div className="min-h-screen bg-gradient-to-br from-slate-50 via-white to-orange-50/30">
56
+ <div className="max-w-lg mx-auto px-6 py-16">
57
+ {/* Header */}
58
+ <div className="text-center mb-12">
59
+ <h1 className="text-3xl font-semibold text-slate-900 tracking-tight">
60
+ <span className="inline-flex items-center gap-2 align-middle">
61
+ <Base44Logo className="w-9 h-9" />
62
+ <span className="font-bold">Base44</span>
63
+ <span>Tasks</span>
64
+ </span>
65
+ </h1>
66
+ {totalCount > 0 && (
67
+ <p className="text-slate-500 mt-2 text-sm">
68
+ {completedCount} of {totalCount} completed
69
+ </p>
70
+ )}
71
+ </div>
72
+
73
+ {/* Add Task Form */}
74
+ <form onSubmit={handleSubmit} className="mb-8">
75
+ <div className="flex gap-3">
76
+ <Input
77
+ type="text"
78
+ value={newTaskTitle}
79
+ onChange={(e) => setNewTaskTitle(e.target.value)}
80
+ placeholder="What needs to be done?"
81
+ className="flex-1 h-12 bg-white border-slate-200 rounded-xl shadow-sm"
82
+ />
83
+ <Button
84
+ type="submit"
85
+ disabled={!newTaskTitle.trim()}
86
+ className="h-12 px-5 rounded-xl bg-slate-900 hover:bg-slate-800 shadow-sm"
87
+ >
88
+ <Plus className="w-5 h-5" />
89
+ </Button>
90
+ </div>
91
+ </form>
92
+
93
+ {/* Task List */}
94
+ <div className="space-y-2">
95
+ {isLoading ? (
96
+ <div className="flex items-center justify-center py-12">
97
+ <div className="w-6 h-6 border-2 border-slate-200 border-t-orange-500 rounded-full animate-spin" />
98
+ </div>
99
+ ) : tasks.length === 0 ? (
100
+ <div className="text-center py-12">
101
+ <p className="text-slate-400">No tasks yet. Add one above!</p>
102
+ </div>
103
+ ) : (
104
+ tasks.map((task) => (
105
+ <div
106
+ key={task.id}
107
+ className="group flex items-center gap-4 p-4 bg-white rounded-xl border border-slate-100 shadow-sm hover:shadow-md transition-all duration-200"
108
+ >
109
+ <Checkbox
110
+ checked={task.completed}
111
+ onCheckedChange={(checked) => toggleTask(task.id, checked)}
112
+ className="w-5 h-5 rounded-md border-slate-300 data-[state=checked]:bg-orange-500 data-[state=checked]:border-orange-500"
113
+ />
114
+ <span
115
+ className={`flex-1 text-slate-700 transition-all ${
116
+ task.completed ? "line-through text-slate-400" : ""
117
+ }`}
118
+ >
119
+ {task.title}
120
+ </span>
121
+ <Button
122
+ variant="ghost"
123
+ size="icon"
124
+ onClick={() => deleteTask(task.id)}
125
+ className="opacity-0 group-hover:opacity-100 h-8 w-8 text-slate-400 hover:text-red-500 hover:bg-red-50 transition-all"
126
+ >
127
+ <Trash2 className="w-4 h-4" />
128
+ </Button>
129
+ </div>
130
+ ))
131
+ )}
132
+ </div>
133
+
134
+ {/* Footer */}
135
+ {completedCount > 0 && (
136
+ <div className="mt-8 text-center">
137
+ <button
138
+ onClick={clearCompleted}
139
+ className="text-sm text-slate-400 hover:text-slate-600 transition-colors"
140
+ >
141
+ Clear completed
142
+ </button>
143
+ </div>
144
+ )}
145
+ </div>
146
+ </div>
147
+ );
148
+ }
@@ -0,0 +1,5 @@
1
+ import { createClient } from '@base44/sdk';
2
+
3
+ export const base44 = createClient({
4
+ appId: '<%= projectId %>',
5
+ });
@@ -0,0 +1,15 @@
1
+ export function Base44Logo({ className = "w-8 h-8" }) {
2
+ return (
3
+ <svg
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ fill="none"
6
+ viewBox="0 0 31 31"
7
+ className={className}
8
+ >
9
+ <path
10
+ fill="#FF631F"
11
+ d="M24.16 26.904c.04 0 .057.05.026.075a14.97 14.97 0 0 1-9.147 3.1c-3.44 0-6.612-1.156-9.146-3.1-.032-.024-.014-.075.026-.075zm3.923-4.373a15 15 0 0 1-1.842 2.544.14.14 0 0 1-.104.046H3.942a.14.14 0 0 1-.104-.046 15 15 0 0 1-1.842-2.544.056.056 0 0 1 .049-.083h25.99c.043 0 .07.046.048.083m1.698-4.5a15 15 0 0 1-.762 2.564.11.11 0 0 1-.103.07H1.163a.11.11 0 0 1-.104-.07 15 15 0 0 1-.762-2.564.056.056 0 0 1 .055-.067h29.375c.035 0 .061.032.054.067M14.938 0C23.29-.056 30.078 6.7 30.078 15.04q0 .55-.038 1.09a.056.056 0 0 1-.056.051H.094a.056.056 0 0 1-.055-.052A15 15 0 0 1 0 15.054C-.007 6.87 6.755.055 14.938 0"
12
+ ></path>
13
+ </svg>
14
+ );
15
+ }
@@ -0,0 +1,23 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ const Button = forwardRef(({ className = '', variant, size, ...props }, ref) => {
4
+ const baseStyles = 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50';
5
+
6
+ const variantStyles = variant === 'ghost'
7
+ ? 'hover:bg-slate-100'
8
+ : 'bg-slate-900 text-white shadow hover:bg-slate-800';
9
+
10
+ const sizeStyles = size === 'icon' ? 'h-9 w-9' : 'h-9 px-4 py-2';
11
+
12
+ return (
13
+ <button
14
+ ref={ref}
15
+ className={`${baseStyles} ${variantStyles} ${sizeStyles} ${className}`}
16
+ {...props}
17
+ />
18
+ );
19
+ });
20
+
21
+ Button.displayName = 'Button';
22
+
23
+ export { Button };
@@ -0,0 +1,20 @@
1
+ import { forwardRef } from 'react';
2
+ import { Check } from 'lucide-react';
3
+
4
+ const Checkbox = forwardRef(({ className = '', checked, onCheckedChange, ...props }, ref) => (
5
+ <button
6
+ ref={ref}
7
+ type="button"
8
+ role="checkbox"
9
+ aria-checked={checked}
10
+ onClick={() => onCheckedChange?.(!checked)}
11
+ className={`h-4 w-4 shrink-0 rounded-sm border border-slate-300 shadow-sm flex items-center justify-center focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-400 disabled:cursor-not-allowed disabled:opacity-50 ${checked ? 'bg-slate-900 text-white border-slate-900' : 'bg-white'} ${className}`}
12
+ {...props}
13
+ >
14
+ {checked && <Check className="h-3 w-3" />}
15
+ </button>
16
+ ));
17
+
18
+ Checkbox.displayName = 'Checkbox';
19
+
20
+ export { Checkbox };
@@ -0,0 +1,13 @@
1
+ import { forwardRef } from 'react';
2
+
3
+ const Input = forwardRef(({ className = '', ...props }, ref) => (
4
+ <input
5
+ ref={ref}
6
+ className={`flex h-9 w-full rounded-md border border-slate-200 bg-white px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-slate-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-400 disabled:cursor-not-allowed disabled:opacity-50 ${className}`}
7
+ {...props}
8
+ />
9
+ ));
10
+
11
+ Input.displayName = 'Input';
12
+
13
+ export { Input };
@@ -0,0 +1,37 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ --background: 0 0% 100%;
8
+ --foreground: 222.2 84% 4.9%;
9
+ --card: 0 0% 100%;
10
+ --card-foreground: 222.2 84% 4.9%;
11
+ --popover: 0 0% 100%;
12
+ --popover-foreground: 222.2 84% 4.9%;
13
+ --primary: 222.2 47.4% 11.2%;
14
+ --primary-foreground: 210 40% 98%;
15
+ --secondary: 210 40% 96.1%;
16
+ --secondary-foreground: 222.2 47.4% 11.2%;
17
+ --muted: 210 40% 96.1%;
18
+ --muted-foreground: 215.4 16.3% 46.9%;
19
+ --accent: 210 40% 96.1%;
20
+ --accent-foreground: 222.2 47.4% 11.2%;
21
+ --destructive: 0 84.2% 60.2%;
22
+ --destructive-foreground: 210 40% 98%;
23
+ --border: 214.3 31.8% 91.4%;
24
+ --input: 214.3 31.8% 91.4%;
25
+ --ring: 222.2 84% 4.9%;
26
+ --radius: 0.5rem;
27
+ }
28
+ }
29
+
30
+ @layer base {
31
+ * {
32
+ @apply border-border;
33
+ }
34
+ body {
35
+ @apply bg-background text-foreground antialiased;
36
+ }
37
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import App from '@/App.jsx';
4
+ import '@/index.css';
5
+
6
+ ReactDOM.createRoot(document.getElementById('root')).render(<App />);
@@ -0,0 +1,41 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./index.html', './src/**/*.{js,jsx}'],
4
+ theme: {
5
+ extend: {
6
+ borderRadius: {
7
+ lg: 'var(--radius)',
8
+ md: 'calc(var(--radius) - 2px)',
9
+ sm: 'calc(var(--radius) - 4px)',
10
+ },
11
+ colors: {
12
+ background: 'hsl(var(--background))',
13
+ foreground: 'hsl(var(--foreground))',
14
+ primary: {
15
+ DEFAULT: 'hsl(var(--primary))',
16
+ foreground: 'hsl(var(--primary-foreground))',
17
+ },
18
+ secondary: {
19
+ DEFAULT: 'hsl(var(--secondary))',
20
+ foreground: 'hsl(var(--secondary-foreground))',
21
+ },
22
+ muted: {
23
+ DEFAULT: 'hsl(var(--muted))',
24
+ foreground: 'hsl(var(--muted-foreground))',
25
+ },
26
+ accent: {
27
+ DEFAULT: 'hsl(var(--accent))',
28
+ foreground: 'hsl(var(--accent-foreground))',
29
+ },
30
+ destructive: {
31
+ DEFAULT: 'hsl(var(--destructive))',
32
+ foreground: 'hsl(var(--destructive-foreground))',
33
+ },
34
+ border: 'hsl(var(--border))',
35
+ input: 'hsl(var(--input))',
36
+ ring: 'hsl(var(--ring))',
37
+ },
38
+ },
39
+ },
40
+ plugins: [],
41
+ };
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import path from 'path';
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ '@': path.resolve(__dirname, './src'),
10
+ },
11
+ },
12
+ });
@@ -0,0 +1,6 @@
1
+ # Base44 Project Environment Variables
2
+ # This file contains environment-specific configuration for your Base44 project.
3
+ # Do not commit this file to version control if it contains sensitive data.
4
+
5
+ # Your Base44 Application ID
6
+ BASE44_CLIENT_ID=<%= projectId %>
@@ -0,0 +1,17 @@
1
+ // Base44 Project Configuration
2
+ // JSONC enables inline documentation and discoverability directly in config files.
3
+ // Commented-out properties show available options you can enable.
4
+
5
+ {
6
+ "name": "<%= name %>"<% if (description) { %>,
7
+ "description": "<%= description %>"<% } %>
8
+
9
+ // Site/hosting configuration
10
+ // Docs: https://docs.base44.com/configuration/hosting
11
+ // "site": {
12
+ // "buildCommand": "npm run build",
13
+ // "serveCommand": "npm run dev",
14
+ // "outputDirectory": "./dist",
15
+ // "installCommand": "npm ci"
16
+ // }
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "templates": [
3
+ {
4
+ "id": "backend-only",
5
+ "name": "Backend Only",
6
+ "description": "Create a Base44 backend project with entities, functions, and APIs",
7
+ "path": "backend-only"
8
+ },
9
+ {
10
+ "id": "backend-and-client",
11
+ "name": "Backend & Client",
12
+ "description": "Full-stack project with Base44 backend, Vite and a React client application",
13
+ "path": "backend-and-client"
14
+ }
15
+ ]
16
+ }
package/package.json CHANGED
@@ -1,26 +1,25 @@
1
1
  {
2
2
  "name": "base44",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "main": "./dist/cli/index.js",
7
- "types": "./dist/cli/index.d.ts",
8
7
  "bin": "./dist/cli/index.js",
9
8
  "exports": {
10
- ".": {
11
- "types": "./dist/cli/index.d.ts",
12
- "default": "./dist/cli/index.js"
13
- }
9
+ ".": "./dist/cli/index.js"
14
10
  },
15
11
  "files": [
16
12
  "dist"
17
13
  ],
18
14
  "scripts": {
19
- "build": "tsc",
15
+ "build": "tsdown",
16
+ "typecheck": "tsc --noEmit",
20
17
  "dev": "tsx src/cli/index.ts",
21
18
  "start": "node dist/cli/index.js",
22
19
  "clean": "rm -rf dist",
23
- "lint": "eslint src"
20
+ "lint": "eslint src",
21
+ "test": "vitest run",
22
+ "test:watch": "vitest"
24
23
  },
25
24
  "keywords": [
26
25
  "base44",
@@ -29,22 +28,38 @@
29
28
  ],
30
29
  "author": "",
31
30
  "license": "ISC",
32
- "dependencies": {
33
- "@clack/prompts": "^0.11.0",
34
- "chalk": "^5.6.2",
35
- "commander": "^12.1.0",
36
- "zod": "^4.3.5"
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/base44/cli"
37
34
  },
38
35
  "devDependencies": {
36
+ "@clack/prompts": "^0.11.0",
37
+ "@stylistic/eslint-plugin": "^5.6.1",
38
+ "@types/ejs": "^3.1.5",
39
+ "@types/lodash.kebabcase": "^4.1.9",
39
40
  "@types/node": "^22.10.5",
40
41
  "@typescript-eslint/eslint-plugin": "^8.51.0",
41
42
  "@typescript-eslint/parser": "^8.51.0",
43
+ "chalk": "^5.6.2",
44
+ "commander": "^12.1.0",
45
+ "dotenv": "^17.2.3",
46
+ "ejs": "^3.1.10",
42
47
  "eslint": "^9.39.2",
43
48
  "eslint-plugin-import": "^2.32.0",
49
+ "eslint-plugin-unicorn": "^62.0.0",
50
+ "globby": "^16.1.0",
51
+ "json5": "^2.2.3",
52
+ "ky": "^1.14.2",
53
+ "lodash.kebabcase": "^4.1.1",
54
+ "p-wait-for": "^6.0.0",
55
+ "tsdown": "^0.12.4",
44
56
  "tsx": "^4.19.2",
45
- "typescript": "^5.7.2"
57
+ "typescript": "^5.7.2",
58
+ "typescript-eslint": "^8.52.0",
59
+ "vitest": "^4.0.16",
60
+ "zod": "^4.3.5"
46
61
  },
47
62
  "engines": {
48
- "node": ">=18.0.0"
63
+ "node": ">=20.19.0"
49
64
  }
50
65
  }
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare const loginCommand: Command;
3
- //# sourceMappingURL=login.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,eAAO,MAAM,YAAY,SAIrB,CAAC"}
@@ -1,25 +0,0 @@
1
- import { Command } from "commander";
2
- import { tasks } from "@clack/prompts";
3
- import { writeAuth } from "../../../core/config/auth.js";
4
- import { runCommand } from "../../utils/index.js";
5
- async function login() {
6
- await tasks([
7
- {
8
- title: "Logging you in",
9
- task: async () => {
10
- await writeAuth({
11
- token: "stub-token-12345",
12
- email: "valid@email.com",
13
- name: "KfirStri",
14
- });
15
- return "Logged in as KfirStri";
16
- },
17
- },
18
- ]);
19
- }
20
- export const loginCommand = new Command("login")
21
- .description("Authenticate with Base44")
22
- .action(async () => {
23
- await runCommand(login);
24
- });
25
- //# sourceMappingURL=login.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,KAAK,UAAU,KAAK;IAClB,MAAM,KAAK,CAAC;QACV;YACE,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,KAAK,IAAI,EAAE;gBACf,MAAM,SAAS,CAAC;oBACd,KAAK,EAAE,kBAAkB;oBACzB,KAAK,EAAE,iBAAiB;oBACxB,IAAI,EAAE,UAAU;iBACjB,CAAC,CAAC;gBAEH,OAAO,uBAAuB,CAAC;YACjC,CAAC;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KAC7C,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,UAAU,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare const logoutCommand: Command;
3
- //# sourceMappingURL=logout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,eAAO,MAAM,aAAa,SAItB,CAAC"}