How saadkhan7336/brandin works
1. What this repo is
- A React single-page application built with Create React App, centered on a two-sided marketplace for brands and influencers.
- The product spans campaign creation, influencer discovery, collaboration management, chat, notifications, and payments.
2. Top-level UI structure
- src/pages contains the route-level screens.
- src/components contains reusable UI and domain widgets.
- Shared primitives live under components/common, while larger layouts and role-specific shells are split into components/layout, components/campaign, components/chat, components/collaboration, components/payment, etc.
3. Primary experience split: public vs authenticated
- Public marketing and informational pages include landing, features, blog, case studies, help center, contact, privacy policy.
- Auth pages cover login, registration, forgot/reset password, OTP verification, and OAuth callback.
- Protected app areas are behind route guards in src/routes/ProtectedRoute.jsx and PublicRoute.jsx.
4. Role-based product areas
- The app is clearly divided into brand and influencer flows.
- Brand-side screens cover dashboards, profile views, influencer search, requests, and campaign management.
- Influencer-side screens cover requests, profile management, campaign detail, discovery/explore, and collaboration actions.
- This role split is reinforced in layout components under components/layout/brand and components/layout/influencer.
5. Campaign subsystem
- Campaign creation and lifecycle management live in pages/campaign and components/campaign.
- Supporting UI includes campaign cards, filters, stats, lists, and modals for cancel, delete, and extend-duration actions.
- The campaign area appears to be the main object that connects discovery, applications, and collaboration.
6. Collaboration and deliverables subsystem
- Collaboration pages manage the execution phase after a campaign/request is accepted.
- pages/collaboration includes overview, tasks, deliverables, detail views, and board/list presentations.
- Modals like agreement, cancellation summary, and payout confirmation indicate a workflow with contract, task tracking, and settlement steps.
7. Messaging and realtime activity
- Chat is a distinct subsystem with its own layout, message bubble, and forward modal components.
- src/context/SocketContext.jsx, redux/slices/chatSlice.js, presenceSlice.js, and notificationSlice.js imply realtime socket-driven updates for messaging, presence, and alerts.
- MessagesPage.jsx is the route-level entry point for this interaction layer.
8. Payments and financial workflow
- Payment-related UI is isolated under components/payment and pages/payments.
- StripeProvider, CheckoutForm, and PaymentModal indicate Stripe-backed checkout/payment handling.
- The payment area likely supports campaign funding, payouts, or subscription/settings flows rather than generic e-commerce.
9. Data and state architecture
- Global application state is managed with Redux in src/redux/store.js.
- Slices are domain-based: auth, user, profiles, campaigns, chat, collaboration, explore, notifications, presence.
- This suggests page components fetch/dispatch through feature services and then render from Redux state rather than keeping everything local.
10. Service boundary and backend integration
- All backend interaction is funneled through src/services, with separate modules for API wiring, endpoints, campaigns, chat, collaboration, notifications, payments, profiles, activity, and AI.
- api.js and endpoints.js act as the shared transport/config layer, while domain services encapsulate feature-specific calls.
- aiService.js and components under components/ai suggest AI-assisted campaign/influencer selection as a distinct capability.
11. Shared application scaffolding
- DashboardLayout, Navbar, Sidebar, LandingNavbar, NotificationPanel, and ProfileDropdown provide the app shell and navigation.
- Common UI utilities such as buttons, modals, banners, cards, loading states, and verification badges are reused across domains to keep the interface consistent.
- ErrorBoundary and LoadingFallback show the app is designed to handle route/component failures and async loading states centrally.
12. Styling and runtime
- The frontend uses Tailwind CSS (tailwind.config.js) alongside src/index.css.
- It is a browser-delivered React SPA, with public/index.html and CRA build/start scripts defining the runtime/deployment model.
- The architecture is client-heavy: pages orchestrate state and services, while domain components handle presentation and interaction.
Main entry points: CollaborationsPage.jsx Collaborations · api.js API client · store.js Store · AppRoutes.jsx Routes
Components 27
Core app
Application bootstrap, routing, and shared shell.
- App · Top-level React entry that composes the application shell.
src/App.js - Routes · Main route registry for public and protected screens.
src/routes/AppRoutes.jsx - Public gate · Allows unauthenticated access to public pages.
src/routes/PublicRoute.jsx - Protected gate · Blocks app areas behind authentication.
src/routes/ProtectedRoute.jsx - Dashboard shell · Shared authenticated layout with nav, sidebar, and notifications.
src/components/layout/DashboardLayout.jsx
Public access
Marketing and authentication entry points.
Brand flow
Brand-side dashboards, search, and campaign management.
- Search influencers · Brand discovery view for finding and filtering creators.
src/pages/brand/SearchInfluencers.jsx - My requests · Brand request inbox and response management.
src/pages/brand/MyRequests.jsx - Create campaign · Campaign creation and setup workflow.
src/pages/campaign/CreateCampaign.jsx - Campaign hub · Campaign overview and lifecycle management screen.
src/pages/campaign/CampaignHub.jsx - Brand dashboard · Brand-side overview of campaign and marketplace activity.
src/pages/dashboard/BrandDashboard.jsx
Influencer flow
Influencer-side views and request handling.
- Influencer dashboard · Influencer-side overview of requests and collaborations.
src/pages/dashboard/InfluencerDashboard.jsx - Requests · Influencer request list and action center.
src/pages/influencer/InfluencerRequests.jsx
Operations
Collaboration, chat, payments, state, and backend integration.
- Collaborations · Entry point for active collaboration workspaces.
src/pages/collaboration/CollaborationsPage.jsx - Deliverables · Deliverable tracking and board/list views.
src/pages/collaboration/DeliverablesPage.jsx - Messages · Route-level entry for chat and realtime messaging.
src/pages/MessagesPage.jsx - Payments · Payment settings and financial workflow screen.
src/pages/payments/PaymentsDashboard.jsx - Store · Global application state container.
src/redux/store.js - Campaign state · Campaign domain state and actions.
src/redux/slices/campaignSlice.js - Chat state · Messaging state and conversation updates.
src/redux/slices/chatSlice.js - Socket context · Socket-backed realtime connection for chat, presence, and alerts.
src/context/SocketContext.jsx - API client · Shared HTTP wiring and backend configuration.
src/services/api.js - Campaign API · Backend calls for campaigns and lifecycle actions.
src/services/campaignService.js - Chat API · Backend calls for messaging and chat history.
src/services/chatService.js - Collab API · Backend calls for collaboration workflows and deliverables.
src/services/collaborationService.js - Payment API · Backend calls for checkout, payouts, and payment settings.
src/services/paymentService.js
Connections 28
- App → Routes: mounts · App boots the route tree.
- Routes → Public gate: public · Public paths are wrapped by the public route gate.
- Routes → Protected gate: protected · Authenticated paths are wrapped by the protected gate.
- Public gate → Landing: exposes · Public gate serves marketing pages.
- Public gate → Login: exposes · Public gate serves auth entry screens.
- Protected gate → Dashboard shell: wraps · Protected areas share the authenticated dashboard shell.
- Dashboard shell → Brand dashboard: renders · Brand dashboard is a primary dashboard view.
- Dashboard shell → Influencer dashboard: renders · Influencer dashboard is a primary dashboard view.
- Brand dashboard → Search influencers: links · Brand dashboard leads into creator discovery.
- Search influencers → My requests: feeds · Search and discovery connect to request management.
- Search influencers → Create campaign: starts · Discovery can lead into campaign creation.
- Create campaign → Campaign hub: promotes · Created campaigns flow into the campaign hub.
- Influencer dashboard → Requests: links · Influencer dashboard exposes inbound requests.
- Requests → Collaborations: accepts · Accepted requests become active collaborations.
- Collaborations → Deliverables: tracks · Collaborations branch into deliverable execution.
- Collaborations → Messages: coordinates · Collaboration work is supported by chat.
- Messages → Socket context: uses · Messaging relies on realtime socket state.
- Store → Campaign state: contains · Campaign state is part of the global store.
- Store → Chat state: contains · Chat state is part of the global store.
- Store → Socket context: integrates · Store works alongside realtime context updates.
- Campaign hub → Campaign API: calls · Campaign screens use the campaign service layer.
- Messages → Chat API: calls · Chat screen uses the chat service layer.
- Collaborations → Collab API: calls · Collaboration screens use collaboration services.
- Payments → Payment API: calls · Payment screens use the payment service layer.
- Campaign API → API client: through · Domain services use the shared API client.
- Chat API → API client: through · Domain services use the shared API client.
- Collab API → API client: through · Domain services use the shared API client.
- Payment API → API client: through · Domain services use the shared API client.