Skip to content

Commit 7cede8d

Browse files
committed
initial
0 parents  commit 7cede8d

36 files changed

+7956
-0
lines changed

.env.EXAMPLE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Database configuration
2+
DB_DIALECT=postgres
3+
DB_HOST=
4+
DB_PORT=
5+
DB_NAME=
6+
DB_USER=
7+
DB_PASSWORD=
8+
9+
## Server configuration
10+
NODE_ENV=development
11+
NODE_HOST=http://localhost
12+
NODE_PORT=3001
13+
14+
## JSON Web Token configuration
15+
JWT_SECRET=
16+
JWT_EXPIRES_IN=28800 # 8 hours
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Quality Checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
paths-ignore:
9+
- .github/workflows/quality-checks.yml # Ignore changes to this file
10+
# Allows you to run this workflow manually from the Actions tap on GitHub.
11+
workflow_dispatch:
12+
13+
jobs:
14+
quality-checks:
15+
runs-on: ubuntu-latest
16+
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-file: .nvmrc
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run tests
31+
run: npm run test:run
32+
33+
- name: Run TypeScript type checking
34+
run: npm run type-check
35+
36+
- name: Run ESLint and fix
37+
run: npm run lint:fix
38+
39+
- name: Format with Prettier
40+
run: npm run format
41+
42+
- name: Check for remaining ESLint errors
43+
run: npm run lint
44+
45+
- name: Check for remaining formatting issues
46+
run: npm run format:check

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Node.js dependencies
2+
node_modules/
3+
4+
# Logs
5+
logs/
6+
*.log
7+
npm-debug.log*
8+
9+
# Environment variables
10+
.env
11+
.env.*
12+
!.env.EXAMPLE
13+
14+
# Seed
15+
seed.ts
16+
17+
# Build output
18+
dist/
19+
20+
# TypeScript
21+
*.tsbuildinfo
22+
23+
# OS generated files
24+
.DS_Store
25+
Thumbs.db
26+
27+
# Test coverage
28+
coverage/

.husky/pre-commit

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
echo '🕦 Running Tests before committing'
2+
echo 'this may take a while, please be patient.'
3+
4+
# Check if the tests are passing
5+
npm run test:run || {
6+
echo '❌ You have issue in your code, please check tests.'
7+
echo 'Run npm run test, make changes and try committing again.';
8+
false;
9+
}
10+
11+
echo '🕦 Checking types before committing'
12+
echo 'this may take a while, please be patient.'
13+
14+
# Check types
15+
npm run type-check || {
16+
echo '❌ You have issue in your code, please check types.'
17+
echo 'Run npm run type-check, make changes and try committing again.';
18+
false;
19+
}
20+
21+
echo '🕦 Linting your changes before committing'
22+
echo 'this may take a while, please be patient.'
23+
24+
# Check ESLint Standards
25+
npx lint-staged ||
26+
(
27+
echo '❌ You have issue in your code, please check linter.'
28+
echo 'Run npm run lint, make changes and try committing again.';
29+
false;
30+
)
31+
32+
echo '✅ No errors found: committing this now.... 🚀'

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.14.0

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package*.json
2+
build
3+
dist
4+
coverage
5+
resources
6+
7+
**/node_modules/*
8+
**/.vscode/*
9+
**/.idea/*
10+
**/.astro/*
11+
12+
*.md

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"endOfLine": "auto",
3+
"semi": true,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"tabWidth": 4,
7+
"printWidth": 140,
8+
"bracketSpacing": true,
9+
"bracketSameLine": true
10+
}

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"ms-vscode.vscode-typescript-next"
6+
]
7+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true
4+
}

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Default owners for everything in the repo
2+
3+
* @reneSpeaks

0 commit comments

Comments
 (0)