-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from smakosh/chore/add-cli
feat: added first iteration of the cli and written docs for jwt and improved the examples
- Loading branch information
Showing
39 changed files
with
2,526 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: "Bug report" | ||
description: Report an issue | ||
title: '[bug]: ' | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
### Thanks for taking the time to create a bug report. Please search open/closed issues before submitting, as the issue may have already been reported/addressed. | ||
- type: markdown | ||
attributes: | ||
value: | | ||
#### If you aren't sure this is a bug or not, please open a discussion instead: | ||
- [Discussions](https://github.com/smakosh/roll-your-own-auth/discussions/new?category=general) | ||
- type: textarea | ||
id: bug-description | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us how in the description. Thanks! | ||
placeholder: Bug description | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: part-affected | ||
attributes: | ||
label: Affected part/parts | ||
description: Is this feature request relevant to any of the already existing examples? | ||
placeholder: ex. rest-express-prisma-jwt-sqlite, rest-express-prisma-session-sqlite... | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: How to reproduce | ||
description: A step-by-step description of how to reproduce the bug. | ||
placeholder: | | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. See error | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: system-info | ||
attributes: | ||
label: System Info | ||
description: Information about browsers, system or binaries that's relevant. | ||
render: bash | ||
placeholder: System, Binaries, Browsers | ||
validations: | ||
required: true | ||
|
||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Before submitting | ||
description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://github.com/smakosh/roll-your-own-auth/blob/main/CONTRIBUTING.md). | ||
options: | ||
- label: I've made research efforts and searched the documentation | ||
required: true | ||
- label: I've searched for existing issues | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Get Help | ||
url: https://github.com/smakosh/roll-your-own-auth/discussions/new?category=general | ||
about: If you can't get something to work the way you expect, open a question in our discussion forums. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "Feature request" | ||
description: Create a feature request for ryo-auth | ||
title: '[feat]: ' | ||
labels: ['area: request'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
### Thanks for taking the time to create a feature request! Please search open/closed issues before submitting, as the issue may have already been reported/addressed. | ||
- type: markdown | ||
attributes: | ||
value: | | ||
#### If you aren't sure this is a bug or not, please open a discussion instead: | ||
- [Discussions](https://github.com/smakosh/roll-your-own-auth/discussions/new?category=general) | ||
- type: textarea | ||
id: feature-description | ||
attributes: | ||
label: Feature description | ||
description: Tell us about your feature request | ||
placeholder: 'I think this feature would be great because...' | ||
value: 'Describe your feature request...' | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
id: part-affected | ||
attributes: | ||
label: Affected part/parts | ||
description: Is this feature request relevant to any of the already existing examples? | ||
placeholder: ex. rest-express-prisma-jwt-sqlite, rest-express-prisma-session-sqlite... | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: context | ||
attributes: | ||
label: Additional Context | ||
description: Add any other context about the feature here. | ||
placeholder: ex. screenshots, Stack Overflow links, forum links, etc. | ||
value: 'Additional details here...' | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Before submitting | ||
description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://github.com/smakosh/roll-your-own-auth/blob/main/CONTRIBUTING.md). | ||
options: | ||
- label: I've made research efforts and searched the documentation | ||
required: true | ||
- label: I've searched for existing issues and PRs | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Adapted from shadcn/ui. | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
if: ${{ github.repository_owner == 'smakosh' }} | ||
name: Create a PR for release workflow | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use PNPM | ||
uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 8.6.1 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
version: 8.6.1 | ||
node-version: 18 | ||
cache: "pnpm" | ||
|
||
- name: Install NPM Dependencies | ||
run: pnpm install | ||
|
||
- name: Build the package | ||
run: pnpm build:cli | ||
|
||
- name: Create Version PR or Publish to NPM | ||
id: changesets | ||
uses: changesets/action@v1.4.1 | ||
with: | ||
commit: "chore(release): version packages" | ||
title: "chore(release): version packages" | ||
version: node .github/changeset-version.js | ||
publish: npx changeset publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | ||
NODE_ENV: "production" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Contributing | ||
|
||
Thanks for your interest in contributing to Roll Your Own Auth. We're happy to have you here. | ||
|
||
Please take a moment to review this document before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar. | ||
|
||
If you need any help, feel free to reach out to [@smakosh](https://twitter.com/smakosh). | ||
|
||
## About this repository | ||
|
||
This repository is a monorepo. | ||
|
||
- We use [pnpm](https://pnpm.io) and [`workspaces`](https://pnpm.io/workspaces) for development. | ||
- We use [Turborepo](https://turbo.build/repo) as our build system. | ||
- We use [changesets](https://github.com/changesets/changesets) for managing releases. | ||
|
||
## Structure | ||
|
||
This repository is structured as follows: | ||
|
||
``` | ||
apps | ||
└── docs | ||
examples | ||
└── [rest-graphql]-[framework]-[orm]-[session-jwt]-[database] | ||
packages | ||
└── cli | ||
``` | ||
|
||
| Path | Description | | ||
| --------------------- | ---------------------------------------- | | ||
| `apps/docs` | The Docs. | | ||
| `examples/` | All the examples/templates. | | ||
| `packages/cli` | The `ryo-auth` package. | | ||
|
||
## Development | ||
|
||
### Fork this repo | ||
|
||
You can fork this repo by clicking the fork button in the top right corner of this page. | ||
|
||
### Clone on your local machine | ||
|
||
```bash | ||
git clone https://github.com/your-username/roll-your-own-auth.git | ||
``` | ||
|
||
### Navigate to project directory | ||
|
||
```bash | ||
cd roll-your-own-auth | ||
``` | ||
|
||
### Create a new Branch | ||
|
||
```bash | ||
git checkout -b my-new-branch | ||
``` | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
### Run a workspace | ||
|
||
You can use the `pnpm --filter=[WORKSPACE]` command to start the development process for a workspace. | ||
|
||
#### Examples | ||
|
||
1. To run the `roll-your-own-auth.vercel.app` website: | ||
|
||
```bash | ||
pnpm --filter=docs dev | ||
``` | ||
|
||
2. To run the `ryo-auth` package: | ||
|
||
```bash | ||
pnpm --filter=ryo-auth dev | ||
``` | ||
|
||
## Documentation | ||
|
||
The documentation for this project is located in the `docs` workspace. You can run the documentation locally by running the following command: | ||
|
||
```bash | ||
pnpm docs:dev | ||
``` | ||
|
||
Documentation is written using [MDX](https://mdxjs.com). You can find the documentation files in the `apps/docs` directory. | ||
|
||
## Commit Convention | ||
|
||
Before you create a Pull Request, please check whether your commits comply with | ||
the commit conventions used in this repository. | ||
|
||
When you create a commit we kindly ask you to follow the convention | ||
`category(scope or module): message` in your commit message while using one of | ||
the following categories: | ||
|
||
- `feat / feature`: all changes that introduce completely new code or new | ||
features | ||
- `fix`: changes that fix a bug (ideally you will additionally reference an | ||
issue if present) | ||
- `refactor`: any code related change that is not a fix nor a feature | ||
- `docs`: changing existing or creating new documentation (i.e. README, docs for | ||
usage of a lib or cli usage) | ||
- `build`: all changes regarding the build of the software, changes to | ||
dependencies or the addition of new dependencies | ||
- `test`: all changes regarding tests (adding new tests or changing existing | ||
ones) | ||
- `ci`: all changes regarding the configuration of continuous integration (i.e. | ||
github actions, ci system) | ||
- `chore`: all changes to the repository that do not fit into any of the above | ||
categories | ||
|
||
e.g. `feat(components): add new prop to the avatar component` | ||
|
||
If you are interested in the detailed specification you can visit https://www.conventionalcommits.org/ | ||
|
||
## CLI | ||
|
||
Still too early, will write down more details once basic functionalities are implemented. | ||
|
||
## Testing | ||
|
||
Still too early, will write down more details once basic functionalities are implemented. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 smakosh | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"index": "Get started", | ||
"client": "Client", | ||
"server": "Server" | ||
} |
Empty file.
Oops, something went wrong.