Skip to content

Application Map

Monitoring references reviewed: 2026-10-03. Other system areas last audited: 2026-07-21.

This is a short map of the MamNajem system and the main tools used in each area.

Backend

The backend is a Java 25 Spring Boot 4.0.8 application using WebFlux, Spring Security, OAuth2 resource server support, validation, actuator health checks, R2DBC, PostgreSQL, Liquibase, Stripe, AWS SDKs, Micrometer and New Relic. Integration runs this revision; production monitoring cutover remains manual. See observability and alerts for verified coverage and remaining rollout gates.

Main responsibilities:

  • User, property, lease, rent payment, messaging, notification, subscription, and admin APIs.
  • Stripe subscription checkout and rent payment checkout.
  • Stripe Connect onboarding for landlords.
  • Unified Stripe webhook processing at /v1/webhooks/stripe.
  • Push notification registration and publishing through the current PushSender implementation.
  • Request tracing with x-request-id, x-correlation-id, and x-spawn-id across inbound HTTP handling, backend logs, scrubbed diagnostic context, and configured outbound WebClient calls.
  • Database migrations through Liquibase.
  • Health reporting through /actuator/health.

Useful source locations:

  • backend/pom.xml
  • backend/src/main/resources/application.yml
  • backend/src/main/resources/db/changelog/db.changelog-master.yaml
  • backend/.gitlab-ci.yml

Mobile Frontend

The mobile app is an Expo React Native app for landlords, tenants, and property managers.

Main tools:

  • Expo and React Native.
  • Expo Router for navigation.
  • React Query for server state.
  • Zustand for local state.
  • AWS Amplify client libraries and Cognito for native-app authentication.
  • Firebase Analytics, Messaging, and Remote Config.
  • New Relic React Native for opt-in crash and error diagnostics.
  • OpenAPI-generated API types.
  • Google Play and TestFlight release pipelines.

Main responsibilities:

  • Authentication and onboarding.
  • Property and lease workflows.
  • Tenant invitations.
  • Rent payments and receipts.
  • Messaging and notifications.
  • Subscriptions and in-app purchases.
  • Required-app-update gate.
  • Product telemetry, API request telemetry, and scrubbed diagnostic breadcrumbs using privacy-safe request, correlation, and spawn identifiers.

The mobile repository does not own or deploy the customer website and has no customer Amplify hosting build.

Useful source locations:

  • mobile-frontend/package.json
  • mobile-frontend/app.config.js
  • mobile-frontend/utils/telemetry/
  • mobile-frontend/.gitlab-ci.yml

Customer Web

The landing-frontend repository owns the public customer website. It is separate from the native mobile app. Production is hosted by the customer AWS Amplify app; integration is served by the integration laptop at https://www.mamnajem.win.

Main responsibilities:

  • Marketing landing pages.
  • Legal and privacy pages.
  • Public support pages, including /support and /auth/support.
  • Public intake forms protected by Cloudflare Turnstile.
  • Native-app bridge pages for Stripe Connect, subscription, and account/payment return flows.
  • Android App Links and Apple Universal Links association files.

The public website does not contain the authenticated product, Cognito sign-in, or other customer account workflows. Those remain in the native mobile app.

Useful source locations:

  • landing-frontend/package.json
  • landing-frontend/app/
  • landing-frontend/public/
  • landing-frontend/amplify.yml
  • landing-frontend/.gitlab-ci.yml

Web App

The web-frontend repository is a React/Vite customer web app that talks to the backend with Cognito bearer tokens. It is deployed to integration only, at https://app.mamnajem.win, from the web:build:integration artifact pulled by the integration laptop. It is not part of the client contract.

Useful source locations:

  • web-frontend/src/lib/integration/config.ts
  • web-frontend/.gitlab-ci.yml

Documentation Site

The docs repository owns the static internal product and operator site. It builds MkDocs output and a deterministic ZIP/checksum/build marker in GitLab. The integration laptop pulls the integration build artifact and serves it at https://docs.mamnajem.win; verify_integration_docs waits for its build marker. Production has one exact-SHA manual deployment job, which obtains the app ID, branch name, role ARN, and release-matrix SHA only from the checksummed F9 architecture contract.

Terraform, not this repository, owns the production manual Amplify app/branch, custom headers, caches, and binding for https://docs.mamnajem.pl. The docs site has no GitLab Pages job, provider repository connection, webhook, deploy token, or static AWS credentials.

Useful source locations:

  • docs/mkdocs.yml
  • docs/.gitlab-ci.yml
  • docs/scripts/build-docs-site.sh
  • docs/scripts/package-docs-deployment.sh

Admin Web

The admin web app is a Vite and React application using AWS Amplify libraries with the Cognito admin user pool. Production admin is hosted on AWS Amplify; integration admin is served by the integration laptop at https://admin.mamnajem.win.

Main responsibilities:

  • Internal operational access.
  • Admin Cognito authentication.
  • Operator-only backend workflows.
  • Privacy-controlled browser error diagnostics through New Relic.

Useful source locations:

  • web-admin/package.json
  • web-admin/src/lib/amplify.ts
  • web-admin/.gitlab-ci.yml

Infrastructure

Infrastructure is managed through Terraform.

Integration runs on the integration laptop (since 2026-11-08; the Lightsail host and Amplify integration apps are retired):

  • Docker Compose runs PostgreSQL, the backend and Caddy.
  • Public traffic reaches Caddy only through a Cloudflare tunnel: api, www, admin, docs and app under mamnajem.win.
  • A deployer polls GitLab for each repository's newest successful integration build job and deploys its artifact; integration CI only verifies the result.
  • Cognito, S3 and other AWS services used by integration stay on AWS.

Production uses the fuller runtime:

  • ECS for the backend.
  • ALB for API traffic.
  • RDS for PostgreSQL.
  • Route53 for DNS.
  • Amplify for web hosting.
  • New Relic operational dashboards, metrics, traces, errors, and alerts; retained CloudWatch logs and raw AWS metrics.

Useful source locations:

  • architecture/README.md
  • architecture/terraform/aws-integration/
  • architecture/terraform/aws-production/
  • architecture/terraform/google/
  • architecture/terraform/gitlab/
  • architecture/assets/integration/

Key External Services

Service Purpose
AWS Cognito Customer and admin authentication.
AWS S3 File storage and integration PostgreSQL backups.
Integration laptop + Cloudflare tunnel Integration backend, database and static sites (*.mamnajem.win).
AWS ECS, ALB, RDS Production backend runtime.
AWS Route53 DNS.
AWS Amplify Production customer, docs, and separate admin web hosting. Docs deployments use a repository-less ZIP flow; app/branch IDs and custom headers are Terraform-owned.
AWS CloudWatch Retained legacy collection and production monitoring during the New Relic cutover.
AWS SNS Infrastructure-event delivery into New Relic through the environment forwarder. Terraform and backend config contain Android SNS mobile-push resources, but current backend notification publishing still uses ExpoPushSender with stored raw token values.
New Relic Operational metrics, logs, traces and application errors. Integration coverage is verified in the observability runbook; production rollout remains manual.
Firebase Analytics Product analytics and funnel telemetry.
Firebase Remote Config Required mobile app update gate.
Firebase Messaging and Expo Push API Current local code obtains Firebase Messaging tokens on native mobile and sends stored token values through the backend ExpoPushSender.
BigQuery Firebase Analytics export and aggregate reporting.
Stripe Subscriptions, rent payments, Connect, disputes, refunds, webhooks.
Cloudflare Turnstile Bot protection for public customer website intake forms.
GitLab CI/CD Test, security, deploy, release, and infrastructure pipelines.