-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
138 lines (104 loc) · 5.42 KB
/
justfile
File metadata and controls
138 lines (104 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Boliyan Project Command Runner
# Run `just --list` to see all available commands
set windows-shell := ["pwsh", "-NoProfile", "-Command"]
# Default recipe: show available commands
default:
@just --list
# ─────────────────────────────────────────────────────────────────────────────
# Core Workflows
# ─────────────────────────────────────────────────────────────────────────────
# Start the Next.js development server
dev:
npm --prefix apps/web run dev
# Build the production application
build:
npm --prefix apps/web run build
# Run ESLint checks
lint:
npm --prefix apps/web run lint
# Run TypeScript type checking
typecheck:
npm --prefix apps/web run typecheck
# ─────────────────────────────────────────────────────────────────────────────
# Quality Assurance
# ─────────────────────────────────────────────────────────────────────────────
# Run all pre-flight checks (lint, typecheck, build)
checks:
npm --prefix apps/web run lint
npm --prefix apps/web run typecheck
npm --prefix apps/web run build
# Run feature validation script
validate:
npm --prefix apps/web run validate-features
# Run Playwright E2E tests
e2e:
npm --prefix apps/web run test:e2e
# Run Playwright E2E tests in dev mode
e2e-dev:
npm --prefix apps/web run test:e2e:dev
# Analyze codebase relationships (imports, cycles, consolidation opportunities)
analyze:
npm --prefix apps/web run analyze
# Sync compact system logic docs and references
docs-sync:
node scripts/sync-system-docs.mjs --write
# Validate system docs are already in sync
docs-sync-check:
node scripts/sync-system-docs.mjs --check
# Guard protected core logic contracts
core-guard:
node scripts/guard-system-contracts.mjs
# Install tracked git hooks into .git/hooks
hooks-install:
node scripts/install-hooks.mjs
# ─────────────────────────────────────────────────────────────────────────────
# Maintenance
# ─────────────────────────────────────────────────────────────────────────────
# Clear the .next cache directory
clean:
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue apps/web/.next
Write-Host "[Clean] .next cache cleared."
# Kill zombie Node.exe processes (runs cleanup.mjs)
kill-node:
node apps/web/scripts/cleanup.mjs
# ─────────────────────────────────────────────────────────────────────────────
# Database (Supabase)
# ─────────────────────────────────────────────────────────────────────────────
# Pull remote database schema
db-pull:
cd apps/web && npx supabase db pull
# Generate migration diff
db-diff name:
cd apps/web && npx supabase db diff --file {{name}}
# Push local migrations to remote
db-push:
cd apps/web && npx supabase db push
# Reset local database
db-reset:
cd apps/web && npx supabase db reset
# Check live status of listings in Supabase
db-check:
$env:NODE_PATH = 'apps/web/node_modules'; node scripts/check-all-listings.mjs
# Seed Sargodha listings and redistribute items
db-seed-sargodha:
cd apps/web && npx supabase db execute --file ../../packages/database/seed_sargodha.sql
# ─────────────────────────────────────────────────────────────────────────────
# Mobile App (Native Android)
# ─────────────────────────────────────────────────────────────────────────────
adb := env("LOCALAPPDATA") / "Android/Sdk/platform-tools/adb.exe"
# Build debug APK
mobile-build:
cd apps/mobile-android && ./gradlew.bat assembleDebug
# Build release AAB (signed, minified)
mobile-build-release:
cd apps/mobile-android && ./gradlew.bat bundleRelease
# Install debug APK to connected device
mobile-install:
cd apps/mobile-android && {{ adb }} install -r app/build/outputs/apk/debug/app-universal-debug.apk
# Build + install in one step
mobile:
cd apps/mobile-android && ./gradlew.bat assembleDebug
cd apps/mobile-android && {{ adb }} install -r app/build/outputs/apk/debug/app-universal-debug.apk
# Clean Android build cache
mobile-clean:
cd apps/mobile-android && ./gradlew.bat clean