Code-Spherre Ecommerce Website is a modern full-stack ecommerce platform built using:
- Next.js for frontend development
- Sanity.io as a headless CMS
- Stripe for secure payments
- Tailwind CSS for responsive UI design
This project allows users to browse products, add them to a cart, and securely checkout using Stripe. The backend is powered by Sanity.io, which manages product data and dynamic content.
✅ Product Catalog - Display products fetched from Sanity CMS ✅ Shopping Cart - Add, remove, and update items ✅ Secure Payments - Integrated with Stripe ✅ Admin Dashboard - Manage products and orders (Future Enhancement) ✅ Mobile Responsive - Optimized UI for all devices
git clone https://github.com/CodeSpherreDev/Code-Spherre_Ecommerce_Website.git
cd Code-Spherre_Ecommerce_Websitenpm installCreate a .env.local file and add the following:
NEXT_PUBLIC_SANITY_TOKEN =
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY =
NEXT_PUBLIC_STRIPE_SECRET_KEY = npm run devThe app should now be available at http://localhost:3000
- Fork the Repository
- Create a New Branch (
git checkout -b feature-name) - Make Your Changes
- Commit and Push (
git commit -m "Added new feature" && git push origin feature-name) - Create a Pull Request (PR)
We welcome contributions! Feel free to fix bugs, add features, or improve the UI. 😊
Error: Unable to resolve image URL from source (undefined)
Check that NEXT_PUBLIC_SANITY_PROJECT_ID and NEXT_PUBLIC_SANITY_DATASET are correctly defined in .env.local.
Update the urlFor function to handle undefined values:
import createImageUrlBuilder from '@sanity/image-url';
import { dataset, projectId } from '../env';
const builder = createImageUrlBuilder({ projectId, dataset });
export const urlFor = (source) => {
if (!source) return '';
return builder.image(source).url();
};npm run devIf the issue persists, check that your Sanity database contains valid image data.
For questions or contributions, feel free to reach out via GitHub Issues or email codespherre.official@gmail.com.
Our official website code-spherre.netlify.app
Happy Coding! 🚀