How pointauc/pointauc_frontend works
Project type and purpose
• This is a single‐page application (SPA) written in React + TypeScript built with Vite.
• Purpose: a front‑end client for “Pointauc,” an Auction Service for Streamers that integrates with Twitch Channel Points, Donation Alerts, DonatePay, YouTube, and real‑time event streams. It provides interactive tools (auctions, wheels, lotteries) and customizable settings.
File structure
• Top‑level:
• public/ – static assets (fonts, robots.txt, sitemap.xml).
• src/ – application source:
– api/ – wrappers around HTTP endpoints for each integration (twitchApi, donatePayApi, etc.)
– services/ – core logic and long‑lived connections (WebSocketService, ChatService, SaveLoadService).
– reducers/ – Redux reducers for application state (AucSettings, Requests, User, socketIo).
– components/ – reusable UI components organized by feature.
– pages/ – route‑level page components (auction, settings, history, wheel, documentation).
– hooks/ – custom React hooks (useWheel, useStorageState, useChatBot).
– models/, enums/, constants/ – domain types and shared constants.
– assets/, styles/, i18n/ – theming, translations, global styles.
• config files: tsconfig.json, vite.config.ts, .eslintrc.cjs, .prettierrc.
Key insights from README
• Real‑time updates (bids, events).
• Multiple integrations (Twitch channel points, Donation Alerts, DonatePay).
• Interactive decision‑making tools (Wheel of Fortune, Dropout Wheel, Battle Royale).
• Customizable appearance and settings.
How to represent this
a. Main components
• Browser (client)
• React Application
– UI Layer: pages, components, theme & router wrappers
– State Layer: Redux store + reducers
– API Layer: src/api/* modules
– Service Layer: WebSocketService, ChatService, SaveLoadService
– Utility Layer: hooks, models, constants
• External Services
– Pointauc Back‑end API (auction, requests, settings)
– Twitch Channel Points API
– Donation Alerts API
– DonatePay API
– YouTube API (player & data)
– AUKUS event service
– Pubsub/Centrifuge real‑time event stream
b. Relationships and interactions
• UI Layer dispatches Redux actions → updates store → re‑renders components.
• Components invoke API Layer modules to call REST back‑end or third‑party services.
• WebSocketService/centrifugeFlow connects to real‑time stream → dispatches updates to Redux.
• Hooks wrap components around API calls and service subscriptions.
• i18n & ThemeWrapper provide context to all UI components.
c. Architectural patterns and design principles
• Component‑based UI (React)
• Unidirectional data flow (Redux)
• Separation of concerns: UI / state / API / services
• Context providers for theme and localization
• Custom hooks to encapsulate logic (e.g., useWheel, useChatBot)
• Typed contracts (TypeScript models & enums)
d. Key technologies & frameworks
• React + JSX + SCSS
• Redux (reducers folder)
• Vite build tool
• TypeScript
• WebSocket / Centrifuge for real‑time
• REST calls via Axios or fetch in src/api
• i18next or custom i18n module
• External APIs (Twitch, Donation Alerts, DonatePay, YouTube)
Final advice
• Be detailed: capture each logical layer and its relation.
• Components by role, not file path.
• Don’t overthink—list all layers and show how data flows end to end, from user interaction through API calls and back via WebSocket events.