How edwardosamosir/cnbc-news-portal-clone-reactjs works
This repository is a news publishing system: administrators manage accounts, posts, categories, and tags, while readers browse news and open article details. The backend provides authentication and content endpoints backed by Sequelize models. The sampled sources confirm app mounting and backend middleware, but do not show the route-to-controller or frontend-to-API calls; those links are therefore omitted. Frontend page and state responsibilities are inferred from the file tree.
Main entry points: src/App.jsx Reader app · src/App.jsx Admin app · index.js API routes · authentication.js Authentication
Components 20
Reader experience
- Reader app
client-user/src/App.jsx - News pages
client-user/src/views - News display
client-user/src/components - Reader routing
client-user/src/router/index.jsx - Reader state
client-user/src/store
Content administration
- Admin app
client-admin/src/App.jsx - Management pages
client-admin/src/views - Admin components
client-admin/src/components - Admin routing
client-admin/src/router/index.jsx - Admin state
client-admin/src/store
API and content
- HTTP server
server/app.js - API routes
server/routes/index.js - Authentication
server/middleware/authentication.js - Content handlers
server/controllers/index.js - Error responses
server/middleware/errorHandler.js - Content models
server/models - Application database
server/models/index.js - JWT helper
server/helpers/jwt-encode-decode.js
Other components
- News reader
- Administrator
Connections 13
- News reader → Reader app: uses
- Reader app → Reader routing: renders routes
- Reader app → Reader state: provides state
- Administrator → Admin app: uses
- Admin app → Admin routing: renders routes
- Admin app → Admin state: provides state
- HTTP server → API routes: mounts routes
- API routes → Authentication: applies middleware
- API routes → Error responses: registers handler
- Authentication → JWT helper: decodes token
- Authentication → Content models: looks up user
- Content handlers → Content models: queries and updates
- Content models → Application database: initializes