Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

EcomCloud — Multi-Tenant E-Commerce Platform

Project Structure

ecomcloud/
├── backend/ # NestJS API
├── frontend/ # Next.js 14 Dashboard
├── supabase-schema.sql
├── docker-compose.yml
└── .github/workflows/ci.yml

Quick Start

1. Supabase Setup

  1. Create a project at https://supabase.com
  2. Go to SQL Editor → New Query
  3. Paste and run supabase-schema.sql
  4. Copy your SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY from Project Settings → API

2. Backend

cd backend
cp .env.example .env
# Fill in your .env values
npm install
npm run start:dev

API runs on http://localhost:4000 Swagger docs at http://localhost:4000/api/docs

3. Frontend

cd frontend
cp .env.example .env
# Fill in your .env values
npm install
npm run dev

Dashboard runs on http://localhost:3000

4. Docker (optional)

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
# Fill in both .env files
docker-compose up --build

Default Admin Login

Scrrnshots

🔐 Login Page

🏠 Home Page

🛒 Store Page

Environment Variables

backend/.env

VariableDescription
SUPABASE_URLYour Supabase project URL
SUPABASE_SERVICE_ROLE_KEYService role key (not anon key)
JWT_SECRETAny long random string
STRIPE_SECRET_KEYStripe secret key (sk_test_...)
PORTAPI port (default 4000)
FRONTEND_URLFrontend URL for CORS

frontend/.env

VariableDescription
NEXT_PUBLIC_API_URLBackend URL (http://localhost:4000)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripe publishable key (pk_test_...)

API Endpoints

MethodEndpointDescription
POST/auth/registerRegister user / store
POST/auth/loginLogin, get JWT
GET/dashboard/overviewStats overview
GET/dashboard/revenue-chart7-day revenue
GET/dashboard/recent-ordersLast 10 orders
GET/tenantsList tenants
GET/tenants/:id/statsTenant stats
GET/tenants/:id/productsList products
POST/tenants/:id/productsCreate product
PUT/tenants/:id/products/:pidUpdate product
DELETE/tenants/:id/products/:pidDelete product
GET/tenants/:id/ordersList orders
POST/tenants/:id/ordersCreate order + Stripe intent
POST/tenants/:id/orders/:oid/confirmConfirm payment
PUT/tenants/:id/orders/:oid/statusUpdate status

User Roles

  • admin — sees all stores, all orders, all analytics
  • store_owner — sees only their own store's data

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages