Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.json]
indent_size = 2

[*.{yml,yaml}]
indent_size = 2
46 changes: 46 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"root": true,
"overrides": [
{
"files": ["*.ts"],
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-empty-lifecycle-method": "warn",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-output-on-prefix": "error"
}
},
{
"files": ["*.html"],
"parser": "@angular-eslint/template-parser",
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/banana-in-box": "error",
"@angular-eslint/template/no-negated-async": "warn"
}
}
]
}
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed.
Also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue_number)

## Type of Change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update

## Branch Naming

- Branch name must follow the naming convention: `feature/{name}` or `hotfix/{name}`

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All new and existing tests pass
- [ ] My PR includes a version bump in `version.json`
- [ ] I have added necessary documentation (if appropriate)

## Testing

- Describe how you tested your changes
- Provide screenshots or logs if applicable

## Additional Notes

Any other information or context that reviewers might need.
22 changes: 22 additions & 0 deletions .github/workflows/branch-name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Enforce Branch Naming

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
branch-name-check:
runs-on: ubuntu-latest

steps:
- name: Check branch name
run: |
BRANCH_NAME="${{ github.head_ref }}"
echo "Checking branch name: $BRANCH_NAME"

# Allow feature/* and hotfix/*
if ! echo "$BRANCH_NAME" | grep -Eq '^(feature|hotfix)/[A-Za-z0-9_-]+$'; then
echo "❌ Branch name does not follow naming convention."
echo "Allowed patterns: feature/{name}, hotfix/{name}"
exit 1
fi
37 changes: 37 additions & 0 deletions .github/workflows/check-version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check Version Bump

on:
pull_request:
branches:
- main
- develop
- hotfix/*

jobs:
validate-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0 # Ensure full git history for diff

- name: Validate branch name and version bump
run: |
echo "🔍 Validating branch name and version bump..."

# Get current branch name (use GITHUB_HEAD_REF for PRs)
BRANCH_NAME="${GITHUB_HEAD_REF:-$(git rev-parse --abbrev-ref HEAD)}"
echo "Checking branch name: $BRANCH_NAME"

# Ensure main branch exists locally for diff
git fetch origin main

# Check if version.json was modified in the PR
if ! git diff --name-only origin/main...HEAD | grep -q "version.json"; then
echo "❌ PR must include a version bump in version.json"
exit 1
else
echo "✅ Version bump found"
fi
shell: bash
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Test

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
# Checkout repo
- uses: actions/checkout@v5

# Install pnpm from package.json
- uses: pnpm/action-setup@v4

# Setup Node.js
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

# Install dependencies
- name: Install dependencies
run: pnpm install

# Build Angular app
- name: Build
run: pnpm run build
11 changes: 11 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/' # location of package.json
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(deps)'
ignore:
- dependency-name: 'pnpm'
versions: ['10.0.0']
27 changes: 27 additions & 0 deletions .github/workflows/lint-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint & Prettier

on:
pull_request:
branches: [main, develop]

jobs:
lint-prettier:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install

- name: Run Lint
run: pnpm run lint

- name: Run Prettier
run: pnpm run prettier:write
26 changes: 26 additions & 0 deletions .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Security Audit

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
audit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm

- run: pnpm install

- name: Run security audit
run: pnpm audit --audit-level=moderate
32 changes: 32 additions & 0 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test & Coverage

on:
pull_request:
branches: [main, develop]

jobs:
test-coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install

- name: Run Vitest + coverage
run: pnpm run coverage

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
__screenshots__/

# System files
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm test
5 changes: 5 additions & 0 deletions .postcssrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": {
"@tailwindcss/postcss": {}
}
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
.angular
coverage
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"trailingComma": "all",
"endOfLine": "lf"
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:51204/__vitest__/"
}
]
}
Loading