How naveenpy2001/blog_p works
This repository implements a social blogging application: users register or log in, browse and filter posts, open post details, and create posts or interact with them through likes and comments. The React client handles routing, authentication state, and API requests; a Django REST backend exposes user and post operations over HTTP and represents users, posts, likes, and comments as models. The README provides no architecture detail, and some frontend pages and backend routes were not excerpted, so those connections are limited to indexed references or marked unverified.
Main entry points: App.jsx App router · api.js API client · AuthContext.jsx Auth state · views.py API operations
Components 18
Web client
- App router
blog/src/App.jsx - Navigation
blog/src/components/Navbar.jsx - API client
blog/src/services/api.js
Identity and profiles
- Auth state
blog/src/contexts/AuthContext.jsx - Login
blog/src/pages/Login.jsx - Registration
blog/src/pages/Register.jsx - Profile
blog/src/pages/Profile.jsx
Posts and interactions
- Post feed
blog/src/pages/Home.jsx - Search and filters
blog/src/components/SearchBar.jsx - Post card
blog/src/components/PostCard.jsx - Post detail
blog/src/pages/PostDetail.jsx - Create post
blog/src/pages/CreatePost.jsx
REST backend
- API routing
backend/api/urls.py - API operations
backend/api/views.py - Validation and serialization
backend/api/serializers.py - Access rules
backend/api/permissions.py - User and post models
backend/api/models.py
Other components
- Reader / author
Connections 26
- Reader / author → App router: uses
blog/src/App.jsx - App router → Post feed: routes to
blog/src/App.jsx - App router → Login: routes to
blog/src/App.jsx - App router → Registration: routes to
blog/src/App.jsx - App router → Profile: routes to
blog/src/App.jsx - App router → Create post: routes to
blog/src/App.jsx - App router → Post detail: routes to
blog/src/App.jsx - App router → Navigation: renders
blog/src/App.jsx - App router → Auth state: reads auth
blog/src/App.jsx - Post feed → Search and filters: renders
blog/src/pages/Home.jsx - Post feed → Post card: renders
blog/src/pages/Home.jsx - Post feed → API client: fetches posts
blog/src/pages/Home.jsx - Post card → API client: requests actions
blog/src/components/PostCard.jsx - Post detail → API client: requests post data
blog/src/pages/PostDetail.jsx - Create post → API client: submits post
blog/src/pages/CreatePost.jsx - Navigation → Auth state: uses auth
blog/src/components/Navbar.jsx - Login → Auth state: logs in
blog/src/pages/Login.jsx - Registration → Auth state: registers
blog/src/pages/Register.jsx - Profile → Auth state: updates profile
blog/src/pages/Profile.jsx - Auth state → API client: calls
blog/src/contexts/AuthContext.jsx - API client → API operations: HTTP requests
- API routing → API operations: routes to
backend/api/urls.py - API operations → Validation and serialization: validates and serializes
backend/api/views.py - API operations → User and post models: queries and changes
backend/api/views.py - API operations → Access rules: applies
backend/api/views.py - Validation and serialization → User and post models: serializes
backend/api/serializers.py