Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProyectoFerretek/FerreMarket/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through everything needed to run FerreMarket on your local machine. By the end you will have the development server up at http://localhost:5173, a working Supabase connection, and a user account you can sign in with — ready to explore every module of the admin panel.
FerreMarket requires a valid Supabase session to access any route under /admin. Unauthenticated requests are automatically redirected to /admin/login. Make sure you complete the Supabase setup steps below before trying to log in.
1

Prerequisites

Make sure the following are installed and available on your machine before you begin:
  • Node.js v16 or higher — check with node --version
  • npm v8 or higher — check with npm --version
  • A Supabase project — create one for free at supabase.com. You will need the project URL and the anon public key from Project Settings → API.
  • A Cloudflare account with:
    • An R2 bucket configured with public access enabled (used to serve product images)
    • A deployed Cloudflare Worker that accepts authenticated upload requests and writes to the R2 bucket
2

Clone the repository

Clone the FerreMarket repository from GitHub and move into the project directory:
git clone https://github.com/ProyectoFerretek/FerreMarket.git
cd FerreMarket
3

Install dependencies

Install all required packages with npm. This includes React, Supabase client, Recharts, Lucide icons, React Router, react-hot-toast, and jsPDF (along with jspdf-autotable for invoice table formatting) — all already declared in package.json.
npm install
Verify the install completed without errors and that a node_modules directory was created in the project root.
4

Create the .env file

Copy the included environment template to a new .env file at the project root:
cp .env.example .env
Open .env in your editor and fill in each variable. The file contains seven variables across three service groups:
# Auth0 (legacy — included for backward compatibility)
VITE_AUTH0_DOMAIN_NAME = "your-tenant.us.auth0.com"
VITE_AUTH0_CLIENT_ID   = "your_auth0_client_id"

# Supabase
VITE_SUPABASE_URL      = "https://xyzcompany.supabase.co"
VITE_SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

# Cloudflare R2 & Workers
VITE_CLOUDFLARE_CDN_URL         = "https://pub-xxxx.r2.dev"
VITE_CLOUDFLARE_WORKERS_URL     = "https://your-worker.your-subdomain.workers.dev"
VITE_CLOUDFLARE_WORKERS_API_KEY = "your_worker_api_key"
VariableWhere to find it
VITE_AUTH0_DOMAIN_NAMEAuth0 Dashboard → Applications → your app → Domain
VITE_AUTH0_CLIENT_IDAuth0 Dashboard → Applications → your app → Client ID
VITE_SUPABASE_URLSupabase Dashboard → Project Settings → API → Project URL
VITE_SUPABASE_ANON_KEYSupabase Dashboard → Project Settings → API → anon public key
VITE_CLOUDFLARE_CDN_URLCloudflare Dashboard → R2 → your bucket → Public bucket URL
VITE_CLOUDFLARE_WORKERS_URLCloudflare Dashboard → Workers & Pages → your worker → Routes
VITE_CLOUDFLARE_WORKERS_API_KEYThe secret API key you set inside your Worker’s environment variables
See the Configuration page for a full description of every variable and detailed setup instructions for each service.
5

Start the dev server

Launch the Vite development server:
npm run dev
Vite will print output similar to:
VITE v6.x.x  ready in 300 ms

➜  Local:   http://localhost:5173/
➜  Network: use --host to expose
Open http://localhost:5173 in your browser to see the FerreMarket landing page.
6

Log in to the admin panel

Navigate to the login page:
http://localhost:5173/admin/login
Enter the email and password of a user that exists in your Supabase project’s Auth table. Upon successful authentication, Supabase Auth creates a session and you will be redirected to /admin — the main Dashboard.
To create your first user, go to your Supabase Dashboard → Authentication → Users and click Add user. Enter an email and a strong password. The new user will appear immediately and can be used to log in to FerreMarket right away — no email confirmation required when creating users from the dashboard.

Next Steps

Configuration Reference

Deep-dive into every environment variable — Supabase, Cloudflare R2, Workers, and Auth0 — with step-by-step setup instructions for each service.

Dashboard Module

Learn how the Dashboard module surfaces key business metrics, renders Recharts graphs, and gives managers a live overview of store activity.

Build docs developers (and LLMs) love