Skip to content

Commit

Permalink
Changed framework to NestJS, implemented authentication, authorizatio…
Browse files Browse the repository at this point in the history
…n and validation (#6)

* Updated gitignore for MacOS

* Nest initial scaffolding,
Vite react-ts initial scaffolding, with working auth0 authentication,
token creation and axios client

* Revert "Nest initial scaffolding,"

This reverts commit f4edcad.

* wiped ci scripts

* Setup pnpm workspace

* Body validation working
Next step authorization

* Deleted remnaince of typeorm messup

* Authorization using jwt with a global guard
(may need revisiting for authorization)

* Revert "Authorization using jwt with a global guard"

This reverts commit 093356e.

* Auth with oauth2 official middleware

* Moved auth0 constants to config

* Small commit pre-merge

* Revert "Revert "Authorization using jwt with a global guard""

This reverts commit 018711c.

* Using app guard

* Now encoding user role in request,
better swagger annotations

* In the process of implementing authorization
IMPORTANT: changed build system, now both frontend and backend import typescript, compile it, watch it, do their own thing

* Fixed preview command with updated compiled file path

* First phase of authorization: simple rules
next step:
- casl + prisma (or other supported orms) to avoid weird logic,
and to filter the resource for the rows that are accessible to the current user
- oauth0 service to verify that some fields match the user's data on user creation

* Added access control to all user routes

* avaiabilitiesTable updated

* Proper validation with Joi of all request fields & prettier reformat

* Integrated previously written frontend with monorepo
moved fronted to vite cause speed (and typescript transpiling)
Formatting scripts

* Moved to env variables with env files instead of yaml config file for the api

* Ultima commit di Marco

---------

Co-authored-by: Marco Pappalardo <[email protected]>
  • Loading branch information
friedbyalice and Marco Pappalardo authored Mar 30, 2023
1 parent 03be692 commit b811390
Show file tree
Hide file tree
Showing 202 changed files with 8,828 additions and 55,025 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/ci.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/migrations.yml

This file was deleted.

17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@ node_modules/
build/
api/src/modules/GAuth/authInfo
.idea/
/api/.env
/api/dist/
/**/.env
/api/config/*.yaml
/**/dist
/**/*.tsbuildinfo
.vscode

/fontend_tmp
/frontend_tmp/**

tmp-*

**/.DS_Store

.*
!.gitignore
2 changes: 0 additions & 2 deletions api/.dockerignore

This file was deleted.

25 changes: 25 additions & 0 deletions api/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
6 changes: 6 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea/
.vscode/
node_modules/
build/
tmp/
temp/
4 changes: 4 additions & 0 deletions api/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
Loading

0 comments on commit b811390

Please sign in to comment.