Skip to content

bahaeddinmselmi/bizzfloww

Repository files navigation

BizzFlow

A modern, mobile-friendly business management dashboard built with Vite + React + TypeScript, Tailwind CSS, and Supabase. Deployed to Netlify.

Features

  • Dashboard with totals, recent sales, low-stock alerts
  • Currency support (USD/TND) with formatting and Settings currency selection
  • Trial/Premium flow with non-sensitive manual upgrade request
  • Team management with email invites via Supabase Edge Function
  • Responsive UI: off-canvas sidebar on mobile, accessible header and modals

Tech Stack

  • React + TypeScript (Vite)
  • Tailwind CSS
  • Supabase (Auth, Database, Edge Functions)
  • Netlify (hosting, SPA redirects)

Getting Started

1) Requirements

  • Node 18+
  • npm (or pnpm/yarn)
  • Supabase account (project URL + anon/public key)

2) Install

npm install

3) Environment

Create .env at the project root based on .env.example:

cp .env.example .env

Set the following:

  • VITE_SUPABASE_URL = your Supabase project URL (public)
  • VITE_SUPABASE_ANON_KEY = your Supabase anon/public key
  • Optional: VITE_PAYPAL_CLIENT_ID

.env is git-ignored. Do not commit real keys.

4) Run locally

npm run dev

App runs on http://localhost:5173 by default.

Supabase

Linking (optional)

If using the Supabase CLI:

supabase link

Edge Function: invite-team-member

Used for team invites. Requires service-role secrets in the function environment.

Deploy:

supabase secrets set \
  SB_URL=https://<your-project-ref>.supabase.co \
  SB_SERVICE_ROLE_KEY=<your-service-role-key>

supabase functions deploy invite-team-member --no-verify-jwt

Netlify Deployment

This repo includes netlify.toml with SPA routing to index.html.

  • Set environment variables in Netlify UI:
    • VITE_SUPABASE_URL
    • VITE_SUPABASE_ANON_KEY
  • Build command: npm run build
  • Publish directory: dist

Using Netlify CLI:

netlify deploy --build --prod

Scripts

npm run dev       # start dev server
npm run build     # production build
npm run preview   # preview build locally
npm run lint      # lint

Notes

  • Low-stock notifications are computed from components where stock_quantity <= reorder_threshold.
  • Team emails are not fetched client-side; the invite function handles user creation/invite and membership.
  • Trial banner automatically counts down from subscription_expires_at and hides when premium is active.

License

MIT

About

A modern, mobile-friendly business management dashboard built with Vite + React + TypeScript, Tailwind CSS, and Supabase. Deployed to Netlify.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors