How ahmedmohamed17/blog-frontend works
This is a React front end for a post-publishing application. Users browse posts, filter by category or author, and open post details; signed-in users can create and manage posts and edit their profiles. The router connects these screens, while shared components render post lists and author details. API calls and asset URLs indicate a separate backend and asset host. The excerpts show several API interactions; for other modules, relationships are limited to routing or references listed in the source index.
Main entry points: index.js Route entry · usercontext.js User session state · Dashboard.jsx My posts · DeletePost.jsx Delete post
Components 26
App navigation
- Route entry
src/index.js - Page layout
src/components/Layout.jsx - Navigation header
src/components/Header.jsx - Footer
src/components/Footer.jsx - Error screen
src/pages/ErrorPage.jsx - Loading indicator
src/components/loader.jsx
Post discovery
- Home page
src/pages/Home.jsx - Post feed
src/components/Posts.jsx - Post card
src/components/PostItem.jsx - Post author detail
src/components/PostAuthor.jsx - Author directory
src/pages/Authors.jsx - Author posts
src/pages/AuthorPosts.jsx - Category posts
src/pages/CategoryPosts.jsx - Post detail
src/pages/PostDetail.jsx
Post management
- Create post
src/pages/CreatePost.jsx - My posts
src/pages/Dashboard.jsx - Edit post
src/pages/EditPost.jsx - Delete post
src/pages/DeletePost.jsx
Accounts
- Registration
src/pages/Register.jsx - Login
src/pages/Login.jsx - Logout
src/pages/Logout.jsx - User profile
src/pages/UserProfile.jsx - User session state
src/Context/usercontext.js
Other components
- Visitor
- Backend API
- Asset host
Connections 48
- Visitor → Route entry: opens app
src/index.js - Route entry → Page layout: mounts routes
src/index.js - Route entry → Home page: routes to
src/index.js - Route entry → Post detail: routes to
src/index.js - Route entry → Registration: routes to
src/index.js - Route entry → Login: routes to
src/index.js - Route entry → User profile: routes to
src/index.js - Route entry → Author directory: routes to
src/index.js - Route entry → Create post: routes to
src/index.js - Route entry → Category posts: routes to
src/index.js - Route entry → Author posts: routes to
src/index.js - Route entry → My posts: routes to
src/index.js - Route entry → Edit post: routes to
src/index.js - Route entry → Delete post: routes to
src/index.js - Route entry → Logout: routes to
src/index.js - Route entry → Error screen: error route
src/index.js - Page layout → Navigation header: renders
src/components/Layout.jsx - Page layout → Footer: renders
src/components/Layout.jsx - Navigation header → User session state: reads session
src/components/Header.jsx - Home page → Post feed: renders
src/pages/Home.jsx - Post feed → Backend API: fetches posts
src/components/Posts.jsx - Post feed → Post card: renders cards
src/components/Posts.jsx - Post card → Post author detail: renders author
src/components/PostItem.jsx - Post author detail → Backend API: fetches author
src/components/PostAuthor.jsx - Author directory → Backend API: fetches authors
src/pages/Authors.jsx - Author posts → Backend API: fetches posts
src/pages/AuthorPosts.jsx - Author posts → Post card: renders cards
src/pages/AuthorPosts.jsx - Category posts → Post card: renders cards
src/pages/CategoryPosts.jsx - Create post → User session state: reads session
src/pages/CreatePost.jsx - Create post → Backend API: submits post
src/pages/CreatePost.jsx - My posts → User session state: reads session
src/pages/Dashboard.jsx - My posts → Backend API: fetches posts
src/pages/Dashboard.jsx - My posts → Delete post: offers deletion
src/pages/Dashboard.jsx - Edit post → User session state: reads session
src/pages/EditPost.jsx - Edit post → Backend API: updates post
src/pages/EditPost.jsx - Delete post → User session state: reads session
src/pages/DeletePost.jsx - Delete post → Backend API: deletes post
src/pages/DeletePost.jsx - Post detail → Post author detail: renders author
src/pages/PostDetail.jsx - Post detail → Delete post: offers deletion
src/pages/PostDetail.jsx - Post detail → Backend API: loads post
src/pages/PostDetail.jsx - Login → User session state: sets session
src/pages/Login.jsx - Logout → User session state: clears session
src/pages/Logout.jsx - User profile → User session state: reads session
src/pages/UserProfile.jsx - User profile → Backend API: updates account
src/pages/UserProfile.jsx - Post feed → Loading indicator: shows while loading
src/components/Posts.jsx - Author posts → Loading indicator: shows while loading
src/pages/AuthorPosts.jsx - Author directory → Loading indicator: shows while loading
src/pages/Authors.jsx - My posts → Loading indicator: shows while loading
src/pages/Dashboard.jsx