@stacksjs/buddy 0.57.4 → 0.58.19

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,6 +1,6 @@
1
- ![Social Card of Stacks](./art/social.png)
1
+ ![Social Card of Stacks](./art/social.jpg)
2
2
 
3
- # Rapid App Development
3
+ # Rapid App & Library Development
4
4
 
5
5
  [![npm version][npm-version-src]][npm-version-href]
6
6
  [![GitHub Actions][github-actions-src]][github-actions-href]
@@ -8,9 +8,9 @@
8
8
  [![npm downloads][npm-downloads-src]][npm-downloads-href]
9
9
  <!-- [![Codecov][codecov-src]][codecov-href] -->
10
10
 
11
- _Beta coming soon._
11
+ _Open Beta coming soon._
12
12
 
13
- The goal of the framework is to _help you_ create & maintain frontends, backends, and clouds—without having to worry about the boilerplate. Stacks is a rapid application development framework, meeting all your full stack needs.
13
+ The goal of the framework is to _help you_ create & maintain frontends, backends, and clouds—without having to worry about the boilerplate. Stacks is a rapid development framework, meeting all your full stack needs.
14
14
 
15
15
  - Web & Desktop applications
16
16
  - Serverless & traditional APIs
@@ -23,32 +23,33 @@ Stacks helps you every step along the way—in beginner & expert-friendly ways,
23
23
 
24
24
  > “Convention over configuration” is the Stacks mantra. _- Chris_
25
25
 
26
- <!-- ![Atomic UI & FX Design](./docs/images/diagram.png) -->
26
+ <!-- ![Atomic UI & FX Design](./docs/assets/diagram.png) -->
27
27
 
28
28
  ## Features
29
29
 
30
30
  The Stacks framework is a harmony of several “engines” to build any web and/or desktop application, in highly scalable & privacy-friendly ways. It consists of the following engines:
31
31
 
32
- ### Stacks UI
32
+ ### Stacks Frontend
33
33
 
34
34
  _Develop dynamic UIs with helpers for atomic design, and much more._
35
35
 
36
- - 🧩 **Components** _a primitive to develop user interfaces_
37
- - 🤖 **Functions** _a primitive to develop business logic (and grant your UI superpowers)_
38
- - 🌐 **Web** _"a routing & templating engine that makes sense" using components—SSG & PWA ready_
39
- - 🖥️ **Desktop** _components as desktop elements_
36
+ - 🧩 **Components** _primitive to develop user interfaces_
37
+ - 🤖 **Functions** _primitive to develop business logic (and grant your UI superpowers)_
38
+ - 🎨 **UI Kit** _modern & deeply-integrated components_
39
+ - 🌐 **Web** _“a routing & templating engine that makes sense”_
40
+ - 🖥️ **Desktop** _automagically build a desktop app out of your web app_
40
41
  - 📚 **Library** _auto-builds component & function libraries_
41
- - ⚡️ Powered by Nitro, Tauri, UnoCSS, Vite & Vue
42
+ - ⚡️ Powered by Bun, Nitro, Tauri, UnoCSS, Vite & Vue
42
43
 
43
- ### Stacks Functions
44
+ ### Stacks Backend
44
45
 
45
46
  _Develop serverless (or server) functions with countless helpers to build scalable & fast APIs._
46
47
 
47
- - 🪄 **AI** _deep OpenAI integration_
48
+ - 🪄 **AI** _deep AI integrations & foundational model access_
48
49
  - 🤖 **APIs** _scalability & maintainability built-in_
49
- - 🏎️ **Cache** _Redis, DynamoDB, Upstash, SingleStore, and more—serverless_
50
+ - 🏎️ **Cache** _Redis, DynamoDB, and more—serverless_
50
51
  - ⚙️ **CLIs** _create beautiful CLIs for Linux, Windows, and Mac—without requirements_
51
- - 📀 **Database** _MySQL, Postgres, PlanetScale, Supabase, Prisma, ..._
52
+ - 📀 **Database** _SQLite, MySQL, Postgres, PlanetScale, and more_
52
53
  - 👾 **Errors** _native type-safe error handling_
53
54
  - 🗓️ **Events** _functional event (front & backend) communication_
54
55
  - 📢 **Notifications** _emails, SMSs, direct, and push notifications & webhooks_
@@ -59,7 +60,7 @@ _Develop serverless (or server) functions with countless helpers to build scalab
59
60
  - 💬 **Realtime** _“everything you need to build dynamic real-time apps”_
60
61
  - 🧭 **Router** _smart routing, file-based or Laravel-like_
