Architecture Overview - SeoulSKY/safe-zone-system GitHub Wiki
Architecture-Diagram.drawio.png
Services
Reverse Proxy
Responsibilities
- Central location for client request.
- Proxy requests depending on the URL to different backend services.
- Services include:
- CMS
- MIBS
- Keycloak
- Services include:
- Proxy content over HTTP and HTTPS.
- Content between services will not need TLS as this service will encrypt content between the client and the reverse proxy. I.e. HTTP requests within the docker network will not be encrypted, but requests between the client and reverse proxy will be encrypted.
Technology
- Docker
- Nginx.
Content Management Service (CMS)
Responsibilities
- Responsible for providing and managing user content.
- Content includes:
- User content
- Permissions / Roles.
- Profile.
- Risk Assessment
- Provide risk assessment quiz content.
- Evaluate risk assessment quiz and return result.
- Allow CRUD operations for risk assessment quiz(s?) (details will be discussed later).
- Safe Plan
- Allow CRUD operations for user created safe plan (details will be discussed later).
- Resources (From Safe Zone System PDF)
- Operation Runaway Overview.
- List of places where youth can go, and associated information (e.g., when open, qualifying criteria).
- List of community services to which a youth can go for help. This includes general resources such as mobile crisis centre, street outreach, safe house, lighthouse, salvation army friendship inn, but also topic-specific resources such as treatment centres, detox centres, etc.).
- User content
Technology
- Docker.
- Nginx.
- uWSGI to serve flask
- Python
- Flask
- SqlAlchemy
Message in a Bottle Service (MIBS)
Responsibilities
- Operations for "message in a bottle" (MIB).
- Includes:
- Custom message content.
- User location.
- Send time.
- One or more recipients
- How to deliver message to recipient:
- SMS
- Push notifications for other app users
- Email (SMTP)
- How to deliver message to recipient:
- CRUD operations for MIB management.
- Includes:
- Delivering MIBs to recipients.
- Poll database periodically for any MIBs that should be sent.
- Send MIBs for all MIBs that should be sent with respect to their deliverable type (SMS, push notifications, Email).
Technology
- Docker.
- Nginx.
- uWSGI to serve flask
- Python
- Flask
- SqlAlchemy
Web
Responsibilities
- Serve static web content.
- Content will be a single page react application.
Technology
- Docker
- Nginx
- Web server.
- React
- Web content.
- Typescript.
Keycloak
Responsibilities
- Provide user authentication through OpenId Connect.
- Provide user account registration and login.
- Provide user account management.
- Provide user email verification.
- Provide two factor authentication.
Technology
- Docker
- Keycloak
PostgreSQL
Responsibilities
- Relational database to store persistent application content.
- Content includes:
- User account and profile information.
- Risk assessment quiz content.
- Safe plan content.
- MIB content.
- Content includes:
Technology
- PostgreSQL.
- Docker for development.
SMTP (Email)
Responsibilities
- Provide outgoing email:
- Account verification / sign up.
- Email MIBs.
Technology
- Python SMTPD module for development and testing.
- Unknown what will be used for production.
- Stakeholder may already have an email server that the application would use.
- Allow arbitrary SMTP servers.
- If we are hosting it, it may run in a docker container or directly on an OS.
- Stakeholder may already have an email server that the application would use.
Firebase Cloud Messaging (FCM)
Responsibilities
- Provide push notifications for MIBs to other users of the mobile app.
Technology
- FCM
- Third party service.
SMS/MMS
Responsibilities
- Provide SMS/MMS message for MIBs.
Technology
- Unknown, need to discuss with stakeholder about cost.
- Third party service.