This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
馃帀 first pass at setting up the project
first pass at setting up the project 馃帀 Initial commit
- Loading branch information
0 parents
commit 995338c
Showing
67 changed files
with
19,395 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,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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 @@ | ||
# Run this command to generate a key: openssl rand -base64 32 | ||
NEXTAUTH_SECRET="" | ||
# Add next-auth provider secrets here | ||
GITHUB_CLIENT_ID="" | ||
GITHUB_CLIENT_SECRET="" |
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 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# JetBrains IDE files | ||
.idea/ | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.yarn-debug.log* | ||
|
||
# local env files | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
src/generated |
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,64 @@ | ||
{ | ||
"plugins": ["prettier", "unused-imports", "sort-keys-fix"], | ||
"extends": ["next", "next/core-web-vitals", "prettier", "plugin:typescript-sort-keys/recommended", "plugin:@dword-design/import-alias/recommended"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"camelcase": "off", | ||
"import/prefer-default-export": "off", | ||
"react/jsx-filename-extension": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/no-unused-prop-types": "off", | ||
"react/require-default-props": "off", | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"ts": "never", | ||
"tsx": "never", | ||
"js": "never", | ||
"jsx": "never" | ||
} | ||
], | ||
"quotes": "off", | ||
"jsx-a11y/anchor-is-valid": [ | ||
"error", | ||
{ | ||
"components": ["Link"], | ||
"specialLink": ["hrefLeft", "hrefRight"], | ||
"aspects": ["invalidHref", "preferButton"] | ||
} | ||
], | ||
"@dword-design/import-alias/prefer-alias": [ | ||
"error", | ||
{ | ||
"alias": { | ||
"@": "./src/" | ||
} | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "**/*.+(ts|tsx)", | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint/eslint-plugin"], | ||
"extends": ["plugin:@typescript-eslint/recommended", "prettier"], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"no-use-before-define": [0], | ||
"@typescript-eslint/no-use-before-define": [1], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/quotes": [ | ||
2, | ||
"backtick", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"unused-imports/no-unused-imports": "error" | ||
} | ||
} | ||
] | ||
} |
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 @@ | ||
{} |
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,36 @@ | ||
name: Main CI workflow | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
run-ci: | ||
name: Run Type Check & Linters | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Check types | ||
run: yarn type-check | ||
|
||
- name: Check linting | ||
run: yarn lint | ||
|
||
- name: Test | ||
run: yarn test:ci |
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,39 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# JetBrains IDE files | ||
.idea/ | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.yarn-debug.log* | ||
|
||
# local env files | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
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,8 @@ | ||
command_exists () { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
# Workaround for Windows 10, Git Bash and Yarn | ||
if command_exists winpty && test -t 1; then | ||
exec < /dev/tty | ||
fi |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
yarn lint-staged |
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 @@ | ||
save-exact = 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 @@ | ||
18 |
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 @@ | ||
{ | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 80, | ||
"tabWidth": 2 | ||
} |
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,33 @@ | ||
import {initReactI18next} from 'react-i18next'; | ||
import i18n from 'i18next'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
|
||
const ns = ['common']; | ||
const supportedLngs = ['en']; | ||
|
||
i18n.use(LanguageDetector) | ||
.use(initReactI18next) | ||
.init({ | ||
//debug: true, | ||
lng: 'en', | ||
fallbackLng: 'en', | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
debug: true, | ||
defaultNS: 'common', | ||
ns, | ||
supportedLngs, | ||
}); | ||
|
||
supportedLngs.forEach((lang) => { | ||
ns.forEach((n) => { | ||
i18n.addResourceBundle( | ||
lang, | ||
n, | ||
require(`../public/locales/${lang}/${n}.json`) | ||
); | ||
}); | ||
}); | ||
|
||
export default i18n; |
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,48 @@ | ||
const path = require('path'); | ||
module.exports = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'storybook-dark-mode', | ||
{ | ||
name: 'storybook-addon-turbo-build', | ||
options: { | ||
optimizationLevel: 2, | ||
}, | ||
}, | ||
], | ||
framework: '@storybook/react', | ||
core: { | ||
builder: '@storybook/builder-webpack5', | ||
}, | ||
webpackFinal: async (config, { configType }) => { | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
'next-i18next': 'react-i18next', | ||
'@': path.resolve(__dirname, '../src'), | ||
}; | ||
|
||
config.module.rules.push({ | ||
test: /\.graphql$/, | ||
exclude: /node_modules/, | ||
loader: 'graphql-tag/loader', | ||
}); | ||
|
||
return config; | ||
}, | ||
babel: async (options) => ({ | ||
...options, | ||
presets: [ | ||
['@babel/preset-env', { shippedProposals: true }], | ||
'@babel/preset-typescript', | ||
['@babel/preset-react', { runtime: 'automatic' }], | ||
], | ||
plugins: ['@babel/plugin-transform-typescript', ...options.plugins], | ||
}), | ||
typescript: { | ||
check: false, | ||
reactDocgen: false, | ||
}, | ||
}; |
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 @@ | ||
<!-- .storybook/preview-head.html --> | ||
|
||
<link rel="preconnect" href="https://fonts.bunny.net" /> | ||
<link | ||
href="https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900" | ||
rel="stylesheet" | ||
/> |
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,46 @@ | ||
import '../src/styles/globals.css'; | ||
|
||
import React from 'react'; | ||
import AppBase from '../src/components/AppBase'; | ||
import { themes } from '@storybook/theming'; | ||
import i18n from './i18next.js'; | ||
|
||
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; | ||
import { initializeApollo } from '../src/graphql/apollo'; | ||
import { ApolloProvider } from '@apollo/client'; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
viewport: { | ||
viewports: INITIAL_VIEWPORTS, | ||
defaultViewport: 'iphone12', | ||
}, | ||
darkMode: { | ||
// Override the default dark theme | ||
dark: { ...themes.dark, appBg: 'black' }, | ||
// Override the default light theme | ||
light: { ...themes.light, appBg: 'light' }, | ||
}, | ||
i18n, | ||
locale: 'en', | ||
locales: { | ||
en: 'English', | ||
}, | ||
}; | ||
|
||
export const decorators = [ | ||
(Story) => | ||
React.createElement( | ||
ApolloProvider, | ||
{ | ||
client: initializeApollo({ initialState: {} }), | ||
}, | ||
React.createElement(AppBase, {}, React.createElement(Story)), | ||
), | ||
]; |
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,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2023 Tim Mikeladze | ||
|
||
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. |
Empty file.
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,16 @@ | ||
import type { CodegenConfig } from '@graphql-codegen/cli'; | ||
|
||
const config: CodegenConfig = { | ||
overwrite: true, | ||
schema: `src/graphql/schema.graphql`, | ||
generates: { | ||
'src/generated/graphql.ts': { | ||
plugins: [`typescript`, `typescript-resolvers`], | ||
}, | ||
}, | ||
hooks: { | ||
afterAllFileWrite: [`yarn codegen:zeus`], | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.