Skip to content

ClaraDEV-Fullstack/NexShop

Repository files navigation

πŸ›’ NEXSHOP

A modern, full-stack e-commerce platform built for the Cameroon market β€” featuring a responsive React frontend and a Django REST Framework backend. Browse products, manage cart & wishlist, checkout with mobile money (demo mode), track orders, and receive email confirmations.

Live demo nextshop-ui.onrender.com
API nexshop-shur.onrender.com/api
Repository github.com/ClaraDEV-Fullstack/NexShop

⚠️ Note: Free Render instances sleep after ~15 min idle. The UI loads from a static CDN; the API may take up to ~60s to wake on first visit.

NEXSHOP Landing Page


πŸ“‹ Table of Contents


✨ Features

πŸ›οΈ Shopping

  • Product catalog with categories, filters, sorting, and pagination
  • Smart search and product detail pages with image galleries
  • Related products, featured sections, and bestseller collections
  • FCFA pricing tailored for the Cameroon market

πŸ‘€ Authentication & Account

  • JWT login / register with Google OAuth 2.0
  • User profile and settings
  • Protected routes for checkout and dashboard pages
  • Personal dashboard: orders, wishlist, notifications, settings

πŸ›’ Cart, Checkout & Orders

  • Persistent shopping cart (Redux Toolkit)
  • Multi-step checkout with shipping details
  • Order history, order detail, and cancellation
  • Wishlist (save for later)

πŸ’³ Payments

  • Orange Money and MTN Mobile Money checkout UI
  • Demo mode (PAYMENT_MODE=mock) for portfolio β€” no real charges
  • Production-ready CinetPay integration for live payments

⭐ Engagement

  • Product reviews and star ratings
  • In-app notifications dashboard
  • Order & payment confirmation emails via Brevo SMTP
  • Toast alerts and animated payment success feedback

πŸš€ Production

  • Dockerized backend with Gunicorn
  • Static React frontend on Render CDN (Vite build)
  • Product images served from Supabase Storage
  • Auto-seed catalog on empty production database
  • Open Graph meta tags for rich link previews (WhatsApp, LinkedIn)

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React 18 UI library
Vite 6 Build tool & dev server
Redux Toolkit Auth, cart & global state
React Router v6 Routing & protected routes
Tailwind CSS Responsive UI & dark mode
Framer Motion Animations
Axios API client
@react-oauth/google Google Sign-In
React Hot Toast Notifications

Backend

Technology Purpose
Django 6 Web framework
Django REST Framework REST API
SimpleJWT Token authentication
PostgreSQL Database
django-filter Product filtering
drf-spectacular OpenAPI / Swagger docs
Gunicorn + WhiteNoise Production server

Infrastructure & Integrations

Technology Purpose
Docker Backend containerization
Render Hosting (API + static frontend)
Supabase Storage Product media CDN
Brevo (SMTP) Transactional emails
CinetPay Mobile money payments (live mode)
Google OAuth 2.0 Social login

πŸ“Έ Screenshots

User Dashboard

NEXSHOP Dashboard


πŸ“ Project Structure

NexShop/
β”œβ”€β”€ backend/                  # Django REST API
β”‚   β”œβ”€β”€ accounts/             # Auth, profiles, Google OAuth
β”‚   β”œβ”€β”€ products/             # Catalog, categories, images
β”‚   β”œβ”€β”€ cart/                 # Server-side cart logic
β”‚   β”œβ”€β”€ orders/               # Order processing & emails
β”‚   β”œβ”€β”€ payments/             # Mobile money / CinetPay
β”‚   β”œβ”€β”€ reviews/              # Ratings & feedback
β”‚   β”œβ”€β”€ wishlist/             # Saved products
β”‚   β”œβ”€β”€ alerts/               # User notifications
β”‚   └── nexshop/              # Settings, URLs, storage
β”œβ”€β”€ frontend/                 # React SPA (Vite)
β”‚   β”œβ”€β”€ public/               # Static assets, og-image, _redirects
β”‚   └── src/
β”‚       β”œβ”€β”€ api/                # Axios client & endpoints
β”‚       β”œβ”€β”€ store/              # Redux slices (auth, cart)
β”‚       β”œβ”€β”€ pages/              # Route pages
β”‚       └── components/         # Reusable UI
β”œβ”€β”€ Dockerfile                # Render backend image
β”œβ”€β”€ docker-compose.yml        # Local full-stack dev
β”œβ”€β”€ render.yaml               # Render Blueprint
└── nginx/                    # Reverse proxy (local/prod)

πŸš€ Installation

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • PostgreSQL (or Docker)

1. Clone the repository

git clone https://github.com/ClaraDEV-Fullstack/NexShop.git
cd NexShop

2. Backend setup

cd backend
python -m venv venv
source venv/bin/activate          # Windows: .\venv\Scripts\activate
pip install -r requirements.txt
cp ../.env.example ../.env        # Edit with your values
python manage.py migrate
python manage.py runserver

API runs at http://localhost:8000

3. Frontend setup

cd frontend
npm install
cp .env.example .env.local        # Set VITE_API_URL and VITE_GOOGLE_CLIENT_ID
npm run dev

App runs at http://localhost:5173

4. Docker (optional)

docker-compose up --build

🌐 Deploy on Render

  1. Push to GitHub, then in Render β†’ New β†’ Blueprint β†’ select this repo (render.yaml is included).
  2. Fill secret env vars after the blueprint is applied (see .env.render.example for the full list).
Service Variable Example
nexshop-api (backend) ALLOWED_HOSTS nexshop-shur.onrender.com
BACKEND_URL https://nexshop-shur.onrender.com
FRONTEND_URL https://nextshop-ui.onrender.com
CORS_ALLOWED_ORIGINS https://nextshop-ui.onrender.com
CSRF_TRUSTED_ORIGINS https://nextshop-ui.onrender.com,https://nexshop-shur.onrender.com
PAYMENT_MODE mock
GOOGLE_OAUTH_CLIENT_ID (Google Cloud Console)
GOOGLE_OAUTH_CLIENT_SECRET (Google Cloud Console)
nextshop-ui (frontend) VITE_API_URL https://nexshop-shur.onrender.com/api
VITE_GOOGLE_CLIENT_ID (same Client ID as backend)
  1. Frontend is deployed as a Static Site (CDN-cached Vite build).
  2. Optional: ping https://nexshop-shur.onrender.com/api/health/ with UptimeRobot every 5 minutes to reduce cold starts.

Empty database / images on Render free tier

Render free Web Services have no Shell. Product images are served from Supabase CDN.

Add to the backend environment:

SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=<service_role key>
SUPABASE_BUCKET=media
AUTO_SEED_DB=true

Redeploy β€” the backend auto-seeds products and uploads images in the background (~5–10 min). Watch logs for AUTO_SEED_DB: seeding finished.

Google OAuth (production)

In Google Cloud Console, add authorized origins:

  • https://nextshop-ui.onrender.com

πŸ“š API Documentation

Interactive Swagger UI (when backend is running):

URL
Swagger UI http://localhost:8000/api/docs/
OpenAPI schema http://localhost:8000/api/schema/
Health check https://nexshop-shur.onrender.com/api/health/

πŸ‘¨β€πŸ’» Author

Clara Beri β€” ClaraDEV-Fullstack

Built with ❀️ in Cameroon πŸ‡¨πŸ‡²

About

A production-ready full-stack e-commerce ecosystem with role-based access, product management, and an integrated admin dashboard. With a React frontend and Django REST Framework backend, featuring JWT/OAuth security and Docker containerization.

Topics

Resources

License

Stars

Watchers

Forks

Contributors