Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
F
finwise-miniapp-be
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ThinhNC
  • finwise-miniapp-be
  • Merge Requests
  • !20

Merged
Opened Aug 06, 2026 by ThinhNC@ThinhNC
  • Report abuse
Report abuse

docs: implement system architecture, API specs, deployment guide, enhance demo...

Summary

This PR establishes complete technical documentation, enhances the local development seed data with a realistic demo experience, and sets up a robust automated integration testing framework using Jest and Supertest.

Key Changes

1. Technical Documentation (/docs)

  • Architecture & ERD (docs/architecture.md): Documented the layered codebase structure (Route -> Validation -> Controller -> Service -> Repository) and created a comprehensive 14-table database Entity Relationship Diagram (ERD) using Mermaid.
  • API Specifications (docs/api.md): Provided access details for Swagger UI, described request/response schemas, JWT bearer authorization, and summarized key endpoints.
  • Deployment & Ops Guide (docs/deployment.md): Included instructions for local manual setup, secure Docker Compose containerized deployment (using healthchecks and non-root users), and PM2 cluster setups.
  • General Overview (README.md): Updated the root documentation to serve as a clean hub with relative links pointing to the sub-documents.

2. Enhanced Demo Seed Data (prisma/seed.ts)

  • Added seedDemoData function to automatically populate the demo account (user@finwise.local) with rich financial records (3 wallets, 20+ transactions over the past 3 months, 2 monthly budgets with spending warnings, a saving goal with contributions, notifications, and reminders) to facilitate Zalo Mini App demo showcasing.

3. Integration Testing Framework (/tests)

  • Installed and configured Jest and Supertest supporting TypeScript.
  • Created tests/setup.ts to isolate test runs using an in-memory cache fallback (REDIS_ENABLED=false) and mocked dependencies (like mail delivery).
  • Written integration tests covering the base Health Check API (tests/health.test.ts) and full Authentication lifecycles (tests/auth.test.ts).

How to Verify

All checks passed successfully locally:

  1. Run automated tests:

    pnpm test

    Result: 9/9 tests passed successfully (2 suites).

  2. Verify type-checking & compile:

    pnpm run build

    Result: Build completed with zero errors.

  3. Run static analysis / Linter:

    pnpm run lint

    Result: ESLint passed with 0 errors (configured to ignore test files).

  4. Test database seed execution:

    pnpm run db:seed

    Result: Seeding completed without syntax or constraint issues.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feature/technical-docs-and-testing-suite origin/feature/technical-docs-and-testing-suite

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/develop
git merge --no-ff feature/technical-docs-and-testing-suite

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 1
  • Changes 13
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: ThinhNC/finwise-miniapp-be!20

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.