md
UI for the ecommerce products
- Modern UI: Built with React, Next.js and Tailwind CSS for a responsive and visually appealing user interface.
- Component-Based Architecture: Uses reusable React components for maintainability and scalability.
- Tailwind CSS Styling: Utilizes Tailwind CSS for rapid styling and customization.
- Optimized Performance: Leverages Next.js for server-side rendering and optimized performance.
Before you begin, ensure you should have the following installed:
- Node.js: Version 18 or higher. You can download it from nodejs.org.
- npm: Usually comes with Node.js. You can check its version with
npm -v. - Git: For version control. You can download it from git-scm.com.
Follow these steps to get the project up and running:
-
Clone the repository:
git clone https://github.com/pankajkoree/ecommerce-frontend.git cd ecommerce-frontend -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Run the development server:
npm run dev # or yarn dev # or pnpm dev
This will start the Next.js development server. You can then view the application in your browser at
http://localhost:3000.
This project focuses on the front-end UI and does not include a backend API. The UI is designed to consume data from an external API. You can replace the placeholder data with your own API endpoints.
Example Component Usage (simplified):
// Example usage in a page component
import React from 'react';
const HomePage = () => {
return (
<div>
<h1>Welcome to the Ecommerce Store</h1>
{/* Product Listing Component (example) */}
{/* <ProductList products={productsData} /> */}
</div>
);
};
export default HomePage;The project can be configured using environment variables. Create a .env.local file in the root directory to override the default settings. Here are some configurable options:
- API_ENDPOINT: The URL of your backend API. (Example:
API_ENDPOINT=https://your-api.com/products)
You can access these environment variables in your Next.js code using process.env.VARIABLE_NAME.
We welcome contributions to the project! Here's how you can contribute:
-
Fork the repository: Click the "Fork" button on the GitHub page.
-
Clone your fork:
git clone https://github.com/<your-username>/ecommerce-frontend.git cd ecommerce-frontend
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes: Implement your feature or bug fix.
-
Commit your changes:
git add . git commit -m "Add: Your descriptive commit message"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a pull request: Go to the original repository on GitHub and click the "Create Pull Request" button.
This project utilizes several open-source libraries and frameworks, including:
- React
- Next.js
- TypeScript
- Tailwind CSS
- Lucide React
- Radix UI
- DummyJSON