Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
258a873
refactor: split components (Navbar, Filters, WorkerCard, SkeletonCard…
AnuragPatel01 Sep 25, 2025
03f64b9
chore(deps): install lucide-react, clsx, tailwind-merge
AnuragPatel01 Sep 25, 2025
7acd227
feat(ui): add responsive Navbar component with mobile menu
AnuragPatel01 Sep 25, 2025
a363643
feat(ui): add WorkerCard component and integrate into WorkersPage for…
AnuragPatel01 Sep 25, 2025
5959097
feat(ui): add Pagination component and integrate into WorkersPage
AnuragPatel01 Sep 25, 2025
78e2059
feat(ui): add Filters component and integrate into WorkersPage
AnuragPatel01 Sep 25, 2025
58d208b
feat(ui): add SkeletonCard component for loading state
AnuragPatel01 Sep 25, 2025
2c3b428
feat(ui): integrate WorkerCard + Pagination + Filters (responsive)
AnuragPatel01 Sep 25, 2025
15c9b21
chore: prepare WorkerHub for deployment
AnuragPatel01 Sep 25, 2025
021caed
fix(images): bypass next/image optimization for remote avatars (unopt…
AnuragPatel01 Sep 25, 2025
cce7625
Updated Readme
AnuragPatel01 Sep 25, 2025
7fdad21
Project Completed
AnuragPatel01 Sep 25, 2025
a74777f
ReadMe updated
AnuragPatel01 Sep 25, 2025
347c39d
title changed
AnuragPatel01 Sep 25, 2025
0f37b67
Title changed successfully
AnuragPatel01 Sep 25, 2025
b7641e2
small UI tweaks
AnuragPatel01 Sep 25, 2025
fa893b2
Final commit
AnuragPatel01 Sep 25, 2025
389da25
typo corrected in ReadMe
AnuragPatel01 Sep 25, 2025
b595d93
feat: add footer, navbar search, and worker detail modal
AnuragPatel01 Sep 26, 2025
158b589
fix: replace internal <a> with next/link to satisfy Next.js lint
AnuragPatel01 Sep 26, 2025
7b1788b
smooth transition on navbar expansion in phone
AnuragPatel01 Sep 26, 2025
4803e08
pagination ui changed for phone
AnuragPatel01 Sep 26, 2025
1cf00cb
card arranged asthetically
AnuragPatel01 Sep 26, 2025
9a19b9f
changes applied
AnuragPatel01 Sep 26, 2025
2ea6ab1
Instagram logo changed on footer
AnuragPatel01 Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 34 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,51 @@
# Frontend Developer Intern Assignment
# WorkersHub — Frontend Developer Assignment

## Mandatory Tasks
- Follow SolveEase on [Github](https://github.com/solve-ease) and [Linkedin](https://www.linkedin.com/company/solve-ease)
- Star this repo
[Live Demo → workershub.vercel.app](https://workershub.vercel.app/)

## Objective
This assignment is designed to assess your practical skills in **React, Next.js, TypeScript, Tailwind CSS, and frontend optimizations**. You will work on an existing **Next.js application** that contains layout/design issues and some configuration bugs. Your task is to identify and resolve these issues, and implement the listed features to enhance the overall user experience.
A responsive worker directory built with **Next.js**, **TypeScript**, and **Tailwind CSS**.
Allows users to browse, filter, and paginate worker profiles, with loading skeletons, image fallbacks, and detailed worker info modals.

---

## Tasks
## 🚀 Features

### 1. Fix Cards Layout & Responsiveness
- Correct the existing card grid layout.
- Improve the overall card design (UI/UX sensibility expected).
- Ensure the page is fully responsive across devices (desktop, tablet, mobile).

### 2. Add Navbar (Sticky)
- Implement a navigation bar that remains fixed at the top while scrolling.
- Design should be clean and responsive.

### 3. Optimize Page Load & Performance
- Implement optimizations such as:
- **Lazy loading** for images and non-critical components.
- **Memoization** to avoid unnecessary re-renders.
- **Skeleton loading screens** for better UX during data fetch.

### 4. Implement Pagination
- Add pagination for the workers listing page.
- Each page should load a suitable number of items (e.g., 9–12 cards per page).

### 5. Service Filters
- Implement filters for workers based on **price/day** and **type of service**.
- Filters should work seamlessly with pagination.

### 6. Bug Fixes
- Identify and fix any existing issues in `page.tsx` or configuration files.
- Resolve console warnings or errors.
- Ensure clean and maintainable code following best practices.

### 7. API Integration
- Currently, the workers’ data is being imported directly from `workers.json`.
- Your task is to **serve this data via /api/wprkers API route**.
- Update the frontend page to fetch this data using `fetch` (or any modern method such as `useEffect`, `useSWR`, or React Query).
- Donot delete the existing data loading logic, comment it out.
- Implement:
- **Loading state** (use skeleton screens).
- **Error handling** (show a friendly error message if API fails).
- **Basic caching or memoization** to prevent redundant calls.
- **Responsive layout**: 2 / 2 / 4 columns depending on screen size
- **Navbar**: sticky top header with dedicated search bar (search by name or service) + mobile menu
- **Filters**: filter by service category and price range
- **Pagination**: navigate across multiple pages of worker cards
- **Skeleton Cards**: placeholders shown while data loads
- **Image handling**: fallback UI on image load failure, lazy loading
- **Client-side caching**: caches worker data to reduce redundant fetches
- **API route**: `/api/workers` serves `workers.json`
- **Worker Detail Modal**: tap a card to view full profile, rating, availability, and price
- **Footer**: clean company-style footer at the bottom

---

## Expectations
- Use **TypeScript** and **Tailwind CSS** consistently.
- Follow **component-driven development** principles.
- Write **clean, readable, and reusable code**.
- Optimize for **performance and accessibility**.
- Maintain **Git commit history** (no single "final commit").
## 🛠 Tech Stack

- Next.js (App Router)
- TypeScript
- Tailwind CSS
- React + React Hooks
- Lucide Icons
- React Icons

---

## Deliverables
1. Fork the repo and work from a branch named: assignment/<your-full-name> (for example: assignment/adarsh-maurya).
2. Implement improvements and features that demonstrate your mastery of the job requirements (UI polish, responsiveness, Tailwind usage, tests, accessibility, performance).
3. Push your branch to GitHub, add a clear README, and (strongly recommended) deploy the app (Vercel/Netlify/GH Pages)
3. Fill in the Google Form with your details for submission.
## ⚡️ Getting Started

---
```bash
# Install dependencies
npm install

## Evaluation Criteria
- Code quality, readability, and structure.
- UI/UX improvements and responsiveness.
- Correctness of functionality (filters, pagination, sticky navbar, optimisations).
- Debugging and problem-solving approach.
- Git usage and commit practices.
- Handling of API calls, loading states, and error cases.
# Run development server
npm run dev

---
# Build for production
npm run build
npm start

## Notes
- You are free to use libraries like **SWR** or **React Query**, but keep the implementation clean.
- Focus on **real-world production quality code**, not just quick fixes.
- Add comment for any **bug fix or optimization.**
- Document any **extra improvements** you make in your submission.
📦 Deployment

Good luck 🚀
Deployed with Vercel → workershub.vercel.app
43 changes: 42 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@
"lint": "eslint"
},
"dependencies": {
"clsx": "^2.1.1",
"lucide-react": "^0.544.0",
"next": "15.5.4",
"react": "19.1.0",
"react-dom": "19.1.0",
"next": "15.5.4"
"react-icons": "^5.5.0",
"tailwind-merge": "^3.3.1"
},
"devDependencies": {
"typescript": "^5",
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@tailwindcss/postcss": "^4",
"tailwindcss": "^4",
"eslint": "^9",
"eslint-config-next": "15.5.4",
"@eslint/eslintrc": "^3"
"tailwindcss": "^4",
"typescript": "^5"
}
}
Loading