How karprabha/localfluence works
Main Components
A. Client Layer:
• Next.js Frontend Application
• Public Routes (/, /login, /signup)
• Protected Dashboard Routes (/dashboard/*)
B. Infrastructure Layer:
• NGINX Reverse Proxy (Load Balancer)
C. Backend Services:
• Auth Server (REST API)
• GraphQL Server
• Shared Database (PostgreSQL)
D. External Services:
• OAuth Providers (GitHub, Google)
[Client Layer]
• ↓
[Infrastructure Layer]
• ↓
[Backend Services Layer]
• ↓
[Data Layer]
Detailed Component Relationships
A. Frontend (Next.js):
• Public and dashboard layouts as separate containers
• Components:
• Authentication flows
• Campaign management
• User profile management
B. NGINX Layer:
• Routing rules:
• /api/* → Auth Server
• /graphql/* → GraphQL Server
• /* → Frontend
C. Backend Services:
• Auth Server:
• Authentication controllers
• OAuth services
• JWT service
• User management
• GraphQL Server:
• Schema definitions
• Resolvers (Queries/Mutations)
• Data loaders
• Campaign management
D. Database Layer:
• Main entities:
• Users
• UserOAuth
• UserPasswords
• RefreshTokens
• Campaigns
• Influencers
• CampaignManagers
Implementation Details
[Client Browser] → [NGINX Reverse Proxy]
• ↓
• ┌────────────┬──────────────┐
• ↓ ↓ ↓
[Frontend] [Auth Server] [GraphQL Server]
• ↑ ↑ ↑
• ┴──────────────┘
• ↓
• [PostgreSQL DB]
Additional Elements
• Version indicators for APIs (v1)
• Security boundaries
• Containerized services (Docker)
• Scalable components