# acedatacloud/nexior architecture

> Architecture diagram of the GitHub repository acedatacloud/nexior, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/acedatacloud/nexior
- Repository: https://github.com/acedatacloud/nexior

## Overview

##### Project Type and Purpose
– Nexior is a full-stack AI-application platform with:
- A Vue3 single‐page web application (with Vuex, Vue Router, Vite, Tailwind CSS, i18n)
- Hybrid mobile apps (iOS/Android via Capacitor)
- CI/CD and containerized deployment (Docker, Docker Compose, Kubernetes manifests, Vercel)
It provides unified UIs for AI Chat, Image, Music, and Video services, plus user-management, payment, and referral systems, all without requiring you to build or manage AI accounts.

##### File Structure Highlights
– Top‐level:
- src/ → Vue3 front-end code (components, pages, store, router, plugins, utils)
- android/ & ios/ → Capacitor-wrapped native shells
- deploy/ → Kubernetes YAMLs and deploy scripts for prod/test
- Dockerfile & docker-compose.yaml → container definitions
- .github/workflows/ → CI/CD pipelines (lint, build, publish, deploy)
– No custom backend code in this repo: the front end calls hosted APIs (presumably provided by AceDataCloud platform).

##### Insights from README
– Describes unified “one-click” deployment of AI services (ChatGPT, Midjourney, Suno, Luma, etc.)
– Encourages deployment via Vercel and Kubernetes

a. Main Components
- Clients:
– Web (SPA served via CDN/Vercel or container behind Nginx)
– Mobile (iOS & Android via Capacitor shells)
- CI/CD: GitHub Actions pipelines → Docker registry & Vercel
- Infrastructure:
– CDN / Load Balancer
– Reverse Proxy (Nginx)
– Web Container (serving static assets + Vite dev)
– (Optional) Node API Gateway / serverless functions
- Microservices / API Layer:
– Auth Service (email/password, JWT)
– User & Profile Service
– Payment Service (Stripe, WeChat Pay integrations)
– Referral/Distribution Service
– Chat Service (proxies to ChatGPT, DeepSeek, Grok)
– Image Service (Midjourney, Flux, QRArt)
– Music Service (Suno)
– Video Service (Luma, Pika, Hailuo)
- Data Stores:
– User DB (SQL/NoSQL)
– Order & Billing DB
– Referral Ledger
- External Services:
– OpenAI, Midjourney API, Suno API, etc.
– Stripe, WeChat Payment
– Email/SMS provider

b. Relationships & Data Flow
1. Client → CDN/LB → Web App
2. Web/Mobile → API Gateway → respective microservices
3. Microservices ↔ Databases (persist users, orders, referrals)
4. AI microservices → External AI provider APIs
5. Payment service ↔ Stripe/WeChat
6. Referral service calculates commission → updates DB

c. Architectural Patterns
– SPA frontend with MVVM (Vue components + Vuex store)
– Hybrid mobile using Capacitor (same code + native shell)
– Microservices/API-Gateway pattern
– CI/CD pipeline deploying containers & serverless functions

d. Key Technologies
– Frontend: Vue 3, Vuex, Vue Router, Vite, Tailwind, Capacitor
– Deployment: Docker, Docker Compose, Kubernetes, Vercel
– CI/CD: GitHub Actions
– Auth: JWT/email
– Payment: Stripe, WeChat Pay
– External AI: OpenAI, Midjourney, Suno, Luma, etc.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Clients
    subgraph "Clients" 
        direction TB
        WebClient["Web Client (Vue3 SPA)"]:::client
        MobileClient["Mobile Clients (iOS & Android)"]:::client
    end

    %% CI/CD
    subgraph "CI/CD Pipeline"
        direction TB
        GitHubActions["GitHub Actions"]:::cicd
        DockerRegistry["Docker Registry"]:::infra
    end

    %% Deployment Infra
    subgraph "Deployment Infrastructure"
        direction TB
        CDN["CDN / Load Balancer"]:::infra
        ReverseProxy["Nginx Reverse Proxy"]:::infra
        WebContainer["Web Container (Static Assets)"]:::infra
        Kubernetes["Kubernetes Cluster"]:::infra
        Vercel["Vercel"]:::infra
    end

    %% API Gateway
    APIGateway["API Gateway / Serverless"]:::service

    %% Core Services
    subgraph "Core Services"
        direction TB
        AuthService["Auth Service"]:::service
        UserService["User & Profile Service"]:::service
        PaymentService["Payment Service"]:::service
        ReferralService["Referral Service"]:::service
    end

    %% AI Microservices
    subgraph "AI Services"
        direction TB
        subgraph "Chat"
            ChatService["Chat Service"]:::service
            DocChatService["Document Chat Service"]:::service
        end
        subgraph "Image"
            Midjourney["Midjourney Service"]:::service
        end
        subgraph "Video"
            Hailuo["Hailuo Service"]:::service
        end
        subgraph "Music"
            Suno["Suno Service"]:::service
        end
    end

    %% Data Stores
    subgraph "Databases"
        direction TB
        UserDB["User DB"]:::db
        BillingDB["Order & Billing DB"]:::db
        ReferralDB["Referral Ledger"]:::db
    end

    %% External APIs
    subgraph "External Services"
        direction TB
        OpenAI["OpenAI API"]:::external
        StripeAPI["Stripe API"]:::external
        WeChatPayAPI["WeChat Pay API"]:::external
    end

    %% Connections
    WebClient -->|Served via| CDN
    MobileClient -->|Packaged via| CDN
    GitHubActions -->|Push Images| DockerRegistry
    DockerRegistry --> Kubernetes
    GitHubActions -->|Deploy Frontend| Vercel

    CDN --> ReverseProxy
    ReverseProxy --> WebContainer
    WebContainer -->|Static Files| WebClient

    CDN --> APIGateway
    Vercel --> APIGateway

    APIGateway --> AuthService
    APIGateway --> UserService
    APIGateway --> PaymentService
    APIGateway --> ReferralService
    APIGateway --> ChatService
    APIGateway --> DocChatService
    APIGateway --> Midjourney
    APIGateway --> Hailuo
    APIGateway --> Suno

    AuthService --> UserDB
    UserService --> UserDB
    PaymentService --> BillingDB
    ReferralService --> ReferralDB
    ReferralService --> UserDB

    ChatService --> OpenAI
    PaymentService --> StripeAPI
    PaymentService --> WeChatPayAPI

    %% Click events
    click WebClient "https://github.com/acedatacloud/nexior/tree/main/src/"
    click MobileClient "https://github.com/acedatacloud/nexior/tree/main/ios/"
    click MobileClient "https://github.com/acedatacloud/nexior/tree/main/android/"
    click GitHubActions "https://github.com/acedatacloud/nexior/blob/main/.github/workflows/check.yaml"
    click GitHubActions "https://github.com/acedatacloud/nexior/blob/main/.github/workflows/publish.yaml"
    click GitHubActions "https://github.com/acedatacloud/nexior/blob/main/.github/workflows/deploy.yaml"
    click APIGateway "https://github.com/acedatacloud/nexior/tree/main/src/operators/"
    click AuthService "https://github.com/acedatacloud/nexior/tree/main/src/pages/auth/"
    click UserService "https://github.com/acedatacloud/nexior/blob/main/src/pages/profile/Index.vue"
    click PaymentService "https://github.com/acedatacloud/nexior/blob/main/src/components/order/StripePay.vue"
    click ReferralService "https://github.com/acedatacloud/nexior/tree/main/src/pages/distribution/"
    click ChatService "https://github.com/acedatacloud/nexior/blob/main/src/pages/chat/Conversation.vue"
    click DocChatService "https://github.com/acedatacloud/nexior/blob/main/src/pages/chatdoc/Conversation.vue"
    click Midjourney "https://github.com/acedatacloud/nexior/blob/main/src/pages/midjourney/Index.vue"
    click Hailuo "https://github.com/acedatacloud/nexior/blob/main/src/pages/hailuo/Index.vue"
    click Suno "https://github.com/acedatacloud/nexior/blob/main/src/pages/suno/Index.vue"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#006BB3,color:#003366
    classDef cicd fill:#FFF4C1,stroke:#D9A600,color:#5E4500
    classDef infra fill:#E8DAFF,stroke:#8258FA,color:#4B0082
    classDef service fill:#DFFFD6,stroke:#3BB143,color:#1B5E20
    classDef db fill:#FFE4B5,stroke:#FF8C00,color:#8B4513
    classDef external fill:#F0F0F0,stroke:#A0A0A0,color:#505050
```
