Skip to content

Commit

Permalink
Merge pull request #1 from hellocoop/reset
Browse files Browse the repository at this point in the history
reset repo
  • Loading branch information
dickhardt authored Mar 13, 2024
2 parents c288933 + 3000258 commit 2a24e28
Show file tree
Hide file tree
Showing 35 changed files with 3,956 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# files for Docker to ignore
.*
/.github
/scripts
/
/web
19 changes: 19 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Sync content with S3 Beta

on:
workflow_dispatch:
pull_request_target:
types: [ closed ]
branches: [ beta ]

jobs:
sync:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
uses: hellocoop/tools/.github/workflows/code-deploy-client.yml@main
with:
AWS_ACCOUNT: ${{ vars.HELLO_BETA_AWS }} # set at org level
STACK: QuickstartStack
BUILD_CMD: npm run build
TARGET: beta
DOMAIN: quickstart.hello-beta.net # for version comparison
BUILD_DIR: ./S3
19 changes: 19 additions & 0 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Sync content with S3 Staging

on:
workflow_dispatch:
pull_request_target:
types: [ closed ]
branches: [ main ]

jobs:
sync:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
uses: hellocoop/tools/.github/workflows/code-deploy-client.yml@main
with:
AWS_ACCOUNT: ${{ vars.HELLO_STAGING_AWS }} # set at org level
STACK: QuickstartStack
BUILD_CMD: npm run build
TARGET: main
DOMAIN: quickstart.hello-staging.net # for version comparison
BUILD_DIR: ./S3
10 changes: 10 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Increment version

on:
pull_request_target:
types: [ opened, synchronize ] #Runs on PR creation/updation
branches: [ main ]

jobs:
version:
uses: hellocoop/tools/.github/workflows/code-version.yml@main
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
S3
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .npmrc
engine-strict=true
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

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.

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.

## Scope

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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**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.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**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.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**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.

### 4. Permanent Ban

**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.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# vite image used during dev to enable HMR
FROM node:20-alpine
WORKDIR /usr/src/quickstart
COPY ["*.json", "*.js", "*.cjs", "index.html", "./"]
RUN npm i
EXPOSE 7002
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Hellō

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.
51 changes: 49 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
# quickstart
Hellō Quickstart Web App
# Quickstart App

This repo contains the source code powering [https://quickstart.hello.coop/](https://quickstart.hello.coop/).

Quickstart accelerates getting up and running with Hellō. It will read an existing client_id, or create one.

The Quickstart SPA (Single Page App) is launched by sample apps to acquire a client_id. The developer will log into Hellō and authorize Quickstart to create / read publisher / apps.

## Launching Quickstart

Load `https://quickstart.hello.coop/` with the following query parameters:

- `response_uri` - (REQUIRED) the URI that Quickstart will redirect to with the `client_id` query parameter
- `suffix` - (OPTIONAL) a string that will be appended to the suggested name (eg: John's + suffix) for an app to be created. Defaults to "Application"
- `name` - (OPTIONAL) name of the application (`suffix` param is ignored)
- `tos_uri` - (OPTIONAL) terms of service link
- `pp_uri` - (OPTIONAL) privacy policy link
- `image_uri` - (OPTIONAL) app logo link
- `dark_image_uri` - (OPTIONAL) app logo link for dark theme
- `redirect_uri` - (OPTIONAL) one or more space separated OAuth `redirect_uri` values to be added to the Production Redirect URIs. `http:\\localhost:*` and `http:\\127.0.0.1` Development Redirect URIs are enabled by default
- `integration` - (OPTIONAL) how the application is created. defaults to `quickstart`
- `wildcard_domain` - (OPTIONAL) a boolean value indicating if wildcard domains are enabled in Development Redirect URIs
- `provider_hint` - (OPTIONAL) a space separated list of recommended providers per [provider_hint](https://www.hello.dev/documentation/provider-hint.html#recommended-provider-defaults)

Eg: `response_uri` = `http://localhost:8000/` & `suffix` = "Next.js"

https://quickstart.hello.coop/?response_uri=http%3A%2F%2Flocalhost%3A8000%2F&suffix=Next.js

## Quickstart Response

On completion, the Quickstart app will load the `response_uri` with `client_id` query parameter set to the Hellō Client ID.

http://localhost:8000/quickstart?client_id=9ca12f47-f310-413b-b70f-4428d9448e8d


## Quickstart Developer Experience

If the developer has not registered any applications, they will be prompted with a Publisher Name "John Smith's Team" and an Application Name "John Smith's Application". If a `suffix` is provided (eg. "Next.js"), then the prompt will be "John Smith's Next.js". Alternatively, the developer will choose an existing application or create a new one with the same prefilled prompt.



## Sample App Response Developer Experience

If possible, the sample app will have a link to test out the sample app, as well as inform the developer that they can update their Hellō application at https://console.hello.coop

[MIT](LICENSE)

## Some test text to test new branch

42 changes: 42 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="https://cdn.hello.coop/images/quickstart-favicon-dark.png" />
<link rel="stylesheet" href="https://cdn.hello.coop/css/hello-button.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hellō Quickstart</title>
<script defer data-domain="quickstart.hello.coop" src="/js/script.hash.js"></script>
<style>
@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
}
@media (prefers-color-scheme: light) {
html {
color-scheme: light;
}
}
</style>
</head>
<body class="bg-white dark:bg-[#151515] text-charcoal dark:text-[#d4d4d4]">
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script defer src="https://cdn.hello.coop/js/hello-dev-wc-footer.js"></script>
</body>
<script>
/**
* If browser back button was used, flush cache
* This ensures that user will always see an accurate, up-to-date view based on their state
* https://stackoverflow.com/questions/8788802/prevent-safari-loading-from-cache-when-back-button-is-clicked
*/
(function () {
window.onpageshow = function (event) {
if (event.persisted) {
window.location.reload();
}
};
})();
</script>
</html>
34 changes: 34 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"compilerOptions": {
"moduleResolution": "node",
"target": "esnext",
"module": "esnext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
}
Loading

0 comments on commit 2a24e28

Please sign in to comment.