Skip to content

da-arnone/test-subscription-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

suscription-app

Private-data subscription request manager — same component pattern as org-app / provider-app.

Surfaces

Surface Prefix Consumers
Admin /admin/suscription/ Full CRUD on subscription requests
App /api/suscription/ Org users: login + list/create own org’s requests
Third /third/suscription/ org-app/provider-app: cross-component create/list/decision

Org-app integration

From org-app, after consulting provider detail (which includes private_data_summary from provider-app):

  • GET /api/org/subscriptions/requests/ — list requests for current org
  • POST /api/org/subscriptions/requests/create/ — body: { "submitting_entity_id": <int>, "submitting_entity_type": "organization", "submitee_entity_id": <int>, "submitee_entity_type": "provider", "requested_private_fields": [...], "reason": "..." }

The subscription service keeps submissions generic and only stores explicit metadata about who submits and who receives. Each receiving app is expected to resolve impacted domain entities and processing rules in its own business logic.

Provider-side decision lifecycle is exposed through:

  • PATCH /third/suscription/requests/<id>/decision/
    • provider-app marks incoming requests as handled or rejected
    • provider decision metadata is persisted in decision_metadata

Cross-component access rule:

  • Any consumer calling third/suscription/* must use a token authorized for subscription-app/subscribe-third.
  • UI access (api/suscription/* and admin/suscription/*) should use subscription-app application profiles, not org/provider component roles.

Set in org-app environment:

  • SUSCRIPTION_APP_URL — base URL of this service (e.g. http://localhost:8003 or http://suscription-app:8000 in Docker)

Run locally

Backend

cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -e .
python manage.py migrate
python manage.py loaddata suscription_app/fixtures/seed.json
python manage.py runserver 8003

Frontend

cd frontend
npm install
npm start

Dev server: http://localhost:3003 (proxies /api, /admin, /third to backend).

Docker

cp .env.example .env
docker compose up --build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors