Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
8434f75
fixes
sammajayi Jun 21, 2026
fbda726
feat: add test files for services
k-deejah Jun 28, 2026
4025c5a
Backend: add referral anti-fraud guards with tests (#1159)
thewealthyplace Jun 29, 2026
1e8df72
Backend: fail-safe inspector bond gating + cache + tests (#1160)
thewealthyplace Jun 29, 2026
f9ebf4b
Frontend: RTL layout support for Arabic locale (#1161)
thewealthyplace Jun 29, 2026
e450840
Frontend: idempotent reconnect reconciliation for offline queue (#1162)
thewealthyplace Jun 29, 2026
271ca37
Add conversion rate service tests and enhancements
Nemenwa Jun 29, 2026
73f9eb4
Add settlement worker and enqueueSideEffects tests
Nemenwq Jun 29, 2026
0648da2
Lease e-signature UX with document-integrity surfacing and lifecycle …
Nemenwq Jun 29, 2026
70e1b42
I've successfully hardened the CSV export functionality against CSV/f…
Nemenwq Jun 29, 2026
c67f458
Merge pull request #1292 from devsimze/test/issues-1205-1206-1207
pope-h Jun 29, 2026
0959a4f
Merge pull request #1291 from Nemenwq/gallery
pope-h Jun 29, 2026
4abb031
fix: isolate module-level repository singletons in tenantDataExport a…
k-deejah Jun 29, 2026
0310198
fix: restore walletRotation.test.ts with complete test suites (CI #1212)
k-deejah Jun 29, 2026
68dc8bf
Merge pull request #1245 from k-deejah/feat/test-files-addition
pope-h Jun 29, 2026
fdb3e8d
Backend: fix inspectorJobs integration tests for min-bond threshold
thewealthyplace Jun 29, 2026
c8f894f
Merge pull request #1289 from thewealthyplace/any-stellar-wave-issues
pope-h Jun 29, 2026
eef97de
Backend: Add comprehensive test coverage for OTP delivery, timelock i…
Akanimoh12 Jun 29, 2026
6e31e7b
Backend: Fix test coverage for OTP, timelock indexer, and scheduled jobs
Akanimoh12 Jun 29, 2026
7d2d9b1
Merge pull request #1293 from Akanimoh12/chore/backend-auth-indexer-j…
pope-h Jun 29, 2026
fe0949f
test: add data retention service tests (#1157)
temitopehannahbolarin-beep Jun 29, 2026
566e0d1
Add comprehensive tests for formSchemas.ts
somgoli Jun 29, 2026
3810150
Add comprehensive tests for schemas.ts
somgoli Jun 29, 2026
e3b89a4
Add comprehensive focused tests for fraud engine.ts
somgoli Jun 29, 2026
83b90ab
test: add unit tests for deal-progress computation (#1255)
Levi-Ojukwu Jun 29, 2026
6e314d7
test: add unit tests for landlord property↔listing sync (#1256)
Levi-Ojukwu Jun 29, 2026
f91d14a
test: add unit tests for late-payment notifier dedupe and dispatch (#…
Levi-Ojukwu Jun 29, 2026
d26e67c
test: add unit tests for NGN top-up initiation idempotency and PSP-fa…
Levi-Ojukwu Jun 29, 2026
70d1831
Merge pull request #1296 from Levi-Ojukwu/main
pope-h Jun 30, 2026
d12681e
Merge pull request #1294 from ghost-cy829/feature/data-retention-tests
pope-h Jun 30, 2026
56b2fba
fix: ci
somgoli Jun 30, 2026
37862fe
Enhance ReferralShareCard with native share, states, accessibility, a…
Lynndabel Jun 30, 2026
b9b6c6f
Update referrals page to use enhanced ReferralShareCard with state ma…
Lynndabel Jun 30, 2026
ff13138
Merge pull request #1297 from Lynndabel/fee
pope-h Jun 30, 2026
3dfed46
Full-Stack: Freelance Property Inspector Job Board & Structured Repor…
miracleokaa Jun 30, 2026
67f4830
Merge branch 'main' of miracle:miracleokaa/monorepo into miracleokaa/…
miracleokaa Jun 30, 2026
073e280
Fix: Correct import for InspectorVerificationStatus in test
miracleokaa Jun 30, 2026
8175703
Fix: Simplify property inspections test to only test public endpoint
miracleokaa Jun 30, 2026
c39efba
Add route tests for quote, conversion, properties, and publicRoutes (…
Mrwicks00 Jun 30, 2026
a670bd9
Merge pull request #1298 from miracleokaa/miracleokaa/monorepo
pope-h Jun 30, 2026
f77f16d
Merge pull request #1299 from Mrwicks00/feat/route-tests-1263-1264
pope-h Jun 30, 2026
bc9bf1c
Robust multi-step pre-screening flow (navigation, validation, progre…
Nemenwq Jun 30, 2026
c0243d5
Merge pull request #1300 from Nemenwq/gallery
pope-h Jun 30, 2026
f80fd3a
feat: #1221 Implement side-by-side property comparison with shareable…
miracleokaa Jun 30, 2026
3fea0f8
feat: #1223 Improve notifications center unread tracking and accessib…
miracleokaa Jun 30, 2026
6598466
feat(admin): dead-letter queue improvements
Jun 30, 2026
5d3cc31
fix: wrap useSearchParams in Suspense boundary for compare page
miracleokaa Jun 30, 2026
24a6960
Merge pull request #1302 from Devadakene/feature/dead-letter-queue-ui
pope-h Jun 30, 2026
0700879
Merge pull request #1301 from miracleokaa/miracleokaa/monorepo
pope-h Jun 30, 2026
5500a07
Revert "Add comprehensive focused tests for fraud engine.ts"
somgoli Jul 1, 2026
0e73f44
Add comprehensive tests for GET /health/details endpoint
somgoli Jul 1, 2026
65abea3
Revert "Add comprehensive tests for GET /health/details endpoint"
somgoli Jul 1, 2026
6d21942
Fix import paths in test files to avoid CI failure
somgoli Jul 1, 2026
29dee0a
fix: lint error
Nemenwa Jul 1, 2026
66e19b9
Pagination and idempotent receipt creation in rent_payments
Nemenwa Jul 1, 2026
6f723b2
Pagination and idempotent receipt creation in rent_payments
Nemenwa Jul 1, 2026
15676df
Full-Stack: Freelance Property Inspector Job Board & Structured Repor…
miracleokaa Jun 30, 2026
faeea1b
feat: robust KYC document validation and secure vault preview
Just-Bamford Jun 29, 2026
23924d6
feat: landlord property listing validation & backend lease/agreement …
Just-Bamford Jun 29, 2026
5f3f569
#1174 Frontend: Gate analytics initialization on cookie consent and h…
Kappa16 Jun 29, 2026
70347fd
Add equity transfer/assignment to rent_to_own contract
nnennaokoye Jun 29, 2026
f16b46d
Reject collateral withdrawals below minimum ratio
nnennaokoye Jun 29, 2026
de71260
typescript error fix
nnennaokoye Jun 29, 2026
b48f493
ci fix
nnennaokoye Jun 29, 2026
b91b766
Fix CI errors: remove duplicate test:ci key, fix auditLog imports and…
nnennaokoye Jun 29, 2026
176229b
Task #1247: Add unstake-during-active-epoch reward accounting tests
Jun 29, 2026
d2e4a61
Add metadata-hash integrity tests for staking_pool
Jun 29, 2026
448d7b7
Add direct test coverage for soroban_pausable trait
Jun 29, 2026
dc4e778
Add direct test coverage for soroban_access_control permission helpers
Jun 29, 2026
bb1597f
Fix code formatting to pass CI checks
Jun 29, 2026
6b7db23
Fix soroban_pausable crate-type to include rlib for library usage
Jun 29, 2026
9dc5ba1
Add accessible names to property cards
Codekill33 Jun 29, 2026
9605668
test(backend): add coverage for credit bureau, background check, and …
devsimze Jun 29, 2026
83f8557
Add settlement worker and enqueueSideEffects tests
Nemenwq Jun 29, 2026
1e823b3
Lease e-signature UX with document-integrity surfacing and lifecycle …
Nemenwq Jun 29, 2026
56d1dc8
I've successfully hardened the CSV export functionality against CSV/f…
Nemenwq Jun 29, 2026
09504b1
feat: add test files for services
k-deejah Jun 28, 2026
8645050
fix: isolate module-level repository singletons in tenantDataExport a…
k-deejah Jun 29, 2026
7ea2c05
fix: restore walletRotation.test.ts with complete test suites (CI #1212)
k-deejah Jun 29, 2026
2e6c627
Backend: add referral anti-fraud guards with tests (#1159)
thewealthyplace Jun 29, 2026
68b0036
Backend: fail-safe inspector bond gating + cache + tests (#1160)
thewealthyplace Jun 29, 2026
01dcf4b
Frontend: RTL layout support for Arabic locale (#1161)
thewealthyplace Jun 29, 2026
eaca0b4
Frontend: idempotent reconnect reconciliation for offline queue (#1162)
thewealthyplace Jun 29, 2026
2d169ff
Backend: fix inspectorJobs integration tests for min-bond threshold
thewealthyplace Jun 29, 2026
4930e9e
Backend: Add comprehensive test coverage for OTP delivery, timelock i…
Akanimoh12 Jun 29, 2026
eaa66fc
Backend: Fix test coverage for OTP, timelock indexer, and scheduled jobs
Akanimoh12 Jun 29, 2026
9328e92
test: add unit tests for deal-progress computation (#1255)
Levi-Ojukwu Jun 29, 2026
fdfadab
test: add unit tests for landlord property↔listing sync (#1256)
Levi-Ojukwu Jun 29, 2026
0bd30ad
test: add unit tests for late-payment notifier dedupe and dispatch (#…
Levi-Ojukwu Jun 29, 2026
52785c4
test: add unit tests for NGN top-up initiation idempotency and PSP-fa…
Levi-Ojukwu Jun 29, 2026
81bbbca
test: add data retention service tests (#1157)
temitopehannahbolarin-beep Jun 29, 2026
02377c9
Enhance ReferralShareCard with native share, states, accessibility, a…
Lynndabel Jun 30, 2026
773dbfc
Update referrals page to use enhanced ReferralShareCard with state ma…
Lynndabel Jun 30, 2026
0d36e17
Fix: Correct import for InspectorVerificationStatus in test
miracleokaa Jun 30, 2026
8062a94
Fix: Simplify property inspections test to only test public endpoint
miracleokaa Jun 30, 2026
1911046
Add route tests for quote, conversion, properties, and publicRoutes (…
Mrwicks00 Jun 30, 2026
5ff744f
Robust multi-step pre-screening flow (navigation, validation, progre…
Nemenwq Jun 30, 2026
a555c92
feat(admin): dead-letter queue improvements
Jun 30, 2026
421f2af
feat: #1221 Implement side-by-side property comparison with shareable…
miracleokaa Jun 30, 2026
3a3c29f
feat: #1223 Improve notifications center unread tracking and accessib…
miracleokaa Jun 30, 2026
8da73d7
fix: wrap useSearchParams in Suspense boundary for compare page
miracleokaa Jun 30, 2026
b3f0704
fix: done
Nemenwa Jul 4, 2026
26ece35
fix: done
Nemenwa Jul 4, 2026
c439e9c
fix: done
Nemenwa Jul 4, 2026
e5dc074
Full-Stack: Freelance Property Inspector Job Board & Structured Repor…
miracleokaa Jun 30, 2026
e52b611
test: add unit tests for deal-progress computation (#1255)
Levi-Ojukwu Jun 29, 2026
d5198d4
test: add unit tests for landlord property↔listing sync (#1256)
Levi-Ojukwu Jun 29, 2026
ea3c0c0
test: add unit tests for late-payment notifier dedupe and dispatch (#…
Levi-Ojukwu Jun 29, 2026
26cc704
test: add unit tests for NGN top-up initiation idempotency and PSP-fa…
Levi-Ojukwu Jun 29, 2026
32aec0a
test: add data retention service tests (#1157)
temitopehannahbolarin-beep Jun 29, 2026
55afd57
Enhance ReferralShareCard with native share, states, accessibility, a…
Lynndabel Jun 30, 2026
3ec8ba1
Update referrals page to use enhanced ReferralShareCard with state ma…
Lynndabel Jun 30, 2026
75f2060
Fix: Correct import for InspectorVerificationStatus in test
miracleokaa Jun 30, 2026
ff1290e
Fix: Simplify property inspections test to only test public endpoint
miracleokaa Jun 30, 2026
843349e
Add route tests for quote, conversion, properties, and publicRoutes (…
Mrwicks00 Jun 30, 2026
95aa8f3
Robust multi-step pre-screening flow (navigation, validation, progre…
Nemenwq Jun 30, 2026
6bd1d37
feat(admin): dead-letter queue improvements
Jun 30, 2026
2527708
feat: #1221 Implement side-by-side property comparison with shareable…
miracleokaa Jun 30, 2026
ff57759
feat: #1223 Improve notifications center unread tracking and accessib…
miracleokaa Jun 30, 2026
e818542
fix: wrap useSearchParams in Suspense boundary for compare page
miracleokaa Jun 30, 2026
d081e7e
fix: ci fix
somgoli Jul 4, 2026
28503ce
Merge pull request #1290 from wokedi/PII
pope-h Jul 4, 2026
ecec5bf
Merge pull request #1295 from somgoli/validation
pope-h Jul 4, 2026
fd00dd6
resolve merge conflict: use upstream API-based implementation for pro…
sammajayi Jul 24, 2026
ed9ad25
feat(admin): improve audit-log a11y, timestamps, and target filter
sammajayi Jul 24, 2026
da7e3cb
fix: restore missing closing tags in property applications page
sammajayi Jul 24, 2026
3223f39
fix: ci - fix flaky data retention test and update ethnum to 1.5.3
sammajayi Jul 24, 2026
fe7ec96
Merge pull request #1303 from sammajayi/feat/admin-filter-pagination
pope-h Jul 24, 2026
d0e4e81
feat: improve landlord payouts view - formatting, drill-down, a11y
sammajayi Jul 24, 2026
a8c1510
Merge pull request #1304 from sammajayi/feat/landlord-payouts
pope-h Jul 24, 2026
fd6715b
test: add hook tests for useCountdown, useTimelock, usePaymentHistory
sammajayi Jul 24, 2026
3425fe5
Merge pull request #1305 from sammajayi/test/time-payment-hooks
pope-h Jul 24, 2026
5fa33d1
test: add zustand store tests for useAuthStore, useSessionStore, useR…
sammajayi Jul 24, 2026
b2dc12b
Merge pull request #1306 from sammajayi/tests/auth-session
pope-h Jul 24, 2026
e2aff4a
fix(frontend): add global controls to dashboard header (#1315)
nekwasar Jul 26, 2026
21bd80e
fix(frontend): fix language switcher 404s with cookie-based locale st…
nekwasar Jul 27, 2026
56c5e05
fix(frontend): fix language switcher 404s with cookie-based locale st…
nekwasar Jul 27, 2026
42b348a
fix(frontend): make header auth-aware with account dropdown for signe…
nekwasar Jul 27, 2026
07053ae
docs: clarify contributor setup for CI workflows
TEEZY234 Jul 27, 2026
887c64d
docs: add PR template for issue 1356
TEEZY234 Jul 27, 2026
b001cbf
feat: add live message delivery over SSE instead of polling (#1309)
nekwasar Jul 27, 2026
755949e
feat: add landlord tenants API client
trustosaretin Jul 27, 2026
3aba69e
feat: replace mock tenants with real API data
trustosaretin Jul 27, 2026
2154f05
feat: replace mock payment history with real payout API
trustosaretin Jul 27, 2026
18d46a9
feat: replace mock properties with real API in tenant application
trustosaretin Jul 27, 2026
9946d20
feat: replace mock properties with real API in property detail page
trustosaretin Jul 27, 2026
604505f
fix: Replace mock data with live API integration across all dashboards
Georgechisom Jul 27, 2026
7de6ad1
chore: Remove temporary files
Georgechisom Jul 27, 2026
de4cf29
Merge pull request #1358 from nekwasar/fix/1315-dashboard-header-cont…
pope-h Jul 27, 2026
c97b38b
Merge pull request #1359 from nekwasar/fix/1317-locale-404s
pope-h Jul 27, 2026
5e3f4d4
Merge pull request #1363 from trustosaretin/feat/replace-mock-data-wi…
pope-h Jul 27, 2026
161bb7c
Merge pull request #1360 from nekwasar/fix/1313-auth-aware-header
pope-h Jul 27, 2026
b01ff28
Merge pull request #1361 from TEEZY234/docs/issue-1356-contributor-setup
pope-h Jul 27, 2026
511ddd1
Merge pull request #1362 from nekwasar/feat/1309-sse-messaging
pope-h Jul 27, 2026
159d689
fix: Remove setState calls from useEffect bodies to fix ESLint errors
Georgechisom Jul 27, 2026
7e8d525
Merge branch 'main' into fix/dashboard-mock-data-integration
Georgechisom Jul 27, 2026
f6463a1
Merge pull request #1365 from Georgechisom/fix/dashboard-mock-data-in…
pope-h Jul 27, 2026
2fc0e5b
feat(reviews): replace mock data with real API integration
osasfaith Jul 27, 2026
29a0354
refactor(dashboard): update types and table components for real API data
osasfaith Jul 27, 2026
699e151
feat(landlords): replace mock stats with real API and remove testimon…
osasfaith Jul 27, 2026
efef44e
Merge pull request #1368 from osasfaith/fix/mock-data-to-real-apis
pope-h Jul 27, 2026
56419f8
feat: real messaging service with conversations, threads, and authori…
Jul 27, 2026
7dbd94e
feat: attachment upload, storage, and validation for messaging
Jul 27, 2026
be83b14
feat: wire chat UI to real messaging API and remove mock data
Jul 27, 2026
53f8931
feat: surface unread message counts in the header notification bell
Jul 27, 2026
502b3e7
fix: lint errors - setState in effect warnings
Jul 27, 2026
8232e70
fix(backend): enforce safe migration ordering manifest
wheval Jul 27, 2026
9980849
fix(frontend): standardize auth form validation and error handling
wheval Jul 27, 2026
84502fa
fix(frontend): correct currency conversion formatting display
wheval Jul 27, 2026
2e72f07
fix(backend): improve webhook retry reliability and failure visibility
wheval Jul 27, 2026
c544249
Merge pull request #1373 from wheval/fix/issue-1352-frontend-form-val…
pope-h Jul 27, 2026
d770d05
Merge pull request #1374 from wheval/fix/issue-1355-migration-prefix-…
pope-h Jul 27, 2026
d5e9d3c
Merge pull request #1369 from oraimoitel/issue-1307-backend-messaging
pope-h Jul 27, 2026
a3ba5f0
Merge pull request #1370 from oraimoitel/issue-1308-frontend-wire-mes…
pope-h Jul 27, 2026
dffd8c6
Merge pull request #1375 from wheval/fix/issue-1353-currency-format-c…
pope-h Jul 27, 2026
e21c4c3
Merge pull request #1372 from oraimoitel/issue-1311-unread-header
pope-h Jul 27, 2026
c41e508
Merge pull request #1376 from wheval/fix/issue-1354-webhook-retries-v…
pope-h Jul 27, 2026
08c8043
fix issue 1350 soft-delete guards
10xwhoman Jul 27, 2026
df58167
fix issue 1351 section error handling
10xwhoman Jul 27, 2026
f7e614c
Merge pull request #1383 from 10xwhoman/fix/issue-1350-soft-delete-gu…
pope-h Jul 27, 2026
5362751
test: remove flaky Shelterflex frontend regression tests
10xwhoman Jul 27, 2026
92b1db5
Merge pull request #1384 from 10xwhoman/fix/issue-1351-section-bounda…
pope-h Jul 27, 2026
2791766
feat: offline queue and service worker testing and verification
10xwhoman Jul 27, 2026
053ba43
fix(backend): declare messaging migration in manifest
10xwhoman Jul 27, 2026
a947cd6
feat: in-app and email notifications for new messages
10xwhoman Jul 27, 2026
1d3e9fd
fix(backend): declare messaging migration in manifest
10xwhoman Jul 27, 2026
747b6f5
fix(backend): renumber messaging migrations
10xwhoman Jul 27, 2026
b9e9355
fix(backend): renumber messaging migrations
10xwhoman Jul 27, 2026
5f0e14f
Merge pull request #1382 from 10xwhoman/fix/issue-1349-message-notifi…
pope-h Jul 27, 2026
c5a8040
Merge pull request #1381 from 10xwhoman/fix/issue-1348-offline
pope-h Jul 27, 2026
b026cb7
feat: real homepage stats, financial rate limits, correlation IDs, id…
DataByNature Jul 28, 2026
356ec88
feat(messaging): server-side conversation search + cursor pagination …
robertocarlous Jul 28, 2026
bd715a4
Merge remote-tracking branch 'upstream/main' into feature/1312-conver…
robertocarlous Jul 28, 2026
0a073f3
Merge pull request #1451 from robertocarlous/feature/1312-conversatio…
pope-h Jul 28, 2026
9390fc7
fix(backend): register 045_correlation_ids.sql in migration manifest
DataByNature Jul 28, 2026
43c1bfd
Merge pull request #1450 from dotunv/feat/homepage-stats-rate-limits-…
pope-h Jul 28, 2026
aaf7544
fix: resolve eslint warnings, add saved properties page, and e2e test
Abidoyesimze Jul 28, 2026
cf262c9
fix: remove duplicate const property declaration in PropertyDetailClient
Abidoyesimze Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
135 changes: 86 additions & 49 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,111 @@ If you're looking for tasks to pick up, start with `docs/ISSUES_CATALOG.md`.

## Development setup

### Frontend
This repository has three independently tool-chained projects. Use the package manager and version below that matches CI.

### Prerequisites

- Node.js 22.x (CI uses Node 22)
- pnpm 9.15.5 for the frontend
- npm for the backend (CI uses `npm ci`)
- Rust stable with `rustfmt` and `clippy` for the contracts workspace
- Docker Desktop (optional, but useful for PostgreSQL and the full-stack compose setup)

### Frontend setup (pnpm, Node 22)

```bash
cd frontend
npm install
npm run dev
corepack enable
pnpm install --frozen-lockfile
pnpm run lint
pnpm run build
```

### Backend
- The frontend uses pnpm, not npm.
- The authoritative lockfile is `frontend/pnpm-lock.yaml`.
- `frontend/package-lock.json` is stale and should not be used; do not run `npm install` in this directory.

### Backend setup (npm, Node 22)

```bash
cd backend
npm install
npm ci
cp .env.example .env
# Optional but recommended for local API development:
docker compose up postgres -d
npm run lint
npm run test:ci
npm run openapi:validate
```

The backend uses npm, not pnpm. The CI job runs `npm ci` and then the lint/test/OpenAPI checks below.

Required environment variables for local backend work:

- `cp .env.example .env` to create a local environment file.
- `DATABASE_URL` is required for the API server. The default example points at a local PostgreSQL instance.
- `ENCRYPTION_KEY` is required for local encryption helpers; the example value is fine for local development.
- `CUSTODIAL_WALLET_MASTER_KEY_V1` and `CUSTODIAL_WALLET_MASTER_KEY_V2` can be left empty for basic local development, but wallet-related flows will need real values.
- `RESEND_API_KEY` can stay empty; OTP delivery defaults to the console provider.

For local development, the easiest path is to start PostgreSQL and then run the API:

```bash
cd backend
cp .env.example .env
docker compose up postgres -d
npm run dev
```

### Contracts
The CI test command (`npm run test:ci`) excludes the network-dependent suites, so it does not require external Soroban or webhook services to pass.

### Contracts setup (Rust stable + fmt/clippy)

```bash
cd contracts
cargo test
stellar contract build
rustup toolchain install stable
rustup component add rustfmt clippy
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features
cargo test --workspace
```

For Soroban CLI deployment instructions see `contracts/README.md`.

## Before opening a PR (required checks)

Run the CI-equivalent commands from the matching directory before you push:

### Frontend checks

```bash
cd frontend
pnpm install --frozen-lockfile
pnpm run lint
pnpm run build
```

### Backend checks

```bash
cd backend
npm ci
npm run lint
npm run test:ci
npm run openapi:validate
```

### Contracts checks

```bash
cd contracts
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features
cargo test --workspace
```

If your PR changes UI, include screenshots or a short screen recording in the PR description.

## Creating an issue

Before opening a new issue:
Expand All @@ -81,47 +159,6 @@ Before opening a new issue:
- Ask clarifying questions early.
- If you’re blocked for >24h, leave an update.

## Before opening a PR (required checks)

Run the checks for the area you changed.

### Frontend checks

```bash
cd frontend
npm run lint
npm run build
```

If your PR changes UI, include **screenshots** (or a short screen recording) in the PR description.

#### UI/Image change verification

For PRs that modify UI components or add/change images:

- Include before/after screenshots showing the changes
- For new features, provide screenshots of different states (loading, error, success)
- For responsive changes, include screenshots at different breakpoints (mobile, tablet, desktop)
- Verify images are optimized and not excessively large (use tools like ImageOptim, TinyPNG, or Next.js Image component)
- Confirm accessibility: check color contrast, alt text for images, keyboard navigation

### Backend checks

```bash
cd backend
npm run lint
npm run typecheck
npm run build
```

### Contracts checks

```bash
cd contracts
cargo test
stellar contract build
```

## If the repository is renamed on GitHub

If the organization renames this repository, GitHub will usually redirect the old URL to the new one.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Shelterflex
# Shelterflex

Shelterflex is a **Rent Now, Pay Later (RNPL)** platform that enables tenants to secure rental properties with an initial deposit and pay the remaining balance in monthly installments — while allowing landlords to list properties directly, reducing reliance on traditional agents.

Expand Down Expand Up @@ -63,12 +63,12 @@ New contributors can run **just one** component without setting up the others.

## Option A: Frontend Only

**Prerequisites:** Node.js 20+
**Prerequisites:** Node.js 22, pnpm 9.15.5

```bash
cd frontend
npm install
npm run dev
pnpm install --frozen-lockfile
pnpm run dev
```

- Runs on: `http://localhost:3000`
Expand All @@ -77,11 +77,11 @@ npm run dev

### Option B: Backend Only

**Prerequisites:** Node.js 20+
**Prerequisites:** Node.js 22

```bash
cd backend
npm install
npm ci
cp .env.example .env
npm run dev
```
Expand All @@ -92,7 +92,7 @@ npm run dev

### Option C: Contracts Only

**Prerequisites:** Rust (stable), Soroban CLI (`stellar`)
**Prerequisites:** Rust stable with `rustfmt` and `clippy`, Soroban CLI (`stellar`)

```bash
cd contracts
Expand Down
27 changes: 21 additions & 6 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ Node.js backend for Shelterflex.

## Setup

> **Package manager:** This project uses **npm**. Use `npm install` (not `pnpm` or `yarn`) to match
> the `package-lock.json` lockfile that is committed to the repository.
> **Package manager:** This project uses **npm**. Use `npm ci` (not `pnpm`) to match the lockfile and CI workflow.

```bash
npm install
npm ci
cp .env.example .env
npm run dev
```

- The backend CI job runs `npm ci` from this directory.
- For local API development, make sure PostgreSQL is available and that the environment file contains at least `DATABASE_URL` and `ENCRYPTION_KEY`.

## Testing

Run the integration test suite:
Expand Down Expand Up @@ -46,9 +48,23 @@ Tests are located in `src/**/*.test.ts` files and use Vitest + Supertest.

## Database migrations

SQL migrations live in `migrations/` and are applied in filename order.
SQL migrations live in `migrations/`.

At runtime (`src/migrations/runMigrations.ts`), migrations are:

- tracked by **exact filename** in `schema_migrations.filename`
- wrapped in a transaction per file
- skipped when that exact filename already exists in `schema_migrations`

Because tracking is filename-based, renaming an already-applied migration is unsafe (it can make an applied migration look unapplied and cause re-execution).

The repository includes a migration runner script in `src/repositories/test.ts` that:
Ordering is resolved by `src/migrations/migrationOrdering.ts`:

- legacy files are pinned in `migrations/migration-order.manifest.json` with unique integer positions
- new files not listed in the manifest must use `YYYYMMDDHHMMSS_description.sql`
- timestamp-prefixed files are appended in lexicographic order (chronological) and duplicate timestamps are rejected

The repository includes a database setup script in `src/repositories/test.ts` that:

- creates a `schema_migrations` table if missing
- applies any `.sql` files not yet recorded
Expand Down Expand Up @@ -497,4 +513,3 @@ LOCAL_STORAGE_DIR=/tmp/shelterflex-dev
```

This is useful for local development when you don't want to run MinIO.

37 changes: 36 additions & 1 deletion backend/docs/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,41 @@ paths:
default:
$ref: "#/components/responses/Error"

/api/v1/user/preferences/notifications/messages-email:
patch:
summary: Update message email preference
description: Opt in or out of delayed message email notifications.
operationId: updateMessageEmailPreference
tags:
- User Preferences
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- enabled
properties:
enabled:
type: boolean
responses:
"200":
description: Preference updated
content:
application/json:
schema:
type: object
required:
- messageEmailsEnabled
properties:
messageEmailsEnabled:
type: boolean
default:
$ref: "#/components/responses/Error"

/api/auth/wallet/challenge:
post:
summary: Create wallet login challenge
Expand Down Expand Up @@ -2131,7 +2166,7 @@ paths:
/api/webhooks/payments/{rail}:
post:
summary: Payments webhook
description: Ingest payment provider webhook. Idempotent by (rail, externalRef). Signature validation can be enabled.
description: Ingest payment provider webhook. Idempotent by provider event ID plus canonical reference. Signature validation is always enforced in production and can be enabled in non-production with WEBHOOK_SIGNATURE_ENABLED=true.
operationId: paymentsWebhook
tags:
- Webhooks
Expand Down
69 changes: 69 additions & 0 deletions backend/migrations/040_property_inspections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-- Property inspection system for freelance property inspectors

-- Inspector profiles
CREATE TABLE IF NOT EXISTS inspector_profiles (
user_id TEXT PRIMARY KEY,
verification_status TEXT NOT NULL DEFAULT 'pending'
CHECK (verification_status IN ('pending', 'verified', 'suspended')),
bio TEXT,
service_areas JSONB NOT NULL DEFAULT '[]'::jsonb,
completed_inspections INTEGER NOT NULL DEFAULT 0,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS inspector_profiles_verification_status_idx ON inspector_profiles (verification_status);
CREATE INDEX IF NOT EXISTS inspector_profiles_service_areas_idx ON inspector_profiles USING GIN (service_areas);

-- Property inspections
CREATE TABLE IF NOT EXISTS property_inspections (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
listing_id UUID NOT NULL REFERENCES whistleblower_listings(listing_id) ON DELETE CASCADE,
inspector_id TEXT NOT NULL REFERENCES inspector_profiles(user_id) ON DELETE CASCADE,
status TEXT NOT NULL DEFAULT 'pending'
CHECK (status IN ('pending', 'in_progress', 'submitted', 'approved', 'rejected')),
scheduled_at TIMESTAMPTZ,
submitted_at TIMESTAMPTZ,
approved_at TIMESTAMPTZ,
inspector_notes TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS property_inspections_listing_id_idx ON property_inspections (listing_id);
CREATE INDEX IF NOT EXISTS property_inspections_inspector_id_idx ON property_inspections (inspector_id);
CREATE INDEX IF NOT EXISTS property_inspections_status_idx ON property_inspections (status);

-- Inspection checklist items
CREATE TABLE IF NOT EXISTS inspection_checklist_items (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
inspection_id UUID NOT NULL REFERENCES property_inspections(id) ON DELETE CASCADE,
category TEXT NOT NULL
CHECK (category IN ('structural', 'plumbing', 'electrical', 'safety', 'exterior')),
item TEXT NOT NULL,
result TEXT NOT NULL
CHECK (result IN ('pass', 'fail', 'na')),
notes TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS inspection_checklist_items_inspection_id_idx ON inspection_checklist_items (inspection_id);
CREATE INDEX IF NOT EXISTS inspection_checklist_items_category_idx ON inspection_checklist_items (category);

-- Inspection photos
CREATE TABLE IF NOT EXISTS inspection_photos (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
inspection_id UUID NOT NULL REFERENCES property_inspections(id) ON DELETE CASCADE,
url TEXT NOT NULL,
caption TEXT,
taken_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS inspection_photos_inspection_id_idx ON inspection_photos (inspection_id);

-- Add trust score fields to whistleblower_listings
ALTER TABLE whistleblower_listings
ADD COLUMN IF NOT EXISTS trust_score INTEGER DEFAULT 50 CHECK (trust_score >= 0 AND trust_score <= 100),
ADD COLUMN IF NOT EXISTS has_verified_inspection BOOLEAN DEFAULT FALSE;
Loading