Skip to content

Commit

Permalink
develop release : V0.1 (#98)
Browse files Browse the repository at this point in the history
* create a sample env file, common config, change _app.jsx to _app.tsx & providers.js to providers.tsx

* remove old code

* update packages and fix prettier

* allow the user to signin via rds

* integrate api to show all pending skill requests

* remove unused tailwind config

* add inter font

* build the requests page

* show loading state and error state in user guard

* add api to get all users from rds

* create a select component

* integrate api to search users and create aa rds user combobox component

* build a form to create endorsement

* add mutation to create an endorsment

* add button to create endorsement on request board

* make a avatar group component

* remove unused imports

* build a page to create skill and integrate the mutation api

* integrate api to approve/reject endorsement

* add superuser check for actions in requests page

* create empty state

* add warning for small screen devices

* hide create skill link for non super users

* chore: reinstall yarn

* fix linting

* chore: use npm

* chore: remove test-all command

* ci: Move to npm from yarn

* ci: add ev.local in actions

* remove production and staging build scripts (#101)

Co-authored-by: Amit Prakash <[email protected]>

---------

Co-authored-by: Prakash <[email protected]>
Co-authored-by: Amit Prakash <[email protected]>
  • Loading branch information
3 people authored Aug 15, 2024
1 parent bba1d0b commit 95e04ce
Show file tree
Hide file tree
Showing 146 changed files with 8,746 additions and 11,280 deletions.
8 changes: 0 additions & 8 deletions .env

This file was deleted.

12 changes: 12 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# dev | staging | prod
NEXT_PUBLIC_APP_ENV=dev

NEXT_PUBLIC_SKILL_TREE_BACKEND_BASE_URL = 'https://staging-skilltree-api.realdevsquad.com/v1'
NEXT_PUBLIC_RDS_BACKEND_BASE_URL='https://staging-api.realdevsquad.com'

NEXT_PUBLIC_SKILL_TREE_URL='https://staging-skilltree.realdevsquad.com'
NEXT_PUBLIC_STATUS_SITE_URL='https://staging-status.realdevsquad.com'
NEXT_PUBLIC_MEMBERS_SITE_URL='https://staging-members.realdevsquad.com'
NEXT_PUBLIC_WELCOME_SITE_URL='https://welcome.realdevsquad.com'
NEXT_PUBLIC_WWW_SITE_URL='https://staging-www.realdevsquad.com'
NEXT_PUBLIC_MY_SITE_URL='https://staging-my.realdevsquad.com'
54 changes: 43 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
{
"plugins": ["react", "react-hooks", "prettier", "@typescript-eslint"],
"extends": ["eslint:recommended", "next", "next/core-web-vitals", "prettier"],
"env": {
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"next/core-web-vitals"
],
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint", "import"],
"rules": {
"indent": ["error", 4],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}
"eol-last": ["error", "always"],
"linebreak-style": ["error", "unix"],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "@/*",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": ["builtin", "@/*"]
}
]
},
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["node_modules/", ".next/", "out/"]
}
44 changes: 44 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and test checks
on:
pull_request:
branches: ["*"]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: Install dependencies
run: npm ci

- name: Create sample env
run: cp .env.sample .env.local

- name: Check format
run: npm run check-format

- name: Build
run: npm run build

# TODO : Uncomment the following lines after adding tests
# - name: Test
# run: npm test
41 changes: 0 additions & 41 deletions .github/workflows/pre-commit-checks.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ lib-cov
coverage
*.lcov

#VS code
.vscode/

# nyc test coverage
.nyc_output

Expand Down Expand Up @@ -131,4 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.yarnrc.yml
.yarnrc.yml

.env
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"streetsidesoftware.code-spell-checker"
]
}
66 changes: 66 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
/**
Editor rules
------------
*/
"editor.formatOnSave": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.tabWidth": 4,
"prettier.printWidth": 120,
"editor.rulers": [
{
"column": 120
}
],
/**
Formatters
------------
*/
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.requireConfig": true,
/**
New Lines
------------
*/
"files.eol": "\n",
"files.insertFinalNewline": true,
/**
Linting
------------
*/
"eslint.run": "onSave",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
/**
Miscelaneous
------------
*/
"typescript.tsdk": "node_modules/typescript/lib",
/**
TailwindCSS
------------
*/
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.fontFamily": "Office Code Pro, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 13
}
14 changes: 0 additions & 14 deletions __mocks__/combobox.js

This file was deleted.

11 changes: 0 additions & 11 deletions __mocks__/db/common.ts

This file was deleted.

52 changes: 0 additions & 52 deletions __mocks__/db/endorsementDetails.json

This file was deleted.

25 changes: 0 additions & 25 deletions __mocks__/db/users.ts

This file was deleted.

Loading

0 comments on commit 95e04ce

Please sign in to comment.