Skip to content

Repository files navigation

Teco's Farms — Order Management System

A lean, mobile-first order management system for Teco's Farms (Tanzania). Replaces the manual WhatsApp-to-spreadsheet workflow with a public order form and an admin dashboard.

Stack: Next.js (App Router), Tailwind, Supabase, Vercel. Target cost: $0/month on free tiers.

Project context

Full vision, architecture, schema, and phases are in docs/PROJECT_CONTEXT.md. For the full documentation set (overview, API, codebase, deployment, etc.), see docs/README.md.

Status

  • Phase 1 (MVP): Implemented — public order form, admin dashboard, PDF export, settings.
  • Phase 2–3: Cutoff logic, repeat customers, shareable assets, notifications; later, M-Pesa and analytics (see docs/PROJECT_CONTEXT.md).

Setup

1. Clone and install

git clone <repo-url>
cd "tecos farms"
npm install

2. Environment variables

Copy the example env file and fill in your Supabase values:

cp .env.local.example .env.local

Edit .env.local and set:

  • NEXT_PUBLIC_SUPABASE_URL — your Supabase project URL (Settings → API).
  • NEXT_PUBLIC_SUPABASE_ANON_KEY — anon/public key.
  • SUPABASE_SERVICE_ROLE_KEY — service role key (Settings → API; keep secret).

3. Supabase

  1. Create a project at supabase.com.
  2. In the SQL Editor, run the migrations in order (see supabase/README.md):
    • supabase/migrations/20260223000001_initial_schema.sql
    • supabase/migrations/20260223000002_seed_settings.sql
  3. In Authentication → Users, add one admin user (email + password). Use this to log in at /admin/login.

4. Run locally

npm run dev

Deploy (Vercel)

  1. Push the repo to GitHub (or connect your Git provider in Vercel).
  2. In Vercel, Add New Project and import this repo.
  3. In Settings → Environment Variables, add the same three variables as in .env.local:
    • NEXT_PUBLIC_SUPABASE_URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY
    • SUPABASE_SERVICE_ROLE_KEY
  4. Deploy. Optionally add a custom domain (e.g. order.tecosfarms.co.tz) in Settings → Domains.

Scripts

  • npm run dev — start dev server (Turbopack).
  • npm run build — production build.
  • npm run start — start production server.
  • npm run lint — run ESLint.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages