Skip to content
Merged

Dev #41

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6ae8255
fix(mobile): update tsconfig.spec.json to use NodeNext module resolution
alde23 Apr 26, 2026
f5f104f
chore(pipeline): update data pipeline gitignore rules
Nora-design Apr 27, 2026
f14604a
refactor(pipeline): move data pipeline under apps
Nora-design Apr 27, 2026
9c098a3
docs(pipeline)/define-pipeline-requirements
Nora-design Apr 27, 2026
96b3455
feat(pipeline): add lost structured manual extraction pipeline
Nora-design Apr 27, 2026
35f05a9
chore(pipeline): add initial extracted demo outputs
Nora-design Apr 27, 2026
35491e0
feat(pipeline): add validation and extraction quality gates
Nora-design Apr 27, 2026
7be1fa5
chore(pipeline): Remove deprecated demo output JSONs.
Nora-design Apr 27, 2026
fa03bf9
chore(pipeline): add initial demo dataset pack
Nora-design Apr 27, 2026
f4de397
Merge pull request #9 from alde23/refactor(pipeline)/clean-data-pipel…
alde23 Apr 28, 2026
9773743
Merge branch 'dev' into feat(pipeline)/revise-missing-components
Nora-design Apr 28, 2026
04546bb
Merge pull request #10 from alde23/feat(pipeline)/revise-missing-comp…
alde23 Apr 29, 2026
ac7eaf3
feat(auth): add login and register auth flow
hzijad Apr 30, 2026
3668ffa
fix(api): align schema with Prisma 7 and implement soft delete logic
alde23 May 1, 2026
303e127
feat(api): baseline database schema for sprint1
alde23 May 1, 2026
0468deb
feat(api): initial schema baseline and docker setup
alde23 May 1, 2026
dcef0d8
Merge pull request #11 from alde23/fix(api)/prisma7-schema-alignment
alde23 May 1, 2026
16f137c
chore(ci): separate migration workflow and add push triggers
alde23 May 1, 2026
c98cc2d
Merge pull request #12 from alde23/chore(ci)/separate-migrate-workflow
alde23 May 1, 2026
dd882d7
A
alde23 May 1, 2026
16dcda4
fix(ci): Tell npm to skip husky
alde23 May 1, 2026
0db2368
chore(ci): test migration workflow
alde23 May 1, 2026
29c7a37
fix(api): add ignore scripts to migrate workflow
alde23 May 1, 2026
80c836a
fix(api): add prisma config path to migrate.yml
alde23 May 1, 2026
310965e
fix(api): add direct url flag to migrate.yml
alde23 May 1, 2026
f48059e
fix(api): test migrate.yml
alde23 May 1, 2026
95f2b9e
fix(api): test migrate.yml again
alde23 May 1, 2026
8c2b569
fix(api): fix path in migrations.yml
alde23 May 1, 2026
bc33614
fix(api): test new secrets
alde23 May 1, 2026
26f376a
fix(api): adjust secret
alde23 May 1, 2026
8d37ee3
fix(api): adjust secret again
alde23 May 1, 2026
c3ae7aa
fix(api): fix url refrence in migrate.yml
alde23 May 1, 2026
75f258b
fix(api): test migration workflow with debug line
alde23 May 1, 2026
f3705fb
fix(api): test migration workflow with secrets passed higher
alde23 May 1, 2026
8764ee7
fix(api): test prisma config change
alde23 May 1, 2026
4e3de00
fix(api): fix secret
alde23 May 1, 2026
178b3f7
fix(api): fix secret again
alde23 May 1, 2026
a4339ba
fix(api): add larger console log to prisma config
alde23 May 1, 2026
d07e1e1
fix(api): adjust secrets
alde23 May 1, 2026
d695d6b
fix(api): cleanup and finalize migration pipeline
alde23 May 1, 2026
0dcad77
feat(api): add zod env validation and wire into nestjs config
alde23 May 3, 2026
95f4cca
Merge pull request #13 from alde23/feat(api)/env-config-zod
alde23 May 3, 2026
919c89b
chore(api): add missing app module with config module wiring
alde23 May 3, 2026
0bdb480
Merge pull request #14 from alde23/feat(api)/refactor-env-config-service
alde23 May 3, 2026
0c837b1
feat(api): add prisma seed script with realistic hvac data
alde23 May 4, 2026
3634f0c
chore(api): configure tsx seed runner and clean up legacy prisma seed…
alde23 May 4, 2026
8045d6c
Merge pull request #15 from alde23/feat(api)/seed-script
alde23 May 4, 2026
c4d6cef
chore(mobile): sync package-lock after detox install
alde23 May 4, 2026
2bf41a4
Merge pull request #17 from alde23/feat(mobile)/login-register-auth-flow
alde23 May 4, 2026
a9721cf
chore(mobile): update expo packages and resolve layout merge conflict
alde23 May 4, 2026
c4b7356
chore(mobile): merge dev and resolve layout conflict
alde23 May 4, 2026
686fb55
feat(api): add auth me endpoint
kebab0o May 4, 2026
9a79f34
feat(api): issue refresh token on login
kebab0o May 4, 2026
66af4be
feat(api): add refresh token rotation
kebab0o May 5, 2026
4796910
feat(api): add auth logout invalidation
kebab0o May 10, 2026
f116dbc
feat(api): add sync service baseline
kebab0o May 10, 2026
0d06f44
chore(api): add sync smoke tests
kebab0o May 10, 2026
d2563bb
chore(api): document sync dto and validate payload
kebab0o May 10, 2026
f9154b1
fix(api): align sync json types with prisma
kebab0o May 10, 2026
997bdb9
Merge pull request #18 from alde23/feat(api)/auth-flow
alde23 May 12, 2026
1d98dd0
chore(mobile): add WatermelonDB deps and Babel config
alde23 May 13, 2026
48ba0b7
feat(mobile): add WatermelonDB schema and jobs sync service
alde23 May 13, 2026
0a0b46e
feat(mobile): wire jobs screen and auth to WatermelonDB sync
alde23 May 13, 2026
2156b3e
feat(mobile): finish i18n setup and clarify husky checks
hzijad May 14, 2026
296bb99
fix(mobile): correct JSX and translations in jobs screen
hzijad May 14, 2026
47b26de
fix(mobile): watermelondb native setup with postprebuild fix script
alde23 May 14, 2026
2a59251
chore(shared): update root package dependencies
alde23 May 14, 2026
b02da6f
feat(api): add job status endpoint
kebab0o May 16, 2026
a18ed7f
feat(api): add scheduling stub endpoints
kebab0o May 16, 2026
a3d95c2
chore(api): add sprint 1 backend smoke tests
kebab0o May 16, 2026
00caab1
docs(api): add db bootstrap and seed guide
kebab0o May 16, 2026
038f150
feat(mobile): add env-based maps config and hidden dev auth bypass
alde23 May 16, 2026
19ab065
Merge pull request #21 from alde23/feat(api)/job-status
alde23 May 16, 2026
f9f56d2
Merge pull request #22 from alde23/feat(api)/scheduling-stubs
alde23 May 16, 2026
325cf71
Merge pull request #23 from alde23/chore(api)/db-bootstrap-docs
alde23 May 16, 2026
7933ab4
Merge pull request #24 from alde23/chore(api)/sprint1-smoke-tests
alde23 May 16, 2026
8b9bbf8
fix(api): harden sync reconcile validation
kebab0o May 16, 2026
d90245e
fix(api): enforce sync idempotency
kebab0o May 16, 2026
a6378fa
feat(api): add library service and ingestion
kebab0o May 17, 2026
d3d9d8f
chore(api): clean up library service types
kebab0o May 17, 2026
927e5ca
fix(api): include model relations for library lookups
kebab0o May 17, 2026
04ade03
feat(mobile): cleanup and settings changes
hzijad May 18, 2026
9c969bb
feat(mobile): test push
hzijad May 18, 2026
958209a
Merge pull request #20 from alde23/feat(api)/sync-baseline
alde23 May 18, 2026
f8690b8
chore(shared): add legacy-peer-deps to fix with-observables React 19 …
alde23 May 18, 2026
5157e29
feat(api): add service log service
kebab0o May 19, 2026
125bc41
chore(api): fix service log spec user
kebab0o May 19, 2026
5cdff77
chore(api): merge dev into service-logs
kebab0o May 19, 2026
74eec37
chore(api): merge dev into library
kebab0o May 19, 2026
88ae841
feat(api): add analytics service
kebab0o May 19, 2026
0dfb177
Merge pull request #25 from alde23/feat(mobile)/watermelondb-setup
alde23 May 19, 2026
f2f52ff
Merge pull request #28 from alde23/feat(api)/service-logs
alde23 May 19, 2026
0c0499a
Merge branch 'dev' into feat(api)/library
alde23 May 23, 2026
dd48d11
Merge pull request #27 from alde23/feat(api)/library
alde23 May 23, 2026
ef548ea
Enforce iso format
alde23 May 23, 2026
29f4f69
Compute the end of month based on the month of the provided date
alde23 May 23, 2026
527da2c
Merge pull request #29 from alde23/feat(api)/analytics
alde23 May 23, 2026
23fbd24
chore(mobile): resolve lockfile sync issue
alde23 May 23, 2026
32cba33
chore(mobile): merge dev into progress-i18n
alde23 May 23, 2026
9877971
feat(mobile): add i18n to jobs screen
alde23 May 23, 2026
3e84d35
chore(mobile): consolidate auth bypass for devs
alde23 May 23, 2026
74efd9a
Merge pull request #26 from alde23/feat(mobile)/progress-i18n
alde23 May 23, 2026
3ffe10d
feat(api): add warranty and commissioning services
kebab0o May 24, 2026
13984c0
feat(api): add sync conflict resolution and health
kebab0o May 24, 2026
8401550
feat(pipeline): add manual pdf downloader
Nora-design May 25, 2026
1f1cba2
Update .gitignore
Nora-design May 25, 2026
fbb5ef2
Merge pull request #32 from alde23/feat(pipeline)/add-manual-pdf-down…
alde23 May 28, 2026
d4fcd15
chore(api): merge dev into warranty commissioning
kebab0o May 29, 2026
fb5c409
chore(api): merge dev into sync conflicts
kebab0o May 29, 2026
c7cb8f1
feat(mobile): cover backend integration flows
hzijad May 29, 2026
e7540dd
Merge pull request #30 from alde23/feat(api)/warranty-commissioning
alde23 May 29, 2026
292a767
Merge branch 'dev' into feat(api)/sync-conflicts
alde23 May 29, 2026
4d436b8
Merge pull request #31 from alde23/feat(api)/sync-conflicts
alde23 May 29, 2026
0174653
fix(api): resolve TypeScript type-checking compile error in commissio…
alde23 May 29, 2026
a9e7f88
Merge pull request #33 from alde23/fix(api)/commissioning-type-error
alde23 May 29, 2026
719b14e
feat(mobile): upgrade database to version 3 and add migrations
alde23 May 29, 2026
450db54
feat(mobile): implement and register all 10 new database models
alde23 May 29, 2026
7216965
feat(mobile): implement offline catalog, service log, and warranty CR…
alde23 May 29, 2026
8924a6d
feat(mobile): implement unified push/pull sync orchestrator and integ…
alde23 May 29, 2026
0fcf55d
fix(mobile): resolve type-checking and linter compliance diagnostics …
alde23 May 29, 2026
48dd79a
Merge pull request #34 from alde23/feat(mobile)/watermelondb-sync-exp…
alde23 May 29, 2026
9d254bc
chore(shared): setup docker postgres, ci, mobile auth, and schema upd…
alde23 May 29, 2026
ed17784
feat(mobile): implement offline expenses UI, auto-sync and skip valid…
alde23 May 29, 2026
e2cc381
chore(shared): configure coverage thresholds and fix test imports
alde23 May 29, 2026
754e8d9
feat(mobile): add secure auth storage and tests
alde23 May 29, 2026
81486d8
chore(shared): disable no-explicit-any for test files and mocks in es…
alde23 May 29, 2026
a851580
fix(mobile): resolve lint warnings, missing hook deps and any typings
alde23 May 29, 2026
6687ad6
fix(api): remove duplicate object key in service logs
alde23 May 29, 2026
1213352
fix(shared): resolve mobile native build issues and backend schema drift
alde23 May 30, 2026
226b04a
feat(pipeline): add extracted demo dataset and usage guide
Nora-design May 30, 2026
22fea7c
Merge pull request #35 from alde23/feat(pipeline)/add-brand-run-contr…
alde23 May 31, 2026
d851a3d
Merge pull request #37 from alde23/chore(shared)/infrastructure-setup
alde23 May 31, 2026
3a1c707
Merge pull request #36 from alde23/feat(mobile)/offline-expenses-sync
alde23 May 31, 2026
b749bb9
Merge pull request #38 from alde23/chore(shared)/coverage-and-e2e
alde23 May 31, 2026
afc3f7b
fix(ci): upgrade node-version to 22 for dev pipeline
alde23 May 31, 2026
f697819
chore(mobile): resolve merge conflicts with dev
alde23 Jun 1, 2026
505b191
fix(ci): fix prisma schema path in github actions
alde23 Jun 1, 2026
62e63c2
fix(ci): run prisma from api directory
alde23 Jun 1, 2026
92f0869
fix(ci): explicitly build shared-schema before api
alde23 Jun 1, 2026
7cc4d3f
fix(mobile): remove redundant jest config file
alde23 Jun 1, 2026
7b7758b
fix(mobile): resolve jest test timeouts and improve test coverage >70%
alde23 Jun 1, 2026
7181741
chore(api): add missing test files to hit 70 percent coverage
alde23 Jun 1, 2026
4db6a8c
ci(pipeline): add --forceExit to fix hanging mobile tests
alde23 Jun 1, 2026
0ba8be0
Merge pull request #39 from alde23/feat(mobile)/test-mobile-cover-bac…
alde23 Jun 1, 2026
76f724a
chore(api): add api e2e tests
kebab0o Jun 1, 2026
0073d60
Merge pull request #40 from alde23/chore(shared)/e2e-tests
alde23 Jun 1, 2026
ae65798
fix(mobile): move spec files out of app routing directory
alde23 Jun 1, 2026
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
8 changes: 7 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ DIRECT_URL=
SUPABASE_SERVICE_ROLE_KEY=
SUPABASE_ANON_KEY=
JWT_SECRET=
PORT=3000
GOOGLE_MAPS_API_KEY=
A3S_BYPASS_LOGIN=false
A3S_BYPASS_USERNAME=demo-tech
A3S_BYPASS_USER_ID=tech-demo
A3S_BYPASS_TOKEN=dev-bypass-token

PORT=3000
74 changes: 45 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,57 @@
name: CI
name: CI Pipeline

on:
push:
branches: [main, dev]
paths-ignore:
- '**.md'
- 'docs/**'
- '.vscode/**'
branches: [ main, dev ]
pull_request:
paths-ignore:
- '**.md'

permissions:
actions: read
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
branches: [ main, dev ]

jobs:
main:
test-and-build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: a3service
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4
with:
filter: tree:0
fetch-depth: 0
- uses: actions/checkout@v3

- uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 24
cache: 'npm'
node-version: 22

- name: Install dependencies
run: npm ci

- name: Generate Prisma Client
run: cd apps/api && npx prisma generate
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/a3service
DIRECT_URL: postgresql://postgres:postgres@localhost:5433/a3service

- name: Deploy Prisma Migrations
run: cd apps/api && npx prisma migrate deploy
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/a3service
DIRECT_URL: postgresql://postgres:postgres@localhost:5433/a3service

# Use --ignore-scripts to skip the husky 'prepare' stage entirely
- run: npm ci --ignore-scripts

- uses: nrwl/nx-set-shas@v4
- name: Build API
run: npx nx build shared-schema && npx nx build api

- run: npx nx affected -t lint
- name: Run Tests
run: npx nx run-many --target=test --all --coverage --forceExit
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/a3service
DIRECT_URL: postgresql://postgres:postgres@localhost:5433/a3service
32 changes: 32 additions & 0 deletions .github/workflows/migrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Migrate

on:
push:
branches:
- dev
paths:
- 'apps/api/prisma/**'
workflow_dispatch:

jobs:
migrate:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DIRECT_URL }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Generate Prisma Client
run: npx prisma generate --schema=apps/api/prisma/schema.prisma

- name: Run migration
run: npx prisma migrate deploy --schema=apps/api/prisma/schema.prisma --config=apps/api/prisma.config.ts
21 changes: 18 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,33 @@ vitest.config.*.timestamp*
__pycache__/
*.pyc

# Python
# Python virtual environments
.venv/
venv/

# Python cache
__pycache__/
*.pyc
*.pyo
.python-version
.pytest_cache/
.mypy_cache/
.ruff_cache/

#.python-version <-- if using pyenv, but we want to keep it in the repo to ensure everyone uses the same Python version

# Jupyter
.ipynb_checkpoints/

# Data pipeline
# Data pipeline local/private files
data-pipeline/.env
apps/data-pipeline/.env
data-pipeline/raw_pdfs/
apps/data-pipeline/raw_pdfs/
apps/data-pipeline/notes/
apps/data-pipeline/output_json/_debug/
# for scraper
apps/data-pipeline/input/manual_sources.generated.json


# TODO: migrate raw_pdfs to Git LFS when volume grows
# apps/data-pipeline/raw_pdfs/
Expand Down
39 changes: 21 additions & 18 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# Get the commit message
commit_msg=$(cat "$1")
#!/bin/sh

# Validate commit message format:
# type(scope): description
# Allowed types: feat, fix, chore, docs, refactor, ci
# Allowed scopes: mobile, api, shared, pipeline, ci

# A3Service Regex: type(scope): description
commit_msg=$(cat "$1")
regex="^(feat|fix|chore|docs|refactor|ci)\((mobile|api|shared|pipeline|ci)\): .+$"

# Universal shell matching
if echo "$commit_msg" | grep -Eq "$regex"; then
echo "Commit message follows convention."
echo "Commit message follows convention."
exit 0
else
echo "----------------------------------------------------------------------"
echo "❌ COMMIT FAILED"
echo "Message: $commit_msg"
echo ""
echo "Format must be: type(scope): description"
echo "Allowed Types: feat, fix, chore, docs, refactor, ci"
echo "Allowed Scopes: mobile, api, shared, pipeline, ci"
echo ""
echo "Example: feat(api): implement boiler service logic"
echo "----------------------------------------------------------------------"
exit 1
fi
fi

echo "----------------------------------------------------------------------"
echo "COMMIT FAILED"
echo "Message: $commit_msg"
echo ""
echo "Format must be: type(scope): description"
echo "Allowed Types: feat, fix, chore, docs, refactor, ci"
echo "Allowed Scopes: mobile, api, shared, pipeline, ci"
echo ""
echo "Example: feat(api): implement boiler service logic"
echo "----------------------------------------------------------------------"
exit 1
29 changes: 11 additions & 18 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
#!/bin/sh

