A React-based dashboard that lets users search, save, tag, and manage random contacts using the RandomUser API. The app also features dark mode, local storage persistence, and filtering capabilities. It is also a PWA (Progressive Web App), allowing installation on supported devices.
- Search for random users by name or location.
- Filter users by gender or nationality before fetching new users.
- Powered by randomuser.me API.
- Save contacts with a single click.
- Contacts are stored in your browser’s localStorage.
- Access saved contacts in the “My Contacts” section.
- Assign tags like Friend, Colleague, or Important.
- Filter contacts by:
- Tag
- Gender
- Country
- Name
- Delete individual contacts.
- Option to clear all saved contacts with a confirmation dialog in the “Settings” section.
- Toggle between Light and Dark theme.
- Theme is saved in localStorage and restored on reload.
- Works as a Progressive Web App (PWA).
- Can be installed to home screen on mobile for native-like experience.
src/
├── components/ # Reusable components
├── pages/ # Top-level views: Search, MyContacts, Settings
├── hooks/ # Custom React hooks like useLocalStorage
├── utils/ # Helper functions (getFormattedPhone, delUniqueContact, etc.)
├── App.jsx # Root component with routes/tabs
└── main.jsx # React entry point
- React
- Bootstrap 5
- Vite
- LocalStorage API
- Native HTML
<dialog>and Popover API - Custom Hooks & Utility Functions
-
Clone this repo
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
-
Navigate to project
cd YOUR_REPO_NAME -
Install dependencies
npm install
-
Run locally
npm run dev
-
Open http://localhost:5173 in your browser.
export default defineConfig({
base: "/YOUR_REPO_NAME/", // ← required for GitHub Pages
...
});npm run build
npx gh-pages -d distMake sure gh-pages is installed:
npm install --save-dev gh-pagesAlso add this to your package.json:
"homepage": "https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
}Once deployed, your app will be live at:
https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/
| Search Tab | My Contacts Tab | Settings Tab |
|---|---|---|
![]() |
![]() |
![]() |
This project helped practice:
- React fundamentals:
useState,useEffect,props,ref - Custom hooks
- LocalStorage usage
- Bootstrap 5 usage in React
- Working with Fetch API
- Conditional rendering and filtering
- Modular project structure