61
62
  - 🔎 **Search Engine** _smart searching, advanced filtering & sorting, pagination, headless UI_
62
- - 💾 **Storage** _easily create & make use of local & remote storages/file systems_
63
+ - 💾 **Storage** _a secure-by-default File API that feels right_
63
64
  - 🧪 **Tinker** _a powerful TypeScript REPL_
64
65
  - 🌪️ **Validation** _e2e type-safety (true frontend & backend harmony)_
65
66
  - 🎯 **X-Ray** _all you need to debug, log & analyze_
@@ -68,20 +69,22 @@ _Develop serverless (or server) functions with countless helpers to build scalab
68
69
 
69
70
  _Create your personal or professional Vercel-like cloud, based on MIT-licensed OSS._
70
71
 
71
- - ☁️ **Server** _local development server & production-ready servers_
72
+ - ☁️ **Server** _local development server & production-ready servers out-of-the-box_
72
73
  - ⛅️ **Serverless** _on-demand, auto-scaling, zero maintenance_
73
- - 🚏 **CDN** _zero-config low-latency CDN, including request life-cycle hooks & optimized request compressions (Brotli & gzip)_
74
+ - 🚏 **CDN** _zero-config, low-latency CDN, including request life-cycle hooks & optimized request compressions (Brotli & gzip)_
74
75
  - 🔀 **Domain** _version-controlled & zero-config domain management (e.g. DNS management)_
75
- - 📧 **Email** _secure & simplistic easy-peasy@custom-domains.com mail_
76
+ - 🤖 **AI** _fine-tune a foundational model using your application data_
77
+ - 📧 **Email** _secure & simplistic <easy-peasy@custom-domains.com> mailboxes_
76
78
  - 🔐 **Firewall** _native web application firewall support_
79
+ - 📦 **Storage** _unlimited cloud storage & automatic backups_
77
80
  - 🚜 **Maintenance** _maintain your cloud infrastructure with ease using Buddy & Stacks_
78
- - 🤖 **Infrastructure as Code** _version-controlled cloud infrastructure_
81
+ - 🚦 **Infrastructure as Code** _version-controlled cloud infrastructure_
79
82
 
80
83
  ### Stacks CI/CD
81
84
 
82
85
  _Focus on coding, not publishing._
83
86
 
84
- - 🚀 **Deployment Manager** _take the sweat out of production deployments (AWS, Vercel, Netlify, and more)_
87
+ - 🚀 **Deployment Manager** _take the sweat out of production deployments (AWS, Google next?)_
85
88
  - 📫 **Release Manager** _libraries (component & function) auto-published to npm, git helpers, and more_
86
89
 
87
90
  ### Stacks DX
@@ -90,14 +93,15 @@ _Enhanced productivity for developers. No more creating boilerplate._
90
93
 
91
94
  - 💡 **IDE Integration** _auto-completions, inline docs & a powerful VS Code setup_
92
95
  - 🪄 **Zero-Config** _yet highly configurable—convention over configuration_
93
- - 👩🏽‍🔧 **Linter & Formatter** _auto-configured & built into your IDE_
96
+ - 💅 **Linter & Formatter** _auto-configured & built into your IDE_
94
97
  - 💪🏼 **Type Strong** _built-in e2e type-safety_
95
98
  - ✨ **Git Workflows** _committing with ease_
96
99
  - 🚗 **Auto Imports** _your components & functions, including date, string, array, & object helpers_
97
100
  - ⏩ **Code Snippets** _say goodbye to the boilerplate—thank you Sarah Drasner_
98
101
  - 🔤 **Spell Checker** _be notified once there are typos_
99
102
  - 🛠️ **Utilities** _Collections, VueUse, and more_
100
- - 🧪 **Testing** _unit & e2e tests powered by Vitest & Playwright_
103
+ - 👥 **Team Management** _manage your team & their permissions_
104
+ - 🧪 **Testing** _unit & e2e tests powered by Bun & Playwright_
101
105
 
102
106
  No matter whether you are a beginner or an expert, the approachable Stacks design allows you to learn at your own pace, using our thorough documentation covering every aspect of the framework. Stacks is extremely beginner & expert-friendly.
103
107
 
@@ -110,16 +114,18 @@ Develop beautiful, reactive, composable UIs without learning a new set of langua
110
114
  It's incredibly easy to get started with this framework. Simply run the following command in your terminal:
111
115
 
