How karimbahri/streamvision works
Key Components
• Frontend (Client): This is located under the “client” directory. It uses React (with JSX and TypeScript), Vite as the build tool, Redux for state management, and Apollo Client to interact with the GraphQL API.
• Backend (Server): Found under the “server” directory, the backend uses Node.js (with Express, most likely), GraphQL for API endpoints, and TypeORM for database interactions.
• Database: A PostgreSQL database which holds the essential entities (such as shows, users, and verification codes). Also, Supabase is mentioned for authentication and additional data management.
• External Services: Docker is used for containerization (as described in the Docker Compose setup in the README). There is also integration with Supabase for authentication and possibly CDN configuration for serving assets.
Lay Out the Relationships and Data Flow
• The Backend processes GraphQL queries and mutations via its resolvers (organized in the “schema” directory, with separate folders for queries, mutations, typedefs, and entities).
• Additionally, there is a direct or configuration-level integration with Supabase (as indicated by the client’s supabase directory and environment variables). This can be shown as a separate external service or authentication/data storage component.
• Docker containers (for both client and server, plus the database) can be represented as an infrastructure layer that encapsulates these components.
Architectural Patterns and Design Principles
• Separation of Concerns: The project clearly separates frontend and backend responsibilities (e.g., React and Redux for UI/state and Node.js/GraphQL for business logic).
• Modular Design: Both directories have a structured, modular organization (e.g., client has components, apollo-client, redux, etc.; server has entities, schema, and database configurations).
• API-Centric Communication: Use of GraphQL for the API layer enables efficient data querying between the client and server.
• Containerization: The deployment using Docker Compose encapsulates and manages the environment consistently.
Relevant Technologies and Frameworks
• Frontend: React, Vite, Redux, Apollo Client, CSS/SCSS.
• Backend: Node.js, Express (or similar), GraphQL (with separate directories for queries, mutations, and typedefs), TypeORM.
• Database: PostgreSQL.
• External Tools: Supabase for authentication/data storage, Docker/Docker Compose for containerization.