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.
- Node Version: 18.x or higher
- Commands:
npm install- Install dependenciesnpm run dev- Start development server (default port 3000)npm run build- Build for productionnpm run start- Start production servernpm test- Run unit testsnpm run lint- Run ESLint for code quality checks
- Corrected grid layout:
grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 - Improved card design with better spacing, hover effects, and white background for contrast
- Fully responsive across desktop, tablet, and mobile
- Implemented sticky navigation bar at the top
- Clean, responsive design with basic links
- Lazy loading for images using Next.js Image component
- React.memo for WorkerCard to prevent unnecessary re-renders
- Skeleton loading screens during data fetch
- Memoization for filtered data
- Pagination with 9 items per page
- Previous/Next buttons and page number buttons
- Seamless integration with filters
- Filter by service type (dropdown from API)
- Filter by price range (min/max inputs)
- Filters applied before pagination
- Data served via
/api/workersand/api/servicesroutes - Loading states with skeleton cards
- Error handling with retry button
- Basic caching/memoization
- Tests for WorkerCard and Pagination components using Jest and @testing-library/react
- Run tests with
npm test
- Replaced direct import with API fetch
- Fixed grid classes and background colors
- Ensured clean, maintainable TypeScript code
- 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").
- Fork the repo and work from a branch named: assignment/ (for example: assignment/adarsh-maurya).
- Implement improvements and features that demonstrate your mastery of the job requirements (UI polish, responsiveness, Tailwind usage, tests, accessibility, performance).
- Push your branch to GitHub, add a clear README, and (strongly recommended) deploy the app (Vercel/Netlify/GH Pages)
- Fill in the Google Form with your details for submission.
- 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.
- 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.
Good luck 🚀