112
116
  ```bash
113
- sh <(curl stacksjs.dev) my-project
117
+ sh <(curl stacksjs.org) my-project
114
118
 
115
- # alternatively, if Node.js >= v18.16 is installed already,
119
+ # alternatively, if Bun >= v1.0 is installed already,
116
120
  # you may also get started via:
117
- npx stacks new my-project
121
+ bunx stacks new my-project
118
122
  ```
119
123
 
120
124
  ## 🤖 Usage
121
125
 
122
- The following list includes some of the most common ways to interact with the Stacks API. Meet the toolkit, Buddy:
126
+ The following list includes some of the most common ways to interact with the Stacks API.
127
+
128
+ Meet the toolkit, Buddy:
123
129
 
124
130
  ```bash
125
131
  buddy install # installs all dependencies
@@ -129,9 +135,10 @@ buddy commit # follow CLI prompts for committing changes
129
135
  buddy release # creates the releases for the stack & consequently, publishes them to npm
130
136
  buddy upgrade # auto-update all deps & the Stacks framework
131
137
 
138
+ buddy make:model Car # scaffolds a model
132
139
  buddy make:component HelloWorld # scaffolds a component
133
140
  buddy make:function HelloWorld # scaffolds a function
134
- buddy make:page hello-world # scaffolds a page (https://my-project.test/hello-world)
141
+ buddy make:view hello-world # scaffolds a page (https://my-project.test/hello-world)
135
142
 
136
143
  buddy --help
137
144
  ```
@@ -150,23 +157,27 @@ buddy add # adds a stack or dependency
150
157
  buddy fresh # fresh reinstall of all deps
151
158
  buddy clean # removes all deps
152
159
 
153
- buddy upgrade # auto-upgrades deps, framework, node.js, and/or pnpm
160
+ buddy upgrade # upgrades all dependencies
161
+ buddy upgrade -i # prompts you to select which updates to apply (wip)
154
162
  buddy upgrade:dependencies # auto-upgrades deps & the Stacks framework
155
163
  buddy upgrade:framework # auto-upgrades deps & the Stacks framework
156
- buddy upgrade:package-manager # auto-upgrades deps & the Stacks framework
157
164
  buddy upgrade:search-engine # auto-upgrades configured search engine
158
- buddy upgrade:node # upgrades to latest project-defined node version
159
- buddy upgrade:all # upgrades Node, package manager, framework, dependencies
165
+ buddy upgrade:bun # upgrades to latest project-defined Bun version
166
+ buddy upgrade:all # auto-upgrades all of the above
160
167
 
161
168
  # if you need any more info on any command listed here, you may suffix
162
169
  # any of them via the "help option", i.e. `buddy ... --help`
163
170
 
164
- buddy dev # starts one of the dev servers (components, functions, views, or docs)
165
- buddy dev:components # starts local playground dev server
166
- buddy dev:desktop # starts the Desktop playground
167
- buddy dev:views # starts local playground views dev server
168
- buddy dev:functions # stubs local the functions
171
+ buddy dev # starts the frontend dev server
172
+ buddy dev -i # prompts any of the dev servers (components, functions, views, or docs)
173
+ buddy dev:api # starts the API dev server
174
+ buddy dev:admin # starts the Admin/Dashboard dev server
175
+ buddy dev:desktop # starts the Desktop dev server
176
+ buddy dev:views # starts frontend dev server
177
+ buddy dev:components # starts component dev server
178
+ buddy dev:functions # stubs functions
169
179
  buddy dev:docs # starts local docs dev server
180
+ buddy dev docs # also starts the local docs dev server (colon is optional)
170
181
  buddy development # `buddy dev` alias
171
182
 
172
183
  # for Laravel folks, `serve` may ring more familiar than the `dev` name. Hence, we aliased it:
@@ -205,16 +216,37 @@ buddy key:generate
205
216
 
206
217
  buddy make:component HelloWorld # bootstraps a HelloWorld component
207
218
  buddy make:function hello-world # bootstraps a hello-world function
208
- buddy make:page hello-world # bootstraps a hello-word page
219
+ buddy make:view hello-world # bootstraps a hello-word page
209
220
  buddy make:model Car # bootstraps a Car model
210
221
  buddy make:database cars # creates a cars database
211
222
  buddy make:migration create_cars_table # creates a cars migration file
212
223
  buddy make:factory cars # creates a Car factory file
213
224
  buddy make:seed cars # creates a Car seed file
214
- buddy make:table cars # boostraps a cars data table
225
+ buddy make:table cars # bootstraps a cars data table
215
226
  buddy make:notification welcome-email # bootstraps a welcome-email notification
