Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbolel committed Jan 17, 2024
0 parents commit 9c65674
Show file tree
Hide file tree
Showing 372 changed files with 42,252 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
12 changes: 12 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dummy values for local testing to avoid errors

# AWS
VITE_AWS_REGION='us-east-1'
VITE_CF_DOMAIN='https://localhost:3000'

# AWS Cognito
VITE_COGNITO_DOMAIN='https://cognito-idp.us-east-1.amazonaws.com/us-east-1_abcd1234'
VITE_USER_POOL_ID='us-east-1_abcd1234'
VITE_USER_POOL_CLIENT_ID='12345678901234567890123456'
VITE_COGNITO_REDIRECT_SIGN_IN='http://localhost:3000/signin'
VITE_COGNITO_REDIRECT_SIGN_OUT='http://localhost:3000/signout'
101 changes: 101 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
module.exports = {
env: {
browser: true,
es6: true,
es2020: true,
es2022: true,
jest: true,
'jest/globals': true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
'prettier',
'plugin:storybook/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
jsx: true,
useJSXTextNode: true,
},
plugins: [
'node',
'@typescript-eslint',
'react',
'react-hooks',
'react-refresh',
'jest',
'prettier',
],
rules: {
semi: 'off',
'no-debugger': 'error',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'prettier/prettier': ['error'],
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-refresh/only-export-components': 'warn',
'react/jsx-closing-bracket-location': [2, 'tag-aligned'],
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-indent-props': [2, 2],
'react/jsx-indent': [
2,
2,
{
indentLogicalExpressions: true,
},
],
'react/jsx-max-props-per-line': [
2,
{
maximum: 1,
when: 'multiline',
},
],
'react/jsx-uses-react': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.cjs'],
},
},
react: {
pragma: 'React',
version: 'detect',
},
},
overrides: [
{
files: ['**/*.cjs'],
env: {
node: true,
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'react/react-in-jsx-scope': 'off',
},
},
],
ignorePatterns: ['node_modules/', 'coverage/', 'build/', 'dist/', 'public/'],
}
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global Rule:
#* @
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create bug report.
title: 'Example: Application breaks when I run validate.'
labels: 'bug'
assignees: ''
---

# Bug Report Description

## What is the current behavior?

## How can this issue be reproduced?

## What is the expected behavior?

## What is the motivation / use case for changing the behavior?

## Please tell us about your environment:

## Other information:
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a new feature.
title: 'Example: I would like this project to use an additional authentication method.'
labels: 'enhancement'
assignees: ''
---

# Feature Request Description

## What is the current behavior?

## What is the motivation / use case for changing the behavior?

## Please describe any alternatives you have explored.

## Other information:
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Summary

<!-- Overview of changes -->

### Added

<!-- List new features or components. Include a screenshot for new visual elements. -->

### Changed

<!-- List changes in existing functionality or design.
If the change was visual, include a comparison screenshot showing the before and after the visual change. -->

### Deprecated

<!-- List once-stable features or components to be deprecated in this PR. -->

### Removed

<!-- List deprecated features or components removed in this PR. -->

### Fixed

<!-- List any bug fixes. -->

## How to test

<!-- Instructions on how to test the changes. This is not an exhaustive list of ways you should test this PR. -->
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '08:00'
timezone: 'America/New_York'
labels:
- 'dependencies'
rebase-strategy: 'auto'
reviewers:
- 'sbolel'
versioning-strategy: increase
65 changes: 65 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Workflow that lints code, runs tests, and builds the project. On pushes
# to the main branch, also creates a version and create a release on GitHub.
name: CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize

jobs:
test_build_release:
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: CHECKOUT
uses: actions/checkout@v3

- name: INSTALL - node.js, yarn
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: DEBUG - node, npm, yarn versions
run: |
echo "node --version: $(node --version)"
echo "npm --version: $(npm --version)"
echo "yarn --version: $(yarn --version)"
- name: CACHE - get yarn cache folder path
id: yarn-cache-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: CACHE - yarn dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: ${{ runner.os }}-yarn-

- name: INSTALL - dependencies
run: yarn install --immutable

- name: LINT, TEST
run: yarn ci

- name: BUILD
run: yarn build

# semantic-release will only run on pushes to main (see package.json)
- name: RELEASE
run: yarn semantic-release
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# logs
**/*.log
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# node
**/node_modules/
dist
dist-ssr
*.local

# editors
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# temporary
tmp/
**/temp/
**/.cache/
**/.temp/

# macos
**/.DS_Store

# coverage and stats
**/coverage/**
.coverage
stats.*

# yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.yarn/
build/
dist/
**/node_modules/
**/coverage
8 changes: 8 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
arrowParens: 'always',
printWidth: 80,
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
}
Loading

0 comments on commit 9c65674

Please sign in to comment.