Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging' into feat/idNumbers
Browse files Browse the repository at this point in the history
  • Loading branch information
murtagh27 committed Dec 19, 2024
2 parents f6467bb + 55bb212 commit 5002560
Show file tree
Hide file tree
Showing 95 changed files with 12,780 additions and 8,203 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.js

This file was deleted.

26 changes: 24 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches:
- main
- dev
- staging
pull_request:
branches:
- main
- dev
- staging

jobs:
lint-check:
Expand All @@ -23,6 +23,12 @@ jobs:
with:
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Use Yarn v4
run: corepack prepare [email protected] --activate

- name: Install dependencies
run: yarn install

Expand All @@ -41,6 +47,12 @@ jobs:
with:
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Use Yarn v4
run: corepack prepare [email protected] --activate

- name: Install dependencies
run: yarn install

Expand All @@ -62,8 +74,18 @@ jobs:
with:
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Use Yarn v4
run: corepack prepare [email protected] --activate

- name: Install dependencies
run: yarn install

- name: Generate Prisma Client
working-directory: apps/backend
run: yarn prisma generate

- name: Build
run: yarn build:backend
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- staging

jobs:
build-and-push:
Expand All @@ -23,7 +24,8 @@ jobs:
run: |
docker buildx create --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64 --push -t ${{ secrets.DOCKER_REGISTRY_URL }}/schbody-backend:latest -f apps/backend/Dockerfile ./apps/backend
TAG=${{ github.ref == 'refs/heads/main' && 'latest' || (github.ref == 'refs/heads/staging' && 'staging') }}
docker buildx build --platform linux/amd64 --push -t ${{ secrets.DOCKER_REGISTRY_URL }}/schbody-backend:$TAG -f apps/backend/Dockerfile ./apps/backend
- name: Logout from Docker Registry
run: docker logout ${{ secrets.DOCKER_REGISTRY_URL }}
42 changes: 42 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,48 @@
"outputCapture": "std",
"type": "node",
"restart": true
},
{
"name": "Next.js: debug server-side",
"cwd": "${workspaceFolder}/apps/frontend",
"type": "node-terminal",
"request": "launch",
"command": "yarn dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug client-side (Firefox)",
"type": "firefox",
"request": "launch",
"url": "http://localhost:3000",
"reAttach": true,
"pathMappings": [
{
"url": "webpack://_N_E",
"path": "${workspaceFolder}/apps/frontend"
}
]
},
{
"name": "Next.js: debug full stack",
"cwd": "${workspaceFolder}/apps/frontend",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/apps/frontend/node_modules/.bin/next",
"runtimeArgs": ["--inspect"],
"skipFiles": ["<node_internals>/**"],
"serverReadyAction": {
"action": "debugWithEdge",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}/apps/frontend"
}
}
]
}
Binary file added .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# SCHBody💪

by Kir-Dev

A Schönherz Kollégium konditermének weboldala és adminisztrációs rendszere.

- Ha hibát találsz, kérlek nyiss egy issue-t!
- Ha részt akarsz venni a fejlesztésben, vedd fel a kapcsolatot velünk és nyiss egy pull requestet!

Expand All @@ -10,7 +12,7 @@ A Schönherz Kollégium konditermének weboldala és adminisztrációs rendszere
### Prerequisites

- Node.js 20
- Yarn 1.22
- Yarn 4.5.1

### Installation

Expand Down Expand Up @@ -81,6 +83,3 @@ yarn build:backend
```

## Happy Coding!



1 change: 1 addition & 0 deletions apps/backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ AUTHSCH_CLIENT_SECRET=""
#Frontend
FRONTEND_URL=http://localhost:3000
FRONTEND_AUTHORIZED_URL=http://localhost:3000/auth/callback
AUTHSCH_REDIRECT_URI=http://localhost:3300/auth/callback
20 changes: 0 additions & 20 deletions apps/backend/.eslintrc.js

This file was deleted.

17 changes: 17 additions & 0 deletions apps/backend/docker-compose-db.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: schbody-dev-db

services:
postgres:
image: postgres:13.10
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data

volumes:
postgres_data: {}
26 changes: 26 additions & 0 deletions apps/backend/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: schbody

services:
app:
build:
context: .
ports:
- '${BACKEND_PORT}:${BACKEND_PORT}'
env_file:
- .env
restart: always
depends_on:
- db

db:
image: postgres:13.10
env_file:
- .env
restart: always
ports:
- '${POSTGRES_PORT}:${POSTGRES_PORT}'
volumes:
- schbody_db_folder:/var/lib/postgresql/data

volumes:
schbody_db_folder:
48 changes: 48 additions & 0 deletions apps/backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
const config = [
{
ignores: ['**/.prettierrc.js'],
},
...compat.extends('plugin:@typescript-eslint/recommended', 'nestjs', 'plugin:@next/next/recommended'),
{
plugins: {
'@typescript-eslint': typescriptEslintEslintPlugin,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',

parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
},

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',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
},
];

export default config;
38 changes: 20 additions & 18 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,48 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/src/main",
"lint": "eslint 'src/**/*.ts'",
"db:seed": "prisma db seed"
},
"prisma": {
"seed": "ts-node prisma/seed.ts"
},
"dependencies": {
"@kir-dev/passport-authsch": "^2.0.4",
"@nestjs/common": "^10.3.8",
"@nestjs/config": "^3.2.3",
"@nestjs/core": "^10.3.8",
"@kir-dev/passport-authsch": "^2.1.0",
"@nestjs/common": "^10.4.7",
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.4.7",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.3.8",
"@nestjs/swagger": "^7.3.1",
"@prisma/client": "^5.21.1",
"@radix-ui/react-dialog": "^1.1.1",
"@nestjs/platform-express": "^10.4.7",
"@nestjs/swagger": "^8.0.3",
"@prisma/client": "^6.0.1",
"@radix-ui/react-dialog": "^1.1.2",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"nestjs-prisma": "^0.23.0",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"reflect-metadata": "^0.2.2",
"rimraf": "^5.0.5",
"rimraf": "^6.0.1",
"rxjs": "^7.8.1",
"sharp": "^0.33.5"
},
"devDependencies": {
"@faker-js/faker": "^9.0.3",
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@types/express": "^4.17.21",
"@faker-js/faker": "^9.2.0",
"@nestjs/cli": "^10.4.7",
"@nestjs/schematics": "^10.2.3",
"@types/express": "^5.0.0",
"@types/multer": "^1.4.12",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"prisma": "^5.21.1",
"@types/node": "^20.17.6",
"eslint": "^9.14.0",
"eslint-config-nestjs": "^0.8.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"prisma": "^6.0.1",
"source-map-support": "^0.5.21",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "^5.4.5"
"typescript": "^5.6.3"
}
}
Loading

0 comments on commit 5002560

Please sign in to comment.