Skip to content

Getting Started ​

This guide takes you from a fresh clone to a running local stack. Cropto is an npm-workspaces monorepo — every app and shared package lives in one repository and shares one dependency tree.

The 60-second quickstart ​

bash
# 1. Clone and install all workspaces from the repo root
git clone <repo-url> cropto && cd cropto
npm install                          # installs every workspace (uses npm workspaces)

# 2. Configure environment
cp .env.example .env                 # fill in DATABASE_URL, JWT_SECRET, etc.

# 3. Generate the Prisma client and apply the schema
npx prisma generate --schema=prisma/schema.prisma
npx prisma migrate dev --schema=prisma/schema.prisma

# 4. Seed lookups + taxonomy
npm run seed:lookups
npx prisma db seed

# 5. Run the apps you need (separate terminals)
npm run dev --workspace=apps/api    # Express API on :3000
npm run dev --workspace=apps/web    # Web app on :5173
npm run dev --workspace=apps/admin  # Admin panel on :5174 (or next free port)

Package manager

This project uses npm workspaces only. Never use yarn or pnpm — the lockfile and workspace resolution assume npm.

What runs where ​

ServiceCommandDefault port
API (Express)npm run dev --workspace=apps/api3000
Web app (Vite)npm run dev --workspace=apps/web5173
Admin panel (Vite)npm run dev --workspace=apps/admin5174*
Marketing site (Next.js)npm run dev --workspace=apps/marketing3002
Mobile (Expo)npm run android --workspace=apps/mobileMetro / device
API docs (Swagger)— served by API/api/docs
Job dashboard (Bull Board)— served by API (admin auth)/admin/queues

* Vite auto-increments the port if the default is taken.

External dependencies ​

Cropto talks to several managed services. Most are optional in local development — the code degrades gracefully when a service is not configured (see Environment Variables).

DependencyUsed forRequired locally?
PostgreSQL (Supabase)Primary datastore via PrismaYes
Upstash RedisBullMQ queues + rate-limit countersNo — falls back to in-memory
Cloudflare R2Image/file storage (Sharp → R2)No — upload paths inert without it
MSG91SMS (OTP + notifications)No — SMS skipped, in-app still fires
Firebase AdminOTP verification fallbackNo
MeilisearchBatch search indexNo — falls back to Postgres trigram
OpenWeatherMapDashboard weatherNo
SentryError tracking / tracingNo — inert with empty DSN

Next steps ​

Internal technical documentation — Cropto