How satishpwebdev/social_media_app works
Project type and purpose
• This is a single‐page, full‐stack‐type social media application implemented entirely in React + TypeScript on the frontend, but using Firebase as a Backend-as-a-Service (BaaS) for authentication, real-time database, storage and hosting.
• Users can register/login, create posts, like, save, comment, and see real-time updates.
File structure
• Top level:
• index.html, main.tsx, App.tsx → entry point of the React SPA
• package.json, vite.config.ts, tsconfig*.json, eslint.config.js, tailwind.config.js → build & tooling
• src/components → reusable UI components (Navbar, Post, Comments, CreatePost, ProtectedRoute/PublicRoute, WelcomeScreen)
• src/pages → route‐level containers (Feed, MyPosts, SavedPosts, Login, Register)
• src/contexts/AuthContext.tsx → global auth state via React Context
• src/lib/firebase.ts → Firebase initialization & wrapper
• src/types → shared TypeScript types
• No separate backend repo – all business logic invokes Firebase APIs from the client.
README for additional insights
• Tech stack: React + Vite, TypeScript, Tailwind CSS on the client; Firebase Auth, Firestore, Storage, Hosting on the server side.
• Features: real-time updates, protected routes, responsive design.
• Labels: “Browser”, “Firebase Hosting”, “React App (index.html → main.tsx → App.tsx)”, “AuthContext”, “ProtectedRoute/PublicRoute”, “Pages (Feed, MyPosts, etc.)”, “Components (Post, Comments, CreatePost)”, “Firebase Auth”, “Firestore”, “Storage”.
• Notes on real-time update channels.