This is a modern eCommerce application built with Next.js, leveraging server-side rendering and dynamic imports for optimal performance.
- Dynamic Product Listings: Fetch and display products dynamically from Firestore.
- Animated UI: Smooth animations using Framer Motion.
- Responsive Design: Fully responsive design for all devices.
- Customer Reviews: Display customer reviews.
- Brand Showcases: Highlight different brands.
- Collections and Categories: Organized product collections and categories.
First, clone the repository:
git clone https://github.com/yourusername/ecommerce.git
cd ecommerce
Install the dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
Create a .env.local
file in the root of your project and add the following environment variables:
NEXT_PUBLIC_DOMAIN=yourdomain.com
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
FIREBASE_APP_ID=your_firebase_app_id
app/page.js
: Main page of the application.components/
: Contains all the React components used in the application.lib/firestore/
: Firestore utility functions for fetching data.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.
This project is licensed under the MIT License.