local_branch_name="$(git rev-parse --abbrev-ref HEAD)"
# Pre-commit checks:
# 1) Enforce branch naming convention
# 2) Run lint for affected projects

# 1. --- EXCLUSION BLOCK ---
# Allow structural branches to bypass naming conventions
if [[ "$local_branch_name" == "main" || "$local_branch_name" == "dev" ]]; then
echo "✅ Structural branch detected ($local_branch_name). Skipping naming check."
else
# 2. --- NAMING ENFORCEMENT ---
valid_branch_regex="^(feat|fix|chore|docs|refactor)\((mobile|api|shared|pipeline|ci)\)\/[a-z0-9-]+$"
local_branch_name="$(git rev-parse --abbrev-ref HEAD)"
valid_branch_regex="^(feat|fix|chore|docs|refactor|ci)\((mobile|api|shared|pipeline|ci)\)/[a-z0-9-]+$"

if [[ ! $local_branch_name =~ $valid_branch_regex ]]; then
if [ "$local_branch_name" != "main" ] && [ "$local_branch_name" != "dev" ]; then
if ! echo "$local_branch_name" | grep -Eq "$valid_branch_regex"; then
echo "----------------------------------------------------------------------"
echo "ERROR: Invalid branch name '$local_branch_name'"
echo "ERROR: Invalid branch name '$local_branch_name'"
echo "A3Service standards require: type(scope)/description"
echo "----------------------------------------------------------------------"
echo "💡 HOW TO FIX THIS:"
echo "How to fix:"
echo "1. Rename your branch locally:"
echo " git branch -m 'feat(scope)/your-description'"
echo ""
Expand All @@ -24,17 +22,12 @@ else
echo " B) Delete remote: git push origin --delete '$local_branch_name'"
echo " C) Push new name: git push origin 'feat(scope)/new-name'"
echo ""
echo "3. Or, delete it and start over:"
echo " git checkout <base-branch> # e.g., main or a feature branch"
echo " git branch -D '$local_branch_name'"
echo ""
echo "ALLOWED TYPES: feat, fix, chore, docs, refactor"
echo "ALLOWED TYPES: feat, fix, chore, docs, refactor, ci"
echo "ALLOWED SCOPES: mobile, api, shared, pipeline, ci"
echo "----------------------------------------------------------------------"
exit 1
fi
fi

