A modern, mobile-friendly business management dashboard built with Vite + React + TypeScript, Tailwind CSS, and Supabase. Deployed to Netlify.
- 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
- React + TypeScript (Vite)
- Tailwind CSS
- Supabase (Auth, Database, Edge Functions)
- Netlify (hosting, SPA redirects)
- Node 18+
- npm (or pnpm/yarn)
- Supabase account (project URL + anon/public key)
npm installCreate .env at the project root based on .env.example:
cp .env.example .envSet the following:
VITE_SUPABASE_URL= your Supabase project URL (public)VITE_SUPABASE_ANON_KEY= your Supabase anon/public key- Optional:
VITE_PAYPAL_CLIENT_ID
.envis git-ignored. Do not commit real keys.
npm run devApp runs on http://localhost:5173 by default.
If using the Supabase CLI:
supabase linkUsed 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-jwtThis repo includes netlify.toml with SPA routing to index.html.
- Set environment variables in Netlify UI:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Build command:
npm run build - Publish directory:
dist
Using Netlify CLI:
netlify deploy --build --prodnpm run dev # start dev server
npm run build # production build
npm run preview # preview build locally
npm run lint # lint- Low-stock notifications are computed from
componentswherestock_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_atand hides when premium is active.
MIT