Skip to content

Commit 4a2701b

Browse files
Merge pull request Xconfess#1549 from mimijuwonlo-commits/fix/backend-secure-export-download-tokens-1452
2 parents 4a6b370 + 64e5442 commit 4a2701b

33 files changed

Lines changed: 465 additions & 10964 deletions

‎.gitignore‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1-
# Node modules
1+
# Dependencies
22
node_modules/
33
**/node_modules/
44

5-
65
# Environment variables
76
.env
87
.env.local
9-
# Logs
8+
9+
# Logs and command output
1010
*.log
11-
# Build output
11+
*_output.txt
12+
test_output.txt
13+
14+
# Build, cache, and test output
1215
dist/
16+
build/
17+
.next/
18+
coverage/
19+
test-results/
20+
test_snapshots/
21+
target/
22+
*.tsbuildinfo
23+
1324
# OS files
1425
.DS_Store
1526
Thumbs.db
16-
target/
17-
test_snapshots/
18-
node_modules
1927
CON
28+
branch_structure.json
29+
temp_auto_push.bat
30+
temp_interactive_push.bat

‎QUICK_START.md‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Get the full stack running locally in under 5 minutes.
77
| Tool | Version | Required for |
88
|------|---------|-------------|
99
| Node.js | >= 18 | Backend + Frontend |
10-
| npm | >= 9 | Root workspace |
11-
| pnpm | >= 8 | Backend (xconfess-backend uses pnpm) |
10+
| npm | >= 9 | Root workspace and all JS packages |
1211
| Docker | any | Postgres + Redis |
1312
| Rust + cargo | stable | Contracts only — skip if not touching contracts |
1413

@@ -22,11 +21,8 @@ cd Xconfess
2221
## Step 2 — Install dependencies
2322

2423
```bash
25-
# Root workspace (frontend deps)
24+
# Root workspace dependencies
2625
npm install
27-
28-
# Backend deps (uses pnpm)
29-
cd xconfess-backend && pnpm install && cd ..
3026
```
3127

3228
## Step 3 — Start infrastructure (Postgres + Redis)
@@ -93,8 +89,6 @@ This starts backend and frontend concurrently. Once ready:
9389

9490
**Frontend auth loop** — add `NEXT_PUBLIC_DEV_BYPASS_AUTH=true` to `xconfess-frontend/.env.local` to skip the auth flow during UI-only development.
9591

96-
**pnpm not found** — install it with `npm install -g pnpm`.
97-
9892
**Port conflicts** — Postgres uses 55432 (not 5432) to avoid clashing with a local Postgres install.
9993

10094
## Running tests

‎docs/SMALL_PR_POLICY.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If your work naturally spans more than one of these categories, split it into se
2727
These are not hard limits, but PRs that exceed them **will be asked to split** before review begins:
2828

2929
- **≤ 400 lines changed** (additions + deletions, excluding generated files and lockfiles)
30-
- **≤ 8 files touched** (excluding `package-lock.json`, `pnpm-lock.yaml`, and auto-generated files)
30+
- **≤ 8 files touched** (excluding lock files and auto-generated files)
3131
- **One logical concern** — a reviewer should be able to summarise the PR in a single sentence
3232

3333
If your change is genuinely larger (e.g. a new module with its own tests and migration), leave a note explaining why it cannot be split. Maintainers will decide whether to proceed or request a split.
@@ -107,4 +107,4 @@ Do not request a review directly — use the comment template so maintainers can
107107

108108
## Enforcement
109109

110-
PRs that do not meet this policy will receive a `needs: split` or `needs: evidence` label and will not be merged until the issues are resolved. This is not a penalty — it is how we keep the review queue healthy for everyone.
110+
PRs that do not meet this policy will receive a `needs: split` or `needs: evidence` label and will not be merged until the issues are resolved. This is not a penalty — it is how we keep the review queue healthy for everyone.

‎docs/adr/005-monorepo-structure.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ xConfess has three distinct packages: a NestJS backend (xconfess-backend), a Nex
1111
## Options Considered
1212

1313
- **Option A — Separate repositories**: Each package in its own repo. Clear boundaries but contributors must clone and coordinate multiple repos. Cross-cutting PRs are harder to review.
14-
- **Option B — npm workspaces monorepo**: Single repository with a root package.json defining workspaces. Each package manages its own dependencies, scripts, and lock file.
14+
- **Option B — npm workspaces monorepo**: Single repository with a root package.json defining workspaces. Each package manages its own dependencies and scripts through one root lock file.
1515
- **Option C — Turborepo or Nx**: Managed monorepo tooling with build caching and task orchestration. More powerful but adds tooling complexity for a project at this stage.
1616

1717
## Decision
@@ -26,12 +26,12 @@ A single repo makes cross-cutting changes (e.g. updating an API contract that af
2626

2727
- Cross-cutting changes are reviewed in a single PR
2828
- Single git history makes it easy to correlate backend and frontend changes
29-
- No extra tooling required beyond npm/pnpm workspaces
29+
- No extra tooling required beyond npm workspaces
3030

3131
### Negative
3232

3333
- CI pipelines must detect which packages changed and run only the relevant tests
34-
- Each package uses its own package manager (backend uses pnpm, root uses npm) — contributors must be aware of which to use where
34+
- All JavaScript packages share one root npm lock file, so contributors should run workspace commands from the root
3535
- No shared build cache — each package builds independently
3636

3737
## References

‎package-lock.json‎

Lines changed: 72 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎xconfess-backend/.gitignore‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ lerna-debug.log*
1818
# Tests
1919
/coverage
2020
/.nyc_output
21+
test_output.txt
22+
unit_test_output*.txt
23+
*.tsbuildinfo
2124

2225
# IDEs and editors
2326
/.idea
@@ -58,5 +61,3 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
5861
# Swagger API documentation
5962
swagger-ui/
6063
swagger-spec.yaml
61-
package-lock.json
62-

‎xconfess-backend/REACTIONS_GATEWAY_FIX.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,26 @@ Integration tests that verify:
4444
### Run Unit Tests
4545
```bash
4646
cd xconfess-backend
47-
pnpm test reaction.module.spec.ts
47+
npm test reaction.module.spec.ts
4848
```
4949

5050
### Run Integration Tests
5151
```bash
5252
cd xconfess-backend
53-
pnpm test reactions-gateway-boot.spec.ts
53+
npm test reactions-gateway-boot.spec.ts
5454
```
5555

5656
### Run Existing E2E Tests
5757
```bash
5858
cd xconfess-backend
59-
pnpm test reactions.gateway.spec.ts
59+
npm test reactions.gateway.spec.ts
6060
```
6161

6262
### Manual Testing
6363
1. Start the backend:
6464
```bash
6565
cd xconfess-backend
66-
pnpm run start:dev
66+
npm run start:dev
6767
```
6868

6969
2. Connect a WebSocket client to `http://localhost:3000/reactions`

‎xconfess-backend/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ See [HEALTH_CHECK_DOCUMENTATION.md](./HEALTH_CHECK_DOCUMENTATION.md) for full de
196196
| `GET /api/health/live` | Local smoke test — is the process up? |
197197
| `GET /api/health/ready` | Full stack check — are all dependencies ready? |
198198

199-
Quick check after `pnpm start:dev`:
199+
Quick check after `npm run start:dev`:
200200
```bash
201201
curl -s http://localhost:3000/api/health/live # {"status":"ok"}
202202
curl -s http://localhost:3000/api/health/ready # {"status":"ok",...}

0 commit comments

Comments
 (0)