How mayconcoutinho/g2 works
G2 is a React news site: readers browse news by category or general feed, open an article, and view the live section; administrators log in to add, edit, or delete news and update live video/chat. Firebase is the documented data backend. The graph covers the routes and data-fetching flow shown in excerpts and the admin capabilities stated in the README; admin subcomponents and live display implementations are represented at their exact tree paths, but their internal calls were not sampled.
Main entry points: Routes.jsx Page routing · FireBase/index.jsx Firebase operations · AdminPage/index.jsx Admin workspace · Geral/index.jsx News feed cards
Components 21
Application shell
- App and provider
src/App.js - Page routing
src/routes/Routes.jsx - Navigation helpers
src/routes/coordinator.jsx
Reader experience
- Home page
src/pages/HomePage/index.jsx - Category page
src/pages/NavPage/index.jsx - Article page
src/pages/NewsPage/index.jsx - News feed cards
src/Components/Cards/Geral/index.jsx - General feed
src/Components/Cards/Geral/TodosGenero/index.jsx - Category feed
src/Components/Cards/Geral/GeneroNoticia/index.jsx - Live section
src/Components/Cards/AoVivo/index.jsx
Administration
- Admin login
src/pages/LoginPage/index.jsx - Credential check
src/hooks/token/index.jsx - Admin workspace
src/pages/AdminPage/index.jsx - Add news
src/Components/Admin/AdicionarPost/index.jsx - Edit news
src/Components/Admin/Editar/index.jsx - Delete news
src/Components/Admin/Excluir/index.jsx - Edit live content
src/Components/Admin/AoVivo/index.jsx
Data and access
- Shared data context
src/global/context/useContext.js - Firebase operations
src/services/FireBase/index.jsx - Firestore
Other components
- Reader
Connections 29
- Reader → Page routing: opens pages
src/routes/Routes.jsx - Page routing → Home page: routes to
src/routes/Routes.jsx - Page routing → Category page: routes to
src/routes/Routes.jsx - Page routing → Article page: routes to
src/routes/Routes.jsx - App and provider → Page routing: renders
src/App.js - App and provider → Shared data context: provides state
src/App.js - Shared data context → Firebase operations: fetches news and live data
src/global/context/useContext.js - Firebase operations → Firestore: reads and writes
src/services/FireBase/index.jsx - Home page → News feed cards: renders feed
- Category page → News feed cards: renders feed
- News feed cards → General feed: renders
src/Components/Cards/Geral/index.jsx - News feed cards → Category feed: renders
src/Components/Cards/Geral/index.jsx - News feed cards → Live section: renders
src/Components/Cards/index.jsx - General feed → Article page: opens article
src/Components/Cards/Geral/TodosGenero/index.jsx - Category feed → Article page: opens article
src/Components/Cards/Geral/GeneroNoticia/index.jsx - Article page → Shared data context: reads article data
src/pages/NewsPage/index.jsx - Page routing → Admin login: routes to
src/routes/Routes.jsx - Page routing → Admin workspace: routes to
src/routes/Routes.jsx - Admin login → Credential check: checks credentials
src/pages/LoginPage/index.jsx - Credential check → Firebase operations: loads admin credentials
src/hooks/token/index.jsx - Admin workspace → Shared data context: uses shared state
src/pages/AdminPage/index.jsx - Admin workspace → Add news: offers publishing
- Admin workspace → Edit news: offers editing
- Admin workspace → Delete news: offers deletion
- Admin workspace → Edit live content: offers live updates
- Add news → Firebase operations: creates news
src/Components/Admin/AdicionarPost/index.jsx - Edit news → Firebase operations: updates news
src/Components/Admin/Editar/index.jsx - Delete news → Firebase operations: deletes news
- Edit live content → Firebase operations: updates live data
src/Components/Admin/AoVivo/index.jsx