216
227
  buddy make:lang de # bootstraps a lang/de.yml language file
217
- buddy make:stack my-project # shares logic with `npx stacks new my-project`
228
+ buddy make:stack my-project # shares logic with `bunx stacks new my-project`
229
+
230
+ buddy migrate # runs database migrations
231
+ buddy migrate:dns # sets the ./config/dns.ts file
232
+
233
+ buddy dns example.com # list all DNS records for example.com
234
+ buddy dns example.com --type MX # list MX records for example.com (proxies dog)
235
+
236
+ buddy https httpie.io/hello
237
+ # http [flags] [METHOD] URL [ITEM [ITEM]]
238
+ buddy http --help
239
+ buddy http PUT pie.dev/put X-API-Token:123 name=John # Custom HTTP method, HTTP headers and JSON data
240
+ buddy http -v pie.dev/get # See the request that is being sent using one of the output options
241
+ buddy http -f POST pie.dev/post hello=World # submitting forms
242
+ buddy http --offline pie.dev/post hello=offline
243
+ buddy http -a USERNAME POST https://api.github.com/repos/httpie/cli/issues/83/comments body='HTTPie is awesome! :heart:'
244
+ buddy http pie.dev/post < files/data.json
245
+ buddy http pie.dev/image/png > image.png
246
+ buddy http --download pie.dev/image/png
247
+ buddy http --session=logged-in -a username:password pie.dev/get API-Key:123
248
+ buddy http --session=logged-in pie.dev/headers
249
+ buddy http localhost:8000 Host:example.com
218
250
 
219
251
  buddy lint # runs linter
220
252
  buddy lint:fix # runs linter and fixes issues
@@ -225,10 +257,15 @@ buddy changelog # generates CHANGELOG.md
225
257
 
226
258
  # when deploying your app/s to a remote server or cloud provider
227
259
  buddy deploy # select a specific deployment (follow CLI prompts)
228
- buddy deploy:docs # deploys docs to AWS (or other configured provider)
229
- buddy deploy:functions # deploys functions to AWS (or other configured provider)
230
- buddy deploy:views # deploys views to AWS (or other configured provider)
231
- buddy deploy:all # deploys all your code
260
+ # buddy deploy:docs # deploys docs to AWS (or other configured provider)
261
+ # buddy deploy:functions # deploys functions to AWS (or other configured provider)
262
+ # buddy deploy:views # deploys views to AWS (or other configured provider)
263
+ # buddy deploy:all # deploys all your code
264
+ buddy undeploy # be careful: "undeploys" removes/deletes your deployed resources
265
+
266
+ buddy cloud:remove # removes cloud setup
267
+ buddy cloud:cleanup # removes cloud setup & cleans up all potentially leftover resources
268
+ buddy cloud:add --jump-box # adds a jump box to your cloud setup
232
269
 
233
270
  # select the example to run (follow CLI prompts)
234
271
  buddy example # prompts you to select which example to run
@@ -252,6 +289,13 @@ buddy key:generate # generates your application key
252
289
  buddy types:generate # generates types for your components, functions, & views
253
290
  buddy types:fix # auto-fixes types for your components, functions, & views
254
291
 
292
+ buddy domains # alias for `buddy domains:list`
293
+ buddy domains:add stacksjs.org # adds a domain
294
+ buddy domains:remove stacksjs.org # removes a domain
295
+ buddy domains:list # lists all domains
296
+ buddy domains:update # apply ./config/dns.ts updates
297
+ buddy domains:purchase stacksjs.org # purchase a new domain
298
+
255
299
  # test your stack
256
300
  buddy test # runs test suite (unit & e2e)
257
301
  buddy test:coverage # runs test coverage
@@ -269,83 +313,11 @@ buddy fresh
269
313
 
270
314
  Read more here about the Stacks CLI in the documentation.
271
315
 
272
- ## 📚 Utilizing the Built Libraries
273
-
274
- Because Stacks optimizes the development of easily reusable & composable component & function libraries, the primary intention is to always _keep it simple, yet configurable._
275
-
276
- By default, Stacks realizes whether your Stack includes components, functions, and/or views. Based on that determination, Stacks builds your outputs.
277
-
278
- The UI libraries that automatically get built are: a Web Component (Custom Elements) & Vue Component library.
279
-
280
- <details>
281
- <summary>Web Component usage</summary>
282
-
283
- ```bash
284
- npm install my-awesome-library
285
- ```
286
-
287
- After you installed your Stacks generated library, you can use a "Custom Element" (Web Component) in the following way:
288
-
289
- ```html
290
- <html>
291
- <body>
292
- <hello-world name="Jane Doe"></hello-world>
293
- <script src="my-awesome-library.js"></script>
294
- </body>
295
- </html>
296
- ```
297
-
298
- </details>
299
-
300
- <details>
301
- <summary>Vue 2 & 3 usage</summary>
302
-
303
- ```bash
304
- npm install my-awesome-library
305
- ```
306
-
307
- After you installed your Stacks generated library, you can use your Vue Components in the following way:
308
-
309
- ```vue
310
- <script setup lang="ts">
311
- import HelloWorld from 'my-awesome-library'
312
- </script>
313
-
314
- <template>
315
- <HelloWorld name="J Doe" />
316
- </template>
317
- ```
318
-
319
- </details>
320
-
321
- _A function library may also be automatically generated._
322
-
323
- <details>
324
- <summary>Functions usage</summary>
325
-
326
- ```bash
327
- npm install hello-world-library
328
- ```
329
-
330
- After you installed your Stacks generated library, you can use your functions in the following way:
331
-
332
- ```ts
333
- import { count, increment } from 'hello-world-fx'
334
-
335
- console.log('count is', count)
336
- increment()
337
- console.log('increased count is', count)
338
- ```
339
-
340
- </details>
341
-
342
- You may view this framework as an incredibly “useful set of frames” to assist in efficiently bootstrapping, designing, and managing component & function libraries—using industry best practices, to reach one of the broadest user bases possible.
343
-
344
316
  ## 🎯 Roadmap
345
317
 
346
318
  Part of the Stacks ecosystem are the following first-party supported stacks:
347
319
 
348
- - [Table](https://github.com/stacksjs/stacks/tree/main/.stacks/stacks/tables) (Data tables with ease)
320
+ - [Table](https://github.com/stacksjs/stacks/tree/main/storage/framework/core/stacks/tables) (Data tables with ease)
349
321
  - [Calendar](https://github.com/stacksjs/calendar) (Add to Calendar utilities—iCal, Google, and more)
350
322
  - [Command Palette](https://github.com/stacksjs/command-palette) (`⌘ + k` for the web)
351
323
  - [Date Picker](https://github.com/stacksjs/date-picker) (Beautiful, modern date picker)
@@ -353,17 +325,19 @@ Part of the Stacks ecosystem are the following first-party supported stacks:
353
325
  - [Image](https://github.com/stacksjs/image) (Modern image experience)
354
326
  - [Video](https://github.com/stacksjs/video) (Modern video experience)
355
327
  - [Audio](https://github.com/stacksjs/audio) (Modern audio experience)
356
- - [Identity](https://github.com/stacksjs/identity) (Identity providers & wallet integrations)
328
+ - [Identity](https://github.com/stacksjs/identity) (Identity providers)
357
329
  - [Digital Ownership](https://github.com/stacksjs/ownership) (Public ownership protocol integrations)
358
- - [Payments](https://github.com/stacksjs/payments) (Unified payment APIs)
330
+ - [Payments](https://github.com/stacksjs/payments) (Unified payment & wallet APIs)
359
331
  - [Governance](https://github.com/stacksjs/governance) (Powerful toolkit for democratic governance)
360
332
 
361
333
  View our detailed roadmap/s [here](https://github.com/stacksjs/stacks/projects?query=is%3Aopen), for more information. Additionally, you may find interesting stacks, information & examples over at [Awesome Stacks](https://github.com/stacksjs/awesome-stacks).
362
334
 
335
+ While we currently only fully support `us-east-1`, we are looking forward to expanding to other regions soon.
336
+
363
337
  ## 🧪 Testing
364
338
 
365
339
  ```bash
366
- pnpm test
340
+ bun test
367
341
  ```
368
342
 
369
343
  ## 📈 Changelog
@@ -382,7 +356,7 @@ For help, discussion about best practices, or any other conversation that would
382
356
 
383
357
  For casual chit-chat with others using this package:
384
358
 
385
- [Join the Stacks Discord Server](https://discord.ow3.org)
359
+ [Join the Stacks Discord Server](https://discord.gg/stacksjs)
386
360
 
387
361
  ## 📄 Sponsors
388
362
 
@@ -400,7 +374,7 @@ Many thanks to the following core technologies & people who have contributed to
400
374
 
401
375
  The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
402
376
 
403
- Made with ❤️
377
+ Made with 💙
404
378
 
405
379
  <!-- Badges -->
406
380
  [npm-version-src]: https://img.shields.io/npm/v/stacks?style=flat-square