Skip to content

Web cleanup, container naming, infrastructure updates#110

Merged
sle3pyy merged 24 commits intodevfrom
ci
Apr 15, 2026
Merged

Web cleanup, container naming, infrastructure updates#110
sle3pyy merged 24 commits intodevfrom
ci

Conversation

@IX-0
Copy link
Copy Markdown
Contributor

@IX-0 IX-0 commented Apr 14, 2026

Summary

This PR bundles infrastructure and web refactoring work from the ci branch:

  1. Docker container naming — standardized container_name to sl-<service> (prod) and sl-<service>-dev (dev). Service keys (DNS) unchanged; cosmetic rename.

  2. Single SPA entry — consolidated simulation-oops.html into main app at /oops route. Removes multi-entry Vite build, simplifies deployment.

  3. Unified routing — eliminated web/src/Pages/ thin wrappers. All 6 page components inlined into TanStack route files per existing convention. Shared templates page at src/components/templates-page.tsx.

  4. Nginx SSL — updated nginx.securelearning.conf to match nginx.mednat.conf TLS config.

  5. CI/CD pipelines (c6edb25) — standardized GitHub Actions workflows (ci-api.yml, ci-web.yml, ci-smtp.yml, e2e-test.yml, cd.yml), automated container builds, deployment validation.

  6. Deployment architecture (5609d9d) — fixed RabbitMQ and MongoDB init failures on fresh start.

  7. Project documentation (84d5ac1) — rewrote CLAUDE.md and all docs for clarity.

  8. Tracking system (64a4907) — refactored tracking consumer to class, added email failure event support.

Files Changed

Docker Compose:

  • deployment/docker-compose.yml + docker-compose.dev.ymlcontainer_name fields

Web app:

  • web/src/main.tsx/oops branch before Keycloak wrap
  • web/vite.config.ts — removed multi-entry rollupOptions
  • web/.dockerignore — removed simulation-oops.html
  • web/simulation-oops.html, web/src/simulation-oops-entry.tsx — deleted
  • web/src/routes/{usergroups,campaigns,sending-profiles,templates,content-manager/templates} — inlined Pages components
  • web/src/components/templates-page.tsx — new (moved from Pages)
  • web/src/Pages/ — directory deleted

API:

  • api/src/routers/tracking.py — redirect to /oops
  • api/test/test_tracking_endpoints.py — updated expected redirect

Deployment:

  • deployment/nginx.securelearning.conf — SSL/TLS + proxy buffer headers

CI/CD Integration

  • ci-web.yml validates build, types, linting — passing
  • ci-api.yml tests routing and tracking — passing
  • e2e-test.yml, playwright.yml — SPA routes covered
  • cd.yml deployment pipeline — container names cosmetic change, DNS unaffected

Notes

  • Service DNS uses service keys (unchanged); container_name is cosmetic.
  • /oops unauthenticated route (email clickthrough target) branched before Keycloak wrap in main.tsx.
  • Old containers must be docker compose down before first up.
  • nginx.securelearning.conf is template (not currently mounted in compose).

IX-0 added 9 commits April 13, 2026 23:57
Rename container_name fields to sl-<service> (prod) and sl-<service>-dev (dev)
for consistent grouping in `docker ps`. Adds missing container_name for nginx
and db services. Service keys unchanged so inter-service DNS remains intact.
Fold the standalone simulation-oops.html page into the main SPA as an
unauthenticated branch in main.tsx, rendering SimulationOops directly when
the request path matches /oops. Removes the Vite multi-entry build and the
dedicated entry file, leaving a single HTML + single bundle graph.

- main.tsx: add /oops branch before EmailEntry/App selection
- vite.config.ts: drop rollupOptions multi-input
- delete simulation-oops.html and simulation-oops-entry.tsx
- .dockerignore: drop simulation-oops.html exclusion
- api tracking redirect: {WEB_URL}/simulation-oops.html -> {WEB_URL}/oops
- tests: update expected redirect URL
- nginx.securelearning.conf: modernize with SSL/TLS and proxy buffers to
  match nginx.mednat.conf style for parity
- Rewrite root README.md with architecture diagram, setup guide, and accurate tech stack
- Add CLAUDE.md with codebase context for AI coding assistants
- Add api/README.md with structure, architecture patterns, and route reference
- Add web/README.md with theming system, auth flow, and component guidelines
- Rewrite smtp/README.md with message flow, config, and error handling
- Rewrite deployment/README.md with services table, env config, and health checks
- Remove roadmap section and template boilerplate from root README
- rabbitmq: install gettext-base for envsubst (missing in base image)
- mongo: replace process.env with _getEnv() (mongo shell compat)
- mongo: rename MONGO_APP_USER → MONGO_USER to match .env
- mongo: mount templates/ dir for seed data in dev compose
Move all page components directly into their TanStack route files so each
route is self-contained. Shared TemplatesPage (used by /templates and
/content-manager/templates) moves to src/components/templates-page.tsx.
Deletes the src/Pages/ directory entirely.
@IX-0 IX-0 marked this pull request as draft April 14, 2026 12:59
@IX-0 IX-0 self-assigned this Apr 14, 2026
@IX-0 IX-0 added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 14, 2026
IX-0 added 9 commits April 14, 2026 14:18
Set missing KEYCLOAK_URL/CLIENT_SECRET env vars in tests to prevent
import-time exception when realm_routes initializes platform admin
service. Update tracking_consumer test to use refactored TrackingConsumer
class API instead of removed process_tracking_message function.
Replace per-folder sonar.properties files with root multi-module config
using PEI-SecureLearning_core key. Modules api, web, smtp now analyzed
under single project with separate metric tracking in UI.
@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 152 problems (139 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 152 problems (139 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@IX-0 IX-0 requested a review from tiago-bd-oliveira April 14, 2026 18:59
@github-actions

This comment was marked as spam.

@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 152 problems (139 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@IX-0 IX-0 marked this pull request as ready for review April 15, 2026 00:06
@IX-0 IX-0 requested a review from sle3pyy April 15, 2026 00:06
sle3pyy
sle3pyy previously approved these changes Apr 15, 2026
@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 152 problems (139 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 152 problems (139 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@github-actions
Copy link
Copy Markdown

Lint Report

Result: ✖ 153 problems (140 errors, 13 warnings)

Download Full Lint Log
(Log available in the Artifacts section at the bottom of the page)

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
24.4% Coverage on New Code (required ≥ 80%)
3.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@sle3pyy sle3pyy merged commit 80df579 into dev Apr 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants