Welcome to the HO5 Task! This is a hands-on challenge designed to help junior developers understand Next.js fundamentals, including app routing, slug-based routing, and frontend development best practices.
Before starting the project, please watch the Next.js Crash Course Video to understand the basics. This will help you:
- Understand Next.js fundamentals
- Learn about app routing
- Get familiar with the project structure
- Note: You can skip from 12:00 if you're not familiar with backend concepts
This is a learning challenge where you'll build a modern e-commerce website using Next.js. The project focuses on:
- Next.js app routing and slug-based routing
- Frontend development skills
- Clean code practices
- Figma design implementation
- Cloudinary integration for static assets (Bonus Points! 🎁)
- Using Next.js Image component for optimized images (Required)
- Figma Design Link
- Design includes both mobile and desktop layouts
- Two main pages to implement:
- Home page
- Product detail page
- Node.js (Latest LTS version)
- Package manager (npm or Yarn - Yarn usage gets bonus points! 🎁)
- Git
- A code editor (VS Code recommended)
- Clone the repository:
git clone https://github.com/ayussh-2/h05-task.git
cd h05-task
- Install dependencies:
# Using npm
npm install
# OR using Yarn (Bonus Points! 🎁)
yarn install
- Start the development server:
# Using npm
npm run dev
# OR using Yarn (Bonus Points! 🎁)
yarn dev
- Open http://localhost:3000 in your browser
- Next.js Official Documentation
- Next.js Images and Fonts Documentation
- Next.js Crash Course Video
- Note: You can skip from 12:00 if you're not familiar with backend concepts
- Use Cloudinary for image optimization (Bonus Points! 🎁)
- Follow Next.js 14+ app directory structure
- Use Next.js Image component for all images (Required)
- Create reusable components in
components/
directory - Break down large components into smaller, focused ones
- Group related components in subdirectories (e.g.,
components/ui/
,components/layout/
) - Use atomic design principles where applicable
- Extract common logic into custom hooks in
hooks/
directory - Create utility functions in
utils/
directory - Implement shared styles in
styles/
directory
- Keep components small and focused on a single responsibility
- Implement proper prop typing for all components
- Create shared constants in
/config/constants/[page-name]/index.js
directory - Use proper naming conventions for files and components
src/
├── app/ # Next.js app directory
├── components/ # Reusable components
│ ├── ui/ # Basic UI components
│ ├── layout/ # Layout components
│ └── features/ # Feature-specific components
├── hooks/ # Custom React hooks
├── utils/ # Utility functions
├── styles/ # Shared styles
└── config/constants/ # Configuration files and constants
Use the following prefixes in your commit messages to maintain a clear and meaningful commit history:
feat:
- A new featurefix:
- A bug fixdocs:
- Documentation changesstyle:
- Code style changes (formatting, missing semi colons, etc)refactor:
- Code changes that neither fix bugs nor add featuresperf:
- Performance improvementstest:
- Adding or modifying testschore:
- Changes to build process, tools, or dependenciesci:
- Changes to CI configuration files and scripts
git commit -m "feat: add product search functionality"
git commit -m "fix: resolve image loading issue on mobile"
git commit -m "docs: update README with new setup instructions"
git commit -m "style: format code according to style guide"
git commit -m "refactor: simplify product card component"
git commit -m "chore: update dependencies to latest versions"
- Fork the repository
- Create a new branch:
git checkout -b feature/your-name
- Make your changes and commit them:
git add .
git commit -m "Add your feature"
- Push to your fork:
git push origin feature/your-name
- Create a Pull Request:
- Go to the original repository
- Click "New Pull Request"
- Select your branch
- Fill in the PR description with:
- What you've implemented
- Screenshots of your work
- Any challenges faced
- What you learned
Your PR will be evaluated based on:
- Code quality and cleanliness
- Implementation of the design
- Responsive design implementation
- Performance optimization
- Best practices followed
- Use of Next.js Image component (Required)
- Use of Yarn (Bonus Points! 🎁)
- Implementation of Cloudinary (Bonus Points! 🎁)
- Learn Next.js fundamentals
- Understand modern frontend development
- Practice implementing designs from Figma
- Learn about image optimization with Next.js Image component
- Learn about image optimization with Cloudinary (Bonus Points! 🎁)
- Develop clean code habits
- Make sure to test your implementation on both mobile and desktop
- Follow the design specifications closely
- Use semantic HTML and proper accessibility practices
- Use Next.js Image component for all images (Required)
- Consider using Yarn for package management (Bonus Points! 🎁)
- Consider using Cloudinary for image optimization (Bonus Points! 🎁)
- Check the Next.js documentation
- Review the provided video tutorial
- Ping Me!
- Look for similar issues on stackoverflow!
- Remember: The more you make bugs the more you learn!
Happy Coding! 🚀