-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 728ef0a
Showing
68 changed files
with
3,067 additions
and
0 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,7 @@ | ||
/node_modules | ||
*.log | ||
.DS_Store | ||
.env | ||
/.cache | ||
/public/build | ||
/build |
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,2 @@ | ||
DATABASE_URL="file:./data.db?connection_limit=1" | ||
SESSION_SECRET="super-duper-s3cret" |
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,136 @@ | ||
/** | ||
* This is intended to be a basic starting point for linting in the Indie Stack. | ||
* It relies on recommended configs out of the box for simplicity, but you can | ||
* and should modify this configuration to best suit your team's needs. | ||
*/ | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
}, | ||
|
||
// Base config | ||
extends: ["eslint:recommended"], | ||
|
||
overrides: [ | ||
// React | ||
{ | ||
files: ["**/*.{js,jsx,ts,tsx}"], | ||
plugins: ["react", "jsx-a11y"], | ||
extends: [ | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:react-hooks/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"prettier", | ||
], | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
formComponents: ["Form"], | ||
linkComponents: [ | ||
{ name: "Link", linkAttribute: "to" }, | ||
{ name: "NavLink", linkAttribute: "to" }, | ||
], | ||
}, | ||
rules: { | ||
"react/jsx-no-leaked-render": [ | ||
"warn", | ||
{ validStrategies: ["ternary"] }, | ||
], | ||
}, | ||
}, | ||
|
||
// Typescript | ||
{ | ||
files: ["**/*.{ts,tsx}"], | ||
plugins: ["@typescript-eslint", "import"], | ||
parser: "@typescript-eslint/parser", | ||
settings: { | ||
"import/internal-regex": "^~/", | ||
"import/resolver": { | ||
node: { | ||
extensions: [".ts", ".tsx"], | ||
}, | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/stylistic", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"prettier", | ||
], | ||
rules: { | ||
"import/order": [ | ||
"error", | ||
{ | ||
alphabetize: { caseInsensitive: true, order: "asc" }, | ||
groups: ["builtin", "external", "internal", "parent", "sibling"], | ||
"newlines-between": "always", | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
// Markdown | ||
{ | ||
files: ["**/*.md"], | ||
plugins: ["markdown"], | ||
extends: ["plugin:markdown/recommended", "prettier"], | ||
}, | ||
|
||
// Jest/Vitest | ||
{ | ||
files: ["**/*.test.{js,jsx,ts,tsx}"], | ||
plugins: ["jest", "jest-dom", "testing-library"], | ||
extends: [ | ||
"plugin:jest/recommended", | ||
"plugin:jest-dom/recommended", | ||
"plugin:testing-library/react", | ||
"prettier", | ||
], | ||
env: { | ||
"jest/globals": true, | ||
}, | ||
settings: { | ||
jest: { | ||
// we're using vitest which has a very similar API to jest | ||
// (so the linting plugins work nicely), but it means we have to explicitly | ||
// set the jest version. | ||
version: 28, | ||
}, | ||
}, | ||
}, | ||
|
||
// Cypress | ||
{ | ||
files: ["cypress/**/*.ts"], | ||
plugins: ["cypress"], | ||
extends: ["plugin:cypress/recommended", "prettier"], | ||
}, | ||
|
||
// Node | ||
{ | ||
files: [".eslintrc.js", "mocks/**/*.js"], | ||
env: { | ||
node: 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,41 @@ | ||
name: 🐛 Bug Report | ||
description: Something is wrong with the Stack. | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: >- | ||
Thank you for helping to improve Remix! | ||
Our bandwidth on maintaining these stacks is limited. As a team, we're | ||
currently focusing our efforts on Remix itself. The good news is you can | ||
fork and adjust this stack however you'd like and start using it today | ||
as a custom stack. Learn more from | ||
[the Remix Stacks docs](https://remix.run/stacks). | ||
If you'd still like to report a bug, please fill out this form. We can't | ||
promise a timely response, but hopefully when we have the bandwidth to | ||
work on these stacks again we can take a look. Thanks! | ||
- type: input | ||
attributes: | ||
label: Have you experienced this bug with the latest version of the template? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps to Reproduce | ||
description: Steps to reproduce the behavior. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Expected Behavior | ||
description: A concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Actual Behavior | ||
description: A concise description of what you're experiencing. | ||
validations: | ||
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,21 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Get Help | ||
url: https://github.com/remix-run/remix/discussions/new?category=q-a | ||
about: | ||
If you can't get something to work the way you expect, open a question in | ||
the Remix discussions. | ||
- name: Feature Request | ||
url: https://github.com/remix-run/remix/discussions/new?category=ideas | ||
about: | ||
We appreciate you taking the time to improve Remix with your ideas, but we | ||
use the Remix Discussions for this instead of the issues tab 🙂. | ||
- name: 💬 Remix Discord Channel | ||
url: https://rmx.as/discord | ||
about: Interact with other people using Remix 💿 | ||
- name: 💬 New Updates (Twitter) | ||
url: https://twitter.com/remix_run | ||
about: Stay up to date with Remix news on twitter | ||
- name: 🍿 Remix YouTube Channel | ||
url: https://rmx.as/youtube | ||
about: Are you a tech lead or wanting to learn more about Remix in depth? Checkout the Remix YouTube Channel |
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,14 @@ | ||
<!-- | ||
👋 Hey, thanks for your interest in contributing to Remix! | ||
Our bandwidth on maintaining these stacks is limited. As a team, we're currently | ||
focusing our efforts on Remix itself. The good news is you can fork and adjust | ||
this stack however you'd like and start using it today as a custom stack. Learn | ||
more from [the Remix Stacks docs](https://remix.run/stacks). | ||
You're still welcome to make a PR. We can't promise a timely response, but | ||
hopefully when we have the bandwidth to work on these stacks again we can take | ||
a look. Thanks! | ||
--> |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
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,144 @@ | ||
name: 🚀 Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
cache-dependency-path: ./package.json | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: npm install | ||
|
||
- name: 🔬 Lint | ||
run: npm run lint | ||
|
||
typecheck: | ||
name: ʦ TypeScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
cache-dependency-path: ./package.json | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: npm install | ||
|
||
- name: 🔎 Type check | ||
run: npm run typecheck --if-present | ||
|
||
vitest: | ||
name: ⚡ Vitest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
cache-dependency-path: ./package.json | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: npm install | ||
|
||
- name: ⚡ Run vitest | ||
run: npm run test -- --coverage | ||
|
||
cypress: | ||
name: ⚫️ Cypress | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏄 Copy test env vars | ||
run: cp .env.example .env | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
cache-dependency-path: ./package.json | ||
node-version: 18 | ||
|
||
- name: 📥 Install deps | ||
run: npm install | ||
|
||
- name: 🛠 Setup Database | ||
run: npx prisma migrate reset --force | ||
|
||
- name: ⚙️ Build | ||
run: npm run build | ||
|
||
- name: 🌳 Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: npm run start:mocks | ||
wait-on: http://localhost:8811 | ||
env: | ||
PORT: 8811 | ||
|
||
deploy: | ||
name: 🚀 Deploy | ||
runs-on: ubuntu-latest | ||
needs: [lint, typecheck, vitest, cypress] | ||
# only deploy main/dev branch on pushes | ||
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }} | ||
|
||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 👀 Read app name | ||
uses: SebRollen/[email protected] | ||
id: app_name | ||
with: | ||
file: fly.toml | ||
field: app | ||
|
||
- name: 🎈 Setup Fly | ||
uses: superfly/flyctl-actions/[email protected] | ||
|
||
- name: 🚀 Deploy Staging | ||
if: ${{ github.ref == 'refs/heads/dev' }} | ||
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}-staging | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
|
||
- name: 🚀 Deploy Production | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }} | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
Oops, something went wrong.