Skip to content

Commit

Permalink
init: authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiiavorobiova committed Sep 17, 2024
0 parents commit f6a91f1
Show file tree
Hide file tree
Showing 88 changed files with 13,357 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"extends": [
"prettier",
"next/core-web-vitals",
"next/core-web-vitals",
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:testing-library/react"
],
"plugins": ["prettier"],
"parser": "@typescript-eslint/parser",
"rules": {
"prettier/prettier": "error",
"react/jsx-props-no-spreading": 0,
"react/react-in-jsx-scope": 0,
"react/static-property-placement": 0,
"react/require-default-props": 0,
"react-hooks/exhaustive-deps": 0,
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsFor": ["state"]
}
],
"max-len": ["error", { "code": 150 }],
"no-spaced-func": 0,
"react/jsx-one-expression-per-line": [2, { "allow": "single-child" }],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/prefer-default-export": "off",
"class-methods-use-this": "off",
"import/extensions": 0,
"object-curly-newline": 0,
"implicit-arrow-linebreak": 0,
"function-paren-newline": 0,
"operator-linebreak": 0,
"@typescript-eslint/indent": 0,
"react/jsx-wrap-multilines": 0
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["**/tsconfig.json"],
"tsconfigRootDir": ".",
"ecmaFeatures": {
"jsx": true
}
}
}
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: lint, test, build
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
branches: [develop]
pull_request:
branches: [develop]
env:
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
AUTH_FIREBASE_PROJECT_ID: ${{ secrets.AUTH_FIREBASE_PROJECT_ID }}
AUTH_FIREBASE_CLIENT_EMAIL: ${{ secrets.AUTH_FIREBASE_CLIENT_EMAIL }}
AUTH_FIREBASE_PRIVATE_KEY: ${{ secrets.AUTH_FIREBASE_PRIVATE_KEY }}
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
NEXT_PUBLIC_FIREBASE_MEASURMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASURMENT_ID }}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
jobs:
pipeline:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install npm modules
run: npm install
- name: build project
run: npm run build
- name: prettier check
run: npm run format
- name: lint check
run: npm run lint
- name: unit tests
run: npm run test
39 changes: 39 additions & 0 deletions .gitignore
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
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

#webstorm
.idea/
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
package.json
tsconfig.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": false,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"bracketSpacing": true,
"printWidth": 150
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"i18n-ally.localesPaths": [
"public/messages"
]
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# REST GraphQL Client

[Working DEMO]()

## Architecture:

FSD - Feature sliced design

## CSS and UI

- Modules
- Mantine

## Tests

- Vitest

## State manger

- Zustand

## Project management

- Kanban

## Github

- Feature Branching
13 changes: 13 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import createNextIntlPlugin from 'next-intl/plugin';

const withNextIntl = createNextIntlPlugin('./src/features/localeSwitcher/config/request.ts');

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
env: {
BASE_URL: process.env.BASE_URL,
},
};

export default withNextIntl(nextConfig);
Loading

0 comments on commit f6a91f1

Please sign in to comment.