This is a fully dynamic e-commerce application built with Next.js and powered by a Strapi backend. The platform allows users to browse programming courses, add them to their cart, and complete purchases using secure payment methods. The application provides a seamless shopping experience with a modern UI/UX.
The application also uses Context API to manage global state across the application, making it easy to share data like user information, cart details, and orders throughout the app without the need for prop drilling or external state management libraries like Redux.
š Live Application
To run this project locally, follow these steps:
git clone https://github.com/AbdulrahmanHabiba/next-js-ecommerce
cd nextjs-ecommerce
yarn install # or npm install
Create a .env.local
file in the root directory and configure the required keys:
NEXT_PUBLIC_STRAPI_TOKEN=<your_strapi_token>
NEXT_PUBLIC_STRAPI_API_URL=<your_strapi_backend_url>
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your_clerk_publishable_key>
CLERK_SECRET_KEY=<your_clerk_secret_key>
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_STRIPE_PUBLISHER_KEY=<your_stripe_publishable_key>
STRIPE_SECRET_KEY=<your_stripe_secret_key>
RESEND_API_KEY=<your_resend_api_key>
yarn dev # or npm run dev
Once the server is running, open:
http://localhost:3000
GET /api/products
GET /api/products/:id
GET /api/carts/:userId
POST /api/carts
DELETE /api/carts/:id
GET /api/orders/:userId
POST /api/orders
š Strapi API Base URL: https://strapi-ecommerce-production-f8fb.up.railway.app/api
This project is licensed under the MIT License.