Full-stack commerce + operations + supply chain + marketing platform.
[ Next.js 15 Frontend ] → [ NestJS API ] → [ PostgreSQL + Redis ]
(Vercel) (Cloud Run) (Neon + Upstash)
Monorepo Structure:
irth-os/
├── apps/
│ ├── api/ # NestJS Backend (REST API)
│ └── web/ # Next.js Frontend (App Router)
├── packages/
│ ├── types/ # Shared TypeScript types
│ ├── config/ # Shared configs
│ └── ui/ # Shared UI components
├── prisma/ # Database schema + migrations
├── vercel.json # Vercel deployment config
└── docker-compose.yml
- Node.js 20+
- Docker & Docker Compose (for local DB)
git clone https://github.com/sheiko00/IRTH-OS-V2.git
cd IRTH-OS-V2
npm install
cp .env.example .envdocker compose up -dnpx prisma generate
npx prisma migrate dev --name init
npx ts-node prisma/seed.ts# API (port 3001)
npm run dev:api
# Web (port 3000)
npm run dev:web- Frontend: http://localhost:3000
- API: http://localhost:3001/api
- DB Studio:
npx prisma studio
| Role | Password | |
|---|---|---|
| Admin | admin@irth.app | admin123 |
| Module | API Prefix | Features |
|---|---|---|
| Auth (JWT) | /api/auth |
3 auth flows, refresh tokens |
| Users & RBAC | /api/users, /api/roles |
28 permissions, role management |
| Products | /api/products |
CRUD, variants, categories, search |
| Orders | /api/orders |
Full lifecycle, status transitions, stock mgmt |
| Cart | /api/cart |
Guest + authenticated, merge on login |
| Suppliers | /api/suppliers |
CRUD, files, batches |
| Inventory | /api/inventory |
Stock, expiry alerts, reorder |
| Shipping | /api/shipping |
Tracking, carrier webhook |
| Marketing | /api/marketing |
Campaigns, coupons, influencers |
| Files | /api/files |
GCS upload, folders |
| Analytics | /api/analytics |
KPIs, sales, top products |
| Notifications | /api/notifications |
User alerts, mark read |
| (internal) | SpaceMail SMTP, branded templates |
| Service | Provider | Free Tier |
|---|---|---|
| Frontend | Vercel | Unlimited deploys |
| Backend | Google Cloud Run | 2M req + 360 hrs/mo |
| Database | Neon or Supabase | 0.5 GB storage |
| Cache | Upstash | 10K cmds/day |
| Storage | Google Cloud Storage | 5 GB free |
| SpaceMail | SMTP included | |
| CI/CD | GitHub Actions | 2000 min/mo |
| CDN | Cloudflare | Unlimited |
- Connect your GitHub repo at vercel.com
- Set Root Directory to
apps/web - Add environment variables:
API_URL= your Cloud Run API URL
- Deploy!
# Build & push
docker build -f apps/api/Dockerfile -t gcr.io/PROJECT_ID/irth-api .
docker push gcr.io/PROJECT_ID/irth-api
# Deploy
gcloud run deploy irth-api \
--image gcr.io/PROJECT_ID/irth-api \
--region me-west1 \
--set-env-vars "DATABASE_URL=...,REDIS_URL=...,JWT_SECRET=..."Or push to main → GitHub Actions auto-deploys.
- Create free DB at neon.tech
- Copy connection string to
DATABASE_URL - Run:
npx prisma migrate deploy
- Create free DB at upstash.com
- Copy Redis URL to
REDIS_URL
Set in .env:
SMTP_HOST=smtp.spacemail.com
SMTP_PORT=465
SMTP_USER=info@yourdomain.com
SMTP_PASS=your_password
SMTP_FROM=info@yourdomain.com
Month 1: 0 EGP → Build + test
Month 2: 0 EGP → Soft launch (10-50 orders)
Month 3: 0 EGP → Real operations
Month 4+: Pay when you earn 💰
When to upgrade (100+ orders/mo):
- Database: Neon Pro ($19/mo) or Supabase Pro ($25/mo)
- Backend: Cloud Run scales automatically (pay per use)
- Redis: Upstash Pay-as-you-go ($0.2/100K cmds)
- Frontend: Next.js 15, React 19, Tailwind CSS, shadcn/ui
- Backend: NestJS 11, Prisma ORM, JWT Auth, Nodemailer
- Database: PostgreSQL 16 (Neon/Supabase), Redis (Upstash)
- Storage: Google Cloud Storage
- Email: SpaceMail SMTP
- Deploy: Vercel + Cloud Run + GitHub Actions
MIT