Skip to content

Latest commit

 

History

History
127 lines (78 loc) · 9.23 KB

File metadata and controls

127 lines (78 loc) · 9.23 KB
graph LR
    User_Subscription_Data_Models["User & Subscription Data Models"]
    Authentication_User_API["Authentication & User API"]
    Subscription_Payment_API["Subscription & Payment API"]
    API_Gateway_Router["API Gateway/Router"]
    Stripe_Payment_Integration["Stripe Payment Integration"]
    Google_OAuth_Provider["Google OAuth Provider"]
    Database_Service["Database Service"]
    Subscription_Seeding_Tool["Subscription Seeding Tool"]
    Unclassified["Unclassified"]
    API_Gateway_Router -- "forwards requests to" --> Authentication_User_API
    API_Gateway_Router -- "forwards requests to" --> Subscription_Payment_API
    Authentication_User_API -- "reads/writes user data to" --> User_Subscription_Data_Models
    Authentication_User_API -- "authenticates users via" --> Google_OAuth_Provider
    Subscription_Payment_API -- "reads/writes subscription data to" --> User_Subscription_Data_Models
    Subscription_Payment_API -- "initiates payments and processes webhooks with" --> Stripe_Payment_Integration
    User_Subscription_Data_Models -- "persists and retrieves data from" --> Database_Service
    Stripe_Payment_Integration -- "updates subscription statuses in" --> User_Subscription_Data_Models
    Subscription_Seeding_Tool -- "directly interacts with" --> User_Subscription_Data_Models
    click API_Gateway_Router href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/cvimprover-api/API_Gateway_Router.md" "Details"
Loading

CodeBoardingDemoContact

Details

The system is structured around a core set of APIs for user authentication, profile management, and subscription handling. The API Gateway/Router directs incoming requests to either the Authentication & User API or the Subscription & Payment API. Both APIs interact with the User & Subscription Data Models for data persistence, which in turn relies on the Database Service. User authentication can be performed directly or through the Google OAuth Provider. The Subscription & Payment API integrates with Stripe Payment Integration for processing payments and managing subscriptions, with Stripe webhooks updating the User & Subscription Data Models. A Subscription Seeding Tool is available for initial population of subscription plans.

User & Subscription Data Models

Defines the foundational data structures for users, user profiles, authentication tokens (JWT), various subscription plans, and payment-related information. It establishes relationships between users and their active subscriptions.

Related Classes/Methods:

Authentication & User API

Provides RESTful API endpoints for user registration, login (supporting JWT and Google OAuth), password management, and CRUD operations for user profiles. It leverages dj_rest_auth and allauth for robust authentication flows.

Related Classes/Methods:

Subscription & Payment API

Manages API endpoints for displaying available subscription plans, initiating new subscriptions, handling plan upgrades/downgrades, and processing subscription cancellations. It also includes webhook handlers for Stripe events.

Related Classes/Methods:

API Gateway/Router [Expand]

Serves as the entry point for all incoming requests to the user and subscription management functionalities, mapping specific URL patterns to the appropriate view functions within the Authentication & User API and Subscription & Payment API.

Related Classes/Methods:

Stripe Payment Integration

Handles direct communication with the Stripe API for processing payments, creating customer records, managing subscriptions, and securely receiving and processing payment-related webhooks.

Related Classes/Methods:

Google OAuth Provider

Manages the secure integration with Google's OAuth 2.0 service, enabling users to authenticate and register using their Google accounts.

Related Classes/Methods:

Database Service

Provides the underlying persistent storage and retrieval mechanisms for all user, profile, authentication, and subscription-related data defined by the User & Subscription Data Models.

Related Classes/Methods:

Subscription Seeding Tool

A Django management command designed for initial setup, populating the database with predefined subscription plans to ensure the system has a baseline of available offerings.

Related Classes/Methods:

Unclassified

Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)

Related Classes/Methods: None