This is a Full Stack E-Commerce Website built with Next.js 15, Tailwind CSS, Firebase, Stripe, Rsend, and Algolia.
Click the image below to watch the demo video:
Clone the repository:
git clone <repository-url>
Navigate to the project directory:
cd <project-directory>
Install the dependencies:
npm install
Create a .env.local
file in the root directory and add the following:
NEXT_PUBLIC_FIREBASE_API_KEY=""
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=""
NEXT_PUBLIC_FIREBASE_PROJECT_ID=""
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=""
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=""
NEXT_PUBLIC_FIREBASE_APP_ID=""
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=""
NEXT_PUBLIC_DOMAIN=""
NEXT_PUBLIC_RESEND_API_KEY=""
NEXT_PUBLIC_ALGOLIA_APP_ID=""
NEXT_PUBLIC_ALGOLIA_APP_KEY=""
NEXT_PUBLIC_FIREBASE_SERVICE_ACCOUNT_KEYS='{}'
Start the development server:
npm run dev
service cloud.firestore {
match /databases/{database}/documents {
function isAdmin() {
return exists(/databases/$(database)/documents/admins/$(request.auth.token.email));
}
match /{document=**}/reviews/{reviewId} {
allow read: if isAdmin();
}
match /admins/{id} {
allow read: if true;
allow write: if isAdmin();
}
match /brands/{id} {
allow read: if true;
allow write: if isAdmin();
}
match /categories/{id} {
allow read: if true;
allow write: if isAdmin();
}
match /collections/{id} {
allow read: if true;
allow write: if isAdmin();
}
match /orders/{id} {
allow read: if isAdmin() || request.auth.uid == resource.data.uid;
allow write: if isAdmin();
}
match /products/{id} {
allow read: if true;
allow write: if isAdmin();
match /reviews/{uid} {
allow read: if true;
allow write: if isAdmin() || request.auth.uid == uid;
}
}
match /users/{uid} {
allow read: if isAdmin() || request.auth.uid == uid;
allow write: if isAdmin() || request.auth.uid == uid;
match /checkout_sessions/{id} {
allow read: if isAdmin() || request.auth.uid == uid;
allow write: if isAdmin() || request.auth.uid == uid;
}
match /checkout_sessions_cod/{id} {
allow read: if isAdmin() || request.auth.uid == uid;
allow write: if isAdmin() || request.auth.uid == uid;
}
match /payments/{id} {
allow read, write: if false;
}
}
}
}
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read: if true;
allow write: if request.auth.uid != null && firestore.exists(/databases/(default)/documents/admins/$(request.auth.token.email));
}
}
}
You can explore the demo of the e-commerce website at this link.
To access the Admin Panel, Contact Us.
Snapify/
ā
š¦ app/
āāā layout.js # Main app layout (Next.js App Router)
āāā (auth)/ # Auth Module (Login, Signup, Reset Password)
ā āāā layout.jsx
ā āāā login/page.jsx
ā āāā sign-up/page.jsx
ā āāā forget-password/page.jsx
āāā (checkout)/ # Checkout Flow (Stripe & Firestore)
ā āāā checkout-cod/page.jsx
ā āāā checkout-failed/page.jsx
ā āāā checkout-success/page.jsx
ā āāā checkout-success/components/SuccessMessage.jsx
āāā (pages)/ # Product Browsing & Search (Algolia)
ā āāā search/page.jsx
ā āāā search/components/SearchBox.jsx
ā āāā brands/[brandId]/page.jsx
ā āāā categories/[categoryId]/page.jsx
ā āāā collections/[collectionId]/page.jsx
ā āāā products/[productId]/page.jsx
āāā (user)/ # User Area (Account, Cart, Favorites)
ā āāā layout.jsx
ā āāā account/page.jsx
ā āāā cart/page.jsx
ā āāā favorites/page.jsx
ā āāā checkout/
ā āāā layout.jsx
ā āāā page.jsx
ā āāā components/Checkout.jsx
āāā admin/ # Admin Management Panel
ā āāā layout.jsx
ā āāā page.jsx
ā āāā customers/, products/, orders/, brands/, categories/, collections/, reviews/, admins/
ā ā āāā page.jsx
ā ā āāā form/page.jsx (if applicable)
ā ā āāā components/
ā ā ā āāā ListView.jsx
ā ā ā āāā Form.jsx / ChangeStatus.jsx
ā āāā components/
ā āāā AdminLayout.jsx
ā āāā Header.jsx
ā āāā Sidebar.jsx
ā āāā CountMeter.jsx
ā āāā OrdersChart.jsx
ā āāā RevenueChart.jsx
āāā about-us/page.jsx # Static & Info Pages
āāā contact-us/page.jsx
āāā faq/page.jsx
āāā privacy/page.jsx
š¦ app/api/
āāā contact/route.js # Edge API - Contact Form
š¦ components/
āāā ui/ # Design System UI Components
āāā badge.jsx
āāā button.jsx
āāā card.jsx
āāā skeleton.jsx
āāā AddToCartButton.jsx, Header.jsx, Footer.jsx, etc.
š¦ contexts/
āāā AuthContext.jsx # Global Auth Context Provider
š¦ lib/
āāā firebase.jsx # Firebase Client SDK
āāā firebase_admin.jsx # Firebase Admin SDK
āāā utils.js # Common Utility Functions
āāā firestore/ # Firestore Access Layer (BaaS)
āāā user/, products/, orders/, checkout/
āāā brands/, categories/, collections/, reviews/, admins/
š next.config.mjs # Next.js Configuration
š tailwind.config.mjs # Tailwind CSS Config
š jsconfig.json # Path Aliases
This project provides a robust e-commerce solution leveraging modern technologies. Feel free to customize and extend its functionality as needed.