-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Flow
thuanvu301103 edited this page Feb 19, 2026
·
2 revisions
This document outlines the end-to-end process of user registration within the GopherPay ecosystem. It details how the Identity Service handles new user requests, ensures data security, and coordinates with other services.
The User Registration flow is the primary entry point for new users. The goal is to create a secure user identity, initialize account settings, and trigger verification email while maintaining strict data validation and security standards.
The following diagram illustrates the interaction between the User, the Identity Service, the Database, and the asynchronous Notification system.
sequenceDiagram
autonumber
actor User
participant Auth as Auth Service:Auth Module
participant DB as Database (PostgreSQL)
participant Kafka as Message Broker:Kafka Brokes (Topic: email-verification)
participant KC as Message Broker:Kafka Connect
participant Novu as Notification Service (Novu)
participant SMTP as Email Provider
User->>Auth: HTTP POST /auth/register
Auth->>DB: Check if user exists
alt User Already Exists
DB-->>Auth: Found record
Auth-->>User: HTTP 409 Conflict
else User Does Not Exist
Note over Auth: Hash Password & Prepare Record
Auth->>DB: Create User Record
DB-->>Auth: Success (User ID)
par Async Notification Trigger
Auth->>Kafka: Publish User Data to 'email-verification'
Kafka-->>Auth: Ack (Message Received)
and Immediate Response
Auth-->>User: HTTP 201 Created (Success)
end
end
Note over KC, Novu: Asynchronous Processing Loop
Kafka->>KC: Consume message from 'email-verification'
KC->>Novu: HTTP POST /v1/events/trigger (Trigger Notification)
Novu->>SMTP: Send Email via SMTP/Provider
SMTP-->>User: Receive Verification Email