1+ graph TB
2+ subgraph "Client Layer "
3+ Client [ Frontend Application]
4+ end
5+
6+ subgraph "API Gateway "
7+ Router [ Rails Router]
8+ CORS [ CORS Middleware]
9+ RateLimit [ Rate Limiting]
10+ Auth [ Authentication Middleware]
11+ end
12+
13+ subgraph "Application Layer - Modular Monolith "
14+ subgraph "Authentication Module "
15+ AuthController [ Auth Controller]
16+ JWTService [ JWT Service]
17+ UserModel [ User Model]
18+ end
19+
20+ subgraph "Dashboard Module "
21+ DashboardController [ Dashboard Controller]
22+ DashStats [ Statistics Service]
23+ end
24+
25+ subgraph "Players Module "
26+ PlayersController [ Players Controller]
27+ PlayerModel [ Player Model]
28+ ChampionPoolModel [ Champion Pool Model]
29+ end
30+
31+ subgraph "Scouting Module "
32+ ScoutingController [ Scouting Controller]
33+ ScoutingTargetModel [ Scouting Target Model]
34+ Watchlist [ Watchlist Service]
35+ end
36+
37+ subgraph "Analytics Module "
38+ AnalyticsController [ Analytics Controller]
39+ PerformanceService [ Performance Service]
40+ KDAService [ KDA Trend Service]
41+ end
42+
43+ subgraph "Matches Module "
44+ MatchesController [ Matches Controller]
45+ MatchModel [ Match Model]
46+ PlayerMatchStatModel [ Player Match Stat Model]
47+ end
48+
49+ subgraph "Schedules Module "
50+ SchedulesController [ Schedules Controller]
51+ ScheduleModel [ Schedule Model]
52+ end
53+
54+ subgraph "VOD Reviews Module "
55+ VODController [ VOD Reviews Controller]
56+ VodReviewModel [ VOD Review Model]
57+ VodTimestampModel [ VOD Timestamp Model]
58+ end
59+
60+ subgraph "Team Goals Module "
61+ GoalsController [ Team Goals Controller]
62+ TeamGoalModel [ Team Goal Model]
63+ end
64+
65+ subgraph "Riot Integration Module "
66+ RiotService [ Riot API Service]
67+ RiotSync [ Sync Service]
68+ end
69+
70+ subgraph "Competitive Module "
71+ CompetitiveController [ Competitive Controller]
72+ ProMatchesController [ Pro Matches Controller]
73+ PandaScoreService [ PandaScore Service]
74+ DraftAnalyzer [ Draft Analyzer]
75+ end
76+
77+ subgraph "Scrims Module "
78+ ScrimsController [ Scrims Controller]
79+ OpponentTeamsController [ Opponent Teams Controller]
80+ ScrimAnalytics [ Scrim Analytics Service]
81+ end
82+
83+ subgraph "Strategy Module "
84+ DraftPlansController [ Draft Plans Controller]
85+ TacticalBoardsController [ Tactical Boards Controller]
86+ DraftAnalysisService [ Draft Analysis Service]
87+ end
88+
89+ subgraph "Support Module "
90+ SupportTicketsController [ Support Tickets Controller]
91+ SupportFaqsController [ Support FAQs Controller]
92+ SupportStaffController [ Support Staff Controller]
93+ SupportTicketModel [ Support Ticket Model]
94+ SupportFaqModel [ Support FAQ Model]
95+ end
96+ end
97+
98+ subgraph "Data Layer "
99+ PostgreSQL [( PostgreSQL Database)]
100+ Redis [( Redis Cache)]
101+ end
102+
103+ subgraph "Background Jobs "
104+ Sidekiq [ Sidekiq Workers]
105+ JobQueue [ Job Queue]
106+ end
107+
108+ subgraph "External Services "
109+ RiotAPI [ Riot Games API]
110+ PandaScoreAPI [ PandaScore API]
111+ end
112+
113+ Client --> | HTTP/JSON | CORS
114+ CORS --> RateLimit
115+ RateLimit --> Auth
116+ Auth --> Router
117+
118+ Router --> GoalsController
119+ Router --> CompetitiveController
120+ Router --> ProMatchesController
121+ Router --> ScrimsController
122+ Router --> OpponentTeamsController
123+ Router --> DraftPlansController
124+ Router --> TacticalBoardsController
125+ Router --> SupportTicketsController
126+ Router --> SupportFaqsController
127+ Router --> SupportStaffController
128+ AuthController --> JWTService
129+ AuthController --> UserModel
130+ PlayersController --> PlayerModel
131+ PlayerModel --> ChampionPoolModel
132+ ScoutingController --> ScoutingTargetModel
133+ ScoutingController --> Watchlist
134+ Watchlist --> PostgreSQL
135+ MatchesController --> MatchModel
136+ MatchModel --> PlayerMatchStatModel
137+ SchedulesController --> ScheduleModel
138+ VODController --> VodReviewModel
139+ VodReviewModel --> VodTimestampModel
140+ GoalsController --> TeamGoalModel
141+ AnalyticsController --> PerformanceService
142+ AnalyticsController --> KDAService
143+ CompetitiveController --> PandaScoreService
144+ CompetitiveController --> DraftAnalyzer
145+ ScrimsController --> ScrimAnalytics
146+ ScrimAnalytics --> PostgreSQL
147+ DraftPlansController --> DraftAnalysisService
148+ SupportTicketsController --> SupportTicketModel
149+ SupportFaqsController --> SupportFaqModel
150+ SupportStaffController --> UserModel
151+ AuditLogModel [ AuditLog Model] --> PostgreSQL
152+ CompetitiveMatchModel [ CompetitiveMatch Model] --> PostgreSQL
153+ CurrentModel [ Current Model] --> PostgreSQL
154+ FantasyWaitlistModel [ FantasyWaitlist Model] --> PostgreSQL
155+ MessageModel [ Message Model] --> PostgreSQL
156+ NotificationModel [ Notification Model] --> PostgreSQL
157+ OrganizationModel [ Organization Model] --> PostgreSQL
158+ PasswordResetTokenModel [ PasswordResetToken Model] --> PostgreSQL
159+ SavedBuildModel [ SavedBuild Model] --> PostgreSQL
160+ ScoutingWatchlistModel [ ScoutingWatchlist Model] --> PostgreSQL
161+ TokenBlacklistModel [ TokenBlacklist Model] --> PostgreSQL
162+ JWTService --> Redis
163+ DashStats --> Redis
164+ PerformanceService --> Redis
165+ PlayersController --> RiotService
166+ MatchesController --> RiotService
167+ ScoutingController --> RiotService
168+ RiotService --> RiotSync
169+ RiotService --> RiotAPI
170+
171+ RiotService --> Sidekiq
172+ PandaScoreService --> PandaScoreAPI [ PandaScore API]
173+ Sidekiq -- Uses --> Redis
174+
175+ style Client fill :#e1f5ff
176+ style PostgreSQL fill :#336791
177+ style Redis fill :#d82c20
178+ style RiotAPI fill :#eb0029
179+ style PandaScoreAPI fill :#ff6b35
180+ style Sidekiq fill :#b1003e
0 commit comments