How iamvijay98/social-media-app-frontend works
Project type and purpose
• This is a React‐based Single Page Application (SPA) implementing the front end of a social network (“FACE GRAM”).
• Users can sign up / log in, create/read/update/delete posts, follow/unfollow, comment, like, view profiles and receive notifications.
File structure
• Top‐level:
• public/ – static HTML, manifest, robots.txt
• src/ – all React source code
– index.js + App.js – entry point and root component with Router
– Components/ – reusable UI widgets (Navigation, LeftSide, MiddleSide, RightSide, Post, Comments, Profile modules, etc.)
– Pages/ – route‐level components (Home, Profile, Notification, FriendsId, Register)
– Data/ – mock or API‐service wrappers (DisplayPostData.js, FollowingData.js)
– assets/ – images and media resources
• No backend code here, but README implies REST/GraphQL APIs for persistence and auth.
Relevant README insights
• Tech stack: React, JavaScript, CSS3
• Navigation via React Router
• Responsive design across devices
• Key features: signup/login, profile editing, posting, commenting, liking, following, notifications
a. Main Components
• User’s Browser (React SPA)
• Static File Hosting / CDN (serves index.html, JS, CSS, assets)
• API Layer (Auth Service, Posts Service, Users Service, Notification Service)
• Database(s) or managed backend (where data is stored)
• External Services (e.g., image store or CDN for user uploads, push notifications)
b. Relationships & Interactions
• User → HTTP(S) → Static Hosting (delivers SPA)
• Within SPA:
• App.js + Router decide which Page component to mount
• Page components import and compose UI Components
• UI Components call Data / API wrappers → REST endpoints
• SPA ↔ API Layer: Authentication tokens, CRUD for posts/comments/follows, notifications
• API Layer ↔ Database / Storage
c. Architectural Patterns & Design Principles
• Component-based UI (React) with clear separation of concerns (Navigation, Layout, Widgets)
• Client-side routing (React Router)
• Service abstraction for data access (Data/ folder)
• Responsive layout (CSS modules per component)
• Potential global state (Context or Redux) woven into data service layer
d. Key Technologies / Frameworks
• React (create-react-app conventions)
• React Router for navigation
• CSS modules / scoped CSS for styling
• Fetch/Axios or custom wrapper in Data/ for HTTP calls
• CDN for static asset delivery
• JWT or OAuth for auth tokens (implied)