Logo Lanfrica

Aaron-Douglas/Allternate-Supply

Domain:

digital infrastructure
Creator:
Aar
Host:
Used Electronics E-Commerce site in Ghana # Electronics Catalog A mobile-first inventory catalog for a retail electronics shop. Customers browse current stock, view item details, and initiate purchases via WhatsApp. All payment and fulfillment happen offline. Staff manage inventory, photos, statuses, and sales through a custom admin UI. **Stack:** Next.js 14 · TypeScript · Tailwind CSS · Supabase · Cloudinary ## Features - **Public catalog** — Browse available items by category, status, and search; no auth required. - **Item status** — `AVAILABLE` | `ON_HOLD` | `SOLD` | `RETURNED` drives UI (overlays, filters, CTAs). - **WhatsApp** — Primary buyer channel; “Contact via WhatsApp” opens pre-filled message. - **Admin** — Inventory CRUD, photo upload (Cloudinary), sales recording, receipt PDFs, analytics, CSV export, policy pages. - **No online checkout** — Items are unique units; payment/fulfillment handled offline. ## Prerequisites - Node.js 18+ - pnpm (recommended) or npm - Supabase project - Cloudinary account ## Getting Started ```bash # Clone and install git clone cd electronics-catalog pnpm install # or npm install # Copy env and fill in values (see Environment Variables below) cp .env.example .env.local # Run migrations (Supabase CLI) supabase link --project-ref supabase db push # Generate DB types (optional but recommended) supabase gen types typescript --project-id > lib/supabase/types.ts # Start dev server pnpm dev ``` Open localhost for the public catalog; localhost for the admin dashboard. ### First-time admin user Create a staff account (email/password) via Supabase Auth, then promote to admin: ```bash pnpm run create-admin # Follow prompts to set a user as admin (by email) ``` Or create the user in Supabase Dashboard → Authentication → Users, then run the script to assign the admin role. ## Scripts | Command | Description | |--------|-------------| | `pnpm dev` | Start Next.js dev server | | `pnpm build` | Production build | | `pnpm run db:migr …