How ronixa584/twitter works
Main Components
A. Frontend Layer (Twitter Client):
• Next.js Application Container
• Components Module (FeedCard, Layout, PostTweet)
• Pages/Routing (Dynamic routes with [id])
• GraphQL Client Integration
• Hooks Layer (tweet.ts, user.ts)
B. Backend Layer (Twitter Server):
• Express.js Server
• GraphQL API Layer
• Service Layer
• Tweet Service
• User Service
• JWT Service
• Database Layer (Prisma ORM)
C. External Services:
• Supabase Database
• GCP Storage
• GraphQL API Gateway
Component Relationships
[Frontend] ←→ [GraphQL API Gateway] ←→ [Backend Services] ←→ [Database]
Important Architectural Patterns to Highlight
• GraphQL-based communication between frontend and backend
• Service-based architecture in the backend
• Type-safe data flow (TypeScript throughout)
• ORM abstraction layer
• JWT-based authentication flow
Technical Details
Frontend:
[Next.js App]
• Component Layer
• GraphQL Client
• React Query
• TailwindCSS
Backend:
[Express Server]
• GraphQL API
• Services
• Resolvers
• Prisma Client
Database:
[Supabase]
• User Data
• Tweet Data
• Relationships