Skip to content

Commit c630882

Browse files
committed
chore: initial commit
chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip chore: wip
0 parents  commit c630882

File tree

2,622 files changed

+277435
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,622 files changed

+277435
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/CODE_OF_CONDUCT.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <chris@stacksjs.org>. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76+
77+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78+
79+
[homepage]: https://www.contributor-covenant.org
80+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81+
[Mozilla CoC]: https://github.com/mozilla/diversity
82+
[FAQ]: https://www.contributor-covenant.org/faq
83+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Contributing
2+
3+
WIP: Updates to here are in progress.
4+
5+
First off, thank you for taking the time to contribute to the Stacks ecosystem ❤️
6+
7+
> **Note**
8+
> The likelihood is high that the repo you are working on is either a Stack or Stacks itself. In both cases, you will be exposed to a meshup of technologies, like [Vite][vite], [Tauri][tauri], [Nitro][nitro], [Vue][vue], and [Bun][bun].
9+
10+
## 💭 Knowledge
11+
12+
### TypeScript
13+
14+
It's important to note early on that these projects are written with [TypeScript][typescript]. If you're unfamiliar with it (or any strongly typed languages such as Java) then this may feel like a slight roadblock. However, there's never a truly perfect time to start learning it, so ... why not today using well-written codebases as your playground?
15+
16+
_Don't be discouraged. You will get by learning TypeScript on-the-fly as you review some of the examples within the codebase. It's easy to get started—the code is, we hope, very approachable (and readable)._
17+
18+
### Architecture
19+
20+
An understanding of the framework architecture and design will help if you're looking to contribute long-term, or if you are working on a "more complex" PR. Browse the source and read our documentation to get a better sense of how it is structured. The documentation is very thorough and can be used as your progressive guide as you're learning more about Stacks.
21+
22+
Feel free to ask any question _(Twitter, Discord, or GitHub Discussions)_, we would love to elaborate & collaborate.
23+
24+
### Stacks/Core Setup
25+
26+
Are you interested in contributing to the Stacks codebase?
27+
28+
**Working on your first Pull Request?** You can learn how from this free series [How to Contribute to an Open Source Project on GitHub][pr-beginner-series].
29+
30+
Head over to the [repository][stacks] on GitHub and click the Fork button in the top right corner. After the project has been forked, run the following commands in your terminal:
31+
32+
```bash
33+
# Replace {github-username} with your GitHub username.
34+
git clone https://github.com/{github-username}/stacks --depth=1
35+
36+
cd stacks
37+
38+
# Create a branch for your PR, replace {issue-no} with the GitHub issue number.
39+
git checkout -b issue-{issue-no}
40+
```
41+
42+
Now it'll help if we keep our `main` branch pointing at the original repository and make
43+
pull requests from the forked branch.
44+
45+
```bash
46+
# Add the original repository as a "remote" called "upstream".
47+
git remote add upstream git@github.com:stacksjs/stacks.git
48+
49+
# Fetch the git information from the remote.
50+
git fetch upstream
51+
52+
# Set your local main branch to use the upstream main branch whenever you run `git pull`.
53+
git branch --set-upstream-to=upstream/main main
54+
55+
# Run this when we want to update our version of main.
56+
git pull
57+
```
58+
59+
_You may also use GitHub Desktop or any other GUI—if that is your preference._
60+
61+
### Buddy Toolkit
62+
63+
The following list of commands is one of the most common ways to interact with the Stacks API. Meet Buddy:
64+
65+
```bash
66+
buddy install # installs all dependencies
67+
buddy dev # starts one of the dev servers (components, functions, views, desktop or docs)
68+
buddy build # follow CLI prompts to select which library (or server) to build
69+
buddy commit # follow CLI prompts for committing changes
70+
buddy release # creates the releases of the stack & consequently, publishes them (to npm)
71+
buddy upgrade # auto-update deps & the Stacks framework
72+
73+
buddy make:component HelloWorld # scaffolds a component
74+
buddy make:function HelloWorld # scaffolds a function
75+
buddy make:view hello-world # scaffolds a page (https://my-project.test/hello-world)
76+
77+
buddy help
78+
```
79+
80+
<details>
81+
<summary>View the complete Buddy Toolkit</summary>
82+
83+
```bash
84+
buddy --help # view help menu
85+
buddy install # installs your dependencies
86+
buddy fresh # fresh reinstall of all deps
87+
buddy update # auto-update deps & the Stacks framework
88+
89+
buddy --version # get the Stacks version
90+
buddy --help # view help menu
91+
92+
# if you need any more info to any command listed here, you may suffix
93+
# any of them via the "help option", i.e. `buddy command --help`
94+
95+
buddy dev # starts one of the dev servers (components, functions, views, or docs)
96+
buddy dev:components # starts local playground dev server
97+
buddy dev:desktop # starts the Desktop playground
98+
buddy dev:views # starts local playground views dev server
99+
buddy dev:functions # stubs local the functions
100+
buddy dev:docs # starts local docs dev server
101+
102+
# for Laravel folks, `serve` may ring more familiar than the `dev` name. Hence, we aliased it:
103+
buddy serve # starts one of the dev servers (components, functions, viewsviews, or docs)
104+
buddy serve:components # starts local playground dev server
105+
buddy serve:views # starts local playground views dev server
106+
buddy serve:functions # stubs local the functions
107+
buddy serve:docs # starts local docs dev server
108+
109+
# sets your application key
110+
buddy key:generate
111+
112+
buddy make:stack project
113+
buddy make:component HelloWorld
114+
buddy make:function hello-world
115+
buddy make:view hello-world
116+
buddy make:lang de
117+
buddy make:database cars
118+
buddy make:table brands
119+
buddy make:migration create_cars_table
120+
buddy make:factory cars
121+
122+
buddy lint # runs linter
123+
buddy lint:fix # runs linter and fixes issues
124+
125+
buddy commit # follow CLI prompts for committing staged changes
126+
buddy release # creates the releases for the stack & triggers the Release Action (workflow)
127+
buddy changelog # generates CHANGELOG.md
128+
129+
# building for production (e.g. npm, Vercel, Netlify, et al.)
130+
buddy build # select a specific build (follow CLI prompts)
131+
buddy build:components # builds Vue component library & Web Component library
132+
buddy build:functions # builds function library
133+
buddy build:vue-components # builds Vue 2 & 3-ready Component library
134+
buddy build:web-components # builds framework agnostic Web Component library (i.e. Custom Elements)
135+
buddy build:views # builds views
136+
137+
# when deploying your app/s
138+
buddy deploy:docs
139+
buddy deploy:functions
140+
buddy deploy:views
141+
142+
# select the example to run (follow CLI prompts)
143+
buddy example
144+
145+
# test your stack
146+
buddy test # runs test suite (unit & e2e)
147+
buddy test:coverage # runs test coverage
148+
buddy test:types # runs typecheck
149+
```
150+
151+
</details>
152+
153+
## 🧪 Testing
154+
155+
All the framework tests are stored within the `./storage/framework/tests` project folder. When adding or updating functionality, please ensure it is covered through our test suite. Ensure so by running `buddy test`.
156+
157+
When working on an individual Stack, tests are stored within the `./tests` project folder & it is recommended to write tests (when useful). Bu
158+
159+
## ✍️ Commit
160+
161+
Stacks uses [semantic commit messages][semantic-commit-style] to automate package releases. No worries, you may not be aware what this is or how it works—just let Buddy guide you. Stacks automated the commit process for you, simply run `buddy commit` in your terminal and follow the instructions.
162+
163+
For example,
164+
165+
```bash
166+
# Add all changes to staging to be committed.
167+
git add .
168+
169+
# Commit changes.
170+
buddy commit
171+
172+
# Push changes up to GitHub.
173+
git push
174+
```
175+
176+
_By following these minor steps, Stacks is able to automatically release new versions & generate relating local & remote changelogs._
177+
178+
## 🎉 Pull Request
179+
180+
When you're all done, head over to the [repository][stacks], and click the big green `Compare & Pull Request` button that should appear after you've pushed changes to your fork.
181+
182+
Don't expect your PR to be accepted immediately or even accepted at all. Give the community time to vet it and see if it should be merged. Please don't be disheartened if it’s not accepted. Your contribution is appreciated more than you can imagine, and even a unmerged PR can teach us a lot ❤️
183+
184+
[typescript]: https://www.typescriptlang.org
185+
[vue]: https://vuejs.org/
186+
[vite]: https://vitejs.dev/
187+
[tauri]: https://tauri.app/
188+
[nitro]: https://nitro.unjs.io/
189+
[bun]: https://bun.sh/
190+
[stacks]: https://github.com/stacksjs/stacks
191+
[semantic-commit-style]: https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716
192+
[pr-beginner-series]: https://app.egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github

.github/EXPLANATIONS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# CI/CD Configurations
2+
3+
This folder contains GitHub configurations for the project, including the following features:
4+
5+
- GitHub Actions (./workflows)
6+
- [CI][CI] - all CI jobs for the project
7+
- Lints the code
8+
- `typecheck`s the code
9+
- Auto fixes & applies code style updates via a PR
10+
- Runs tests (unit & end-to-end)
11+
- Runs on `ubuntu-latest` with `bun-versions` set to `[x]`
12+
- [Release][Release] - automates the release process & changelog generation
13+
- [Stale][Stale] - Automates managing stale GitHub issues
14+
- Renovate
15+
- automatically updates all the dependencies listed in all package.json files throughout the monorepo
16+
17+
Aside from these implemented features, this folder also contains the issue templates used to create new GitHub issues.
18+
19+
## 🚜 Contributing
20+
21+
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
22+
23+
## 🏝 Community
24+
25+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
26+
27+
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
28+
29+
For casual chit-chat with others using this package:
30+
31+
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
32+
33+
## 📄 License
34+
35+
The MIT License (MIT). Please see [LICENSE](../LICENSE.md) for more information.
36+
37+
Made with 💙
38+
39+
[CI]: ./workflows/ci.yml
40+
[Release]: ./workflows/release.yml
41+
[Stale]: ./stale.yml

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [stacksjs, chrisbbreuer]
2+
open_collective: stacksjs
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 🐞 Bug report
2+
description: Report an issue
3+
labels: [pending triage]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
id: bug-description
11+
attributes:
12+
label: Describe the bug
13+
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
14+
placeholder: Bug description
15+
validations:
16+
required: true
17+
- type: input
18+
id: reproduction
19+
attributes:
20+
label: Reproduction
21+
description: A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is **required**, otherwise the issue might be closed without further notice. [**Why & How?**](https://antfu.me/posts/why-reproductions-are-required)
22+
placeholder: Reproduction
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: system-info
27+
attributes:
28+
label: System Info
29+
description: Output of `bunx envinfo --system --binaries --browsers`
30+
render: Shell
31+
placeholder: System, Binaries, Browsers
32+
validations:
33+
required: true
34+
- type: checkboxes
35+
id: checkboxes
36+
attributes:
37+
label: Validations
38+
description: Before submitting the issue, please make sure you do the following
39+
options:
40+
- label: Follow our [Code of Conduct](https://github.com/stacksjs/.github/blob/main/CODE_OF_CONDUCT.md)
41+
required: true
42+
- label: Read the [Contributing Guide](https://github.com/stacksjs/contributing).
43+
required: true
44+
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
45+
required: true
46+
- label: Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
47+
required: true
48+
- label: The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
49+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
contact_links:
2+
- name: 🙌 Contribution Guide
3+
url: https://github.com/stacksjs/contribute
4+
about: Please read through before making contributions.
5+
- name: 💬 Stacks Discord Server
6+
url: https://discord.gg/stacksjs/
7+
about: Want to discuss / chat with the community? Here you go!
8+
- name: ⁉️ Why & how to create a reproduction?
9+
url: https://antfu.me/posts/why-reproductions-are-required
10+
about: A reproduction is very important for maintainers to help on your issues!

0 commit comments

Comments
 (0)