# 3. --- QUALITY GATE ---
echo "🔍 Running Nx Linter on affected files..."
echo "Running Nx lint on affected projects..."
npx nx affected -t lint --base=origin/main --parallel=3
29 changes: 11 additions & 18 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
#!/bin/sh

local_branch_name="$(git rev-parse --abbrev-ref HEAD)"
# Pre-push checks:
# 1) Enforce branch naming convention
# 2) Run lint for affected projects

# 1. --- EXCLUSION BLOCK ---
# Allow structural branches to bypass naming conventions
if [[ "$local_branch_name" == "main" || "$local_branch_name" == "dev" ]]; then
echo "✅ Structural branch detected ($local_branch_name). Skipping naming check."
else
# 2. --- NAMING ENFORCEMENT ---
valid_branch_regex="^(feat|fix|chore|docs|refactor)\((mobile|api|shared|pipeline|ci)\)\/[a-z0-9-]+$"
local_branch_name="$(git rev-parse --abbrev-ref HEAD)"
valid_branch_regex="^(feat|fix|chore|docs|refactor|ci)\((mobile|api|shared|pipeline|ci)\)/[a-z0-9-]+$"

if [[ ! $local_branch_name =~ $valid_branch_regex ]]; then
if [ "$local_branch_name" != "main" ] && [ "$local_branch_name" != "dev" ]; then
if ! echo "$local_branch_name" | grep -Eq "$valid_branch_regex"; then
echo "----------------------------------------------------------------------"
echo "ERROR: Invalid branch name '$local_branch_name'"
echo "ERROR: Invalid branch name '$local_branch_name'"
echo "A3Service standards require: type(scope)/description"
echo "----------------------------------------------------------------------"
echo "💡 HOW TO FIX THIS:"
echo "How to fix:"
echo "1. Rename your branch locally:"
echo " git branch -m 'feat(scope)/your-description'"
echo ""
Expand All @@ -24,17 +22,12 @@ else
echo " B) Delete remote: git push origin --delete '$local_branch_name'"
echo " C) Push new name: git push origin 'feat(scope)/new-name'"
echo ""
echo "3. Or, delete it and start over:"
echo " git checkout <base-branch> # e.g., main or a feature branch"
echo " git branch -D '$local_branch_name'"
echo ""
echo "ALLOWED TYPES: feat, fix, chore, docs, refactor"
echo "ALLOWED TYPES: feat, fix, chore, docs, refactor, ci"
echo "ALLOWED SCOPES: mobile, api, shared, pipeline, ci"
echo "----------------------------------------------------------------------"
exit 1
fi
fi

# 3. --- QUALITY GATE ---
echo "🔍 Running Nx Linter on affected files..."
echo "Running Nx lint on affected projects..."
npx nx affected -t lint --base=origin/main --parallel=3
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
19 changes: 19 additions & 0 deletions apps/api/jest.e2e.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
displayName: 'api-e2e',
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
rootDir: __dirname,
testMatch: ['<rootDir>/tests/e2e/**/*.spec.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
globals: {
'ts-jest': {
useESM: true,
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
coverageDirectory: '../../coverage/apps/api-e2e',
};
23 changes: 23 additions & 0 deletions apps/api/prisma.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { config } from "dotenv";
import { join } from "path";

import { existsSync } from "fs";

let envPath = join(process.cwd(), ".env");
if (!existsSync(envPath)) {
envPath = join(process.cwd(), "../../.env");
}
config({ path: envPath });

import { defineConfig } from "prisma/config";

export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
seed: "tsx prisma/seed.ts",
},
datasource: {
url: process.env.DIRECT_URL ?? "",
},
});
Loading
Loading