Welcome to the React Role-Based Post Management System! This is a modern, responsive, and interactive front-end project built using React JS and CSS. The application allows users to explore posts and admins to create and manage their own posts using localStorage, with authentication and role-based access built in. 🎯
🔗 Link to Live Demo: Live Demo
- ⚛️ React JS (Create React App)
- 🎨 CSS
- 📦 localStorage for data persistence
- 🌐 JSONPlaceholder API (https://jsonplaceholder.typicode.com)
- 🔐 Custom Role-based Authentication
- Login with:
- Username
- Mobile number
- OTP (Random 4-digit)
- Select role:
AdminorUser
- Stores auth data in localStorage
- Role-based access (Admin vs User)
-
Created Posts (By Admin):
- Posts created by admin stored in
localStorage - Editable & Deletable (only for Admins)
- Clickable post cards for details view
- Posts created by admin stored in
-
Explore Posts (Fetched from API):
- First 10 posts from
JSONPlaceholder - Non-clickable cards with fallback image
- Real-time Search/Filter by Title
- First 10 posts from
- Accessible only to
Admin - Form to create new post with:
- Title
- Description
- Image URL
- Random
postIdgeneration - Saves post data to
localStorage
- Shows full post details
- Edit and Delete options for Admin
- Modal popup for editing post
- All created posts are stored in
localStorage - Posts persist even after logout
- JSON methods
JSON.stringify()andJSON.parse()used
- Common
Headerwith:- Project Logo (top-left)
- Navigation tabs (Home, Create Post)
- Logout button (top-right)
- Clicking logout opens a confirmation modal with:
LogoutCancel
Made with ❤️ by Milan Koradiya
GitHub Profile
This project is licensed under the MIT License.