Skip to content

Commit c7d1de6

Browse files
authored
Initial commit
0 parents  commit c7d1de6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+8254
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/analysis.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
branches:
10+
- main
11+
- dev
12+
13+
jobs:
14+
lint-check:
15+
name: ESLint Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
26+
- name: Enable Corepack
27+
run: corepack enable
28+
29+
- name: Use Pnpm v10
30+
run: corepack prepare pnpm@latest-10 --activate
31+
32+
- name: Install dependencies
33+
run: pnpm install --no-frozen-lockfile
34+
35+
- name: Run ESLint check
36+
run: pnpm lint
37+
38+
format-check:
39+
name: Prettier Check
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: 22
49+
50+
- name: Enable Corepack
51+
run: corepack enable
52+
53+
- name: Use Pnpm v10
54+
run: corepack prepare pnpm@latest-10 --activate
55+
56+
- name: Install dependencies
57+
run: pnpm install --no-frozen-lockfile
58+
59+
- name: Run Prettier check
60+
run: pnpm format:check
61+
62+
build:
63+
name: Build
64+
runs-on: ubuntu-latest
65+
needs:
66+
- lint-check
67+
- format-check
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: 22
76+
77+
- name: Enable Corepack
78+
run: corepack enable
79+
80+
- name: Use Pnpm
81+
run: corepack prepare pnpm@latest-10 --activate
82+
83+
- name: Install dependencies
84+
run: pnpm install --no-frozen-lockfile
85+
86+
- name: Build backend
87+
run: pnpm build:backend
88+
89+
- name: Build frontend
90+
run: pnpm build:frontend
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Check Prisma Migrations
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'apps/backend/prisma/schema.prisma'
7+
- 'apps/backend/prisma/migrations/**'
8+
9+
jobs:
10+
check_prisma_changes:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # Fetch all history for all branches
17+
18+
- name: Fetch base branch
19+
run: git fetch origin ${{ github.base_ref }}
20+
21+
- name: Check if `schema.prisma` was modified in the PR
22+
id: check_schema
23+
run: |
24+
if git diff --name-only origin/${{ github.base_ref }}... | grep -q 'apps/backend/prisma/schema.prisma'; then
25+
echo "schema_changed=true" >> $GITHUB_ENV
26+
else
27+
echo "schema_changed=false" >> $GITHUB_ENV
28+
fi
29+
30+
- name: Check if a new migration was added in the PR
31+
id: check_migrations
32+
run: |
33+
if git diff --name-only --diff-filter=A origin/${{ github.base_ref }}... | grep -q 'apps/backend/prisma/migrations/'; then
34+
echo "migration_added=true" >> $GITHUB_ENV
35+
else
36+
echo "migration_added=false" >> $GITHUB_ENV
37+
fi
38+
39+
- name: Fail if `schema.prisma` was modified and no migration was added
40+
if: env.schema_changed == 'true' && env.migration_added == 'false'
41+
run: |
42+
echo "The schema.prisma file was modified, but no new migration was added."
43+
exit 1

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dist
2+
build
3+
node_modules
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
.DS_Store
8+
.yarn

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/next-nest-template.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/prettier.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.idea
3+
dist
4+
.next

.prettierrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
semi: true,
3+
singleQuote: true,
4+
trailingComma: 'es5',
5+
bracketSpacing: true,
6+
printWidth: 120,
7+
jsxSingleQuote: true,
8+
bracketSameLine: false,
9+
endOfLine: 'lf',
10+
};

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "Prisma.prisma"]
3+
}

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug backend",
6+
"cwd": "${workspaceFolder}/apps/backend",
7+
"runtimeArgs": ["run", "start:debug"],
8+
"runtimeExecutable": "yarn",
9+
"request": "launch",
10+
"skipFiles": ["<node_internals>/**"],
11+
"outputCapture": "std",
12+
"type": "node",
13+
"restart": true
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.insertSpaces": true,
4+
"editor.renderWhitespace": "boundary",
5+
"editor.rulers": [120],
6+
"editor.formatOnSave": true,
7+
"files.encoding": "utf8",
8+
"files.trimTrailingWhitespace": true,
9+
"files.insertFinalNewline": true,
10+
"files.eol": "\n",
11+
"search.exclude": {
12+
"public/**": true,
13+
"node_modules/**": true
14+
},
15+
"editor.defaultFormatter": "esbenp.prettier-vscode",
16+
"editor.codeActionsOnSave": {
17+
"source.organizeImports": "explicit",
18+
"source.formatDocument": "explicit",
19+
"source.fixAll.eslint": "explicit"
20+
},
21+
"[prisma]": {
22+
"editor.defaultFormatter": "Prisma.prisma"
23+
}
24+
}

0 commit comments

Comments
 (0)