FerreMarket is a full-stack hardware store management platform built for ferreterías and building materials retailers of any size. It replaces disconnected spreadsheets and manual workflows with a single, modern admin panel that covers every part of daily operations — from scanning a product into inventory to generating a signed invoice PDF and tracking monthly revenue trends. Whether you run a single neighborhood shop or a multi-branch chain, FerreMarket’s modular design lets you adopt only the features you need while the underlying architecture scales with your business.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.
Core Modules
Dashboard
Provides a real-time snapshot of daily sales, low-stock alerts, recent transactions, and performance charts so managers always know where the business stands.
Products
Manages the full product catalog — add, edit, or remove items; assign categories and suppliers; set prices; and monitor stock levels across the store.
Sales
Processes new transactions, applies promotions and discounts, and generates printable or emailed invoices in PDF format with a single click.
Customers
Maintains a searchable customer database with complete contact details, purchase history, and account notes for both individual buyers and businesses.
Promotions
Creates and schedules special offers including percentage discounts, fixed-amount reductions, category-wide sales, and reusable promotional codes.
Reports
Generates detailed analytics on sales by period, inventory turnover, and profitability by category so owners can make data-driven purchasing decisions.
Users
Controls who has access to the platform by managing admin accounts, roles, and permissions to keep sensitive operations secure.
Architecture Overview
FerreMarket is split into two layers that communicate entirely through Supabase’s client library and Edge Functions. Frontend — The UI is a single-page application written in React 18 with TypeScript for type safety across the entire codebase. Vite handles bundling and the local development server, providing near-instant hot module replacement. All visual styling is done with Tailwind CSS utility classes. Data visualizations (bar charts, line graphs, pie charts) are rendered by Recharts, and invoice PDFs are generated client-side with jsPDF and jspdf-autotable — no server round-trip required. Backend — Supabase provides the Postgres database, Row-Level Security policies, and the REST/realtime APIs that the frontend queries directly. Authentication is handled by Supabase Auth (email + password), and each protected route verifies an active session before rendering. Product images are stored in a Cloudflare R2 public bucket; a Cloudflare Worker sits in front of R2 to handle authenticated upload requests, keeping the bucket itself private while still serving images through a public CDN URL.| Layer | Technology |
|---|---|
| UI framework | React 18 + TypeScript |
| Build tool | Vite 6 |
| Styling | Tailwind CSS 3 |
| Charts | Recharts 2 |
| PDF generation | jsPDF + jspdf-autotable |
| Database | Supabase (Postgres) |
| Auth | Supabase Auth |
| Image storage | Cloudflare R2 |
| Image upload handler | Cloudflare Workers |
Application Routes
FerreMarket uses React Router v6 with aBrowserRouter. The route tree is defined in src/App.tsx and follows a simple two-level structure:
| Path | Component | Access |
|---|---|---|
/ | Landing | Public |
/admin/login | Login | Public |
/admin | Layout (via ProtectedRoute) | Authenticated |
/admin (index) | Dashboard | Authenticated |
/admin/productos | Productos | Authenticated |
/admin/clientes | Clientes | Authenticated |
/admin/ventas | Ventas | Authenticated |
/admin/promociones | Promociones | Authenticated |
/admin/reportes | Reportes | Authenticated |
/admin/usuarios | GestionUsuarios | Authenticated |
/admin is wrapped in a ProtectedRoute component. If no active Supabase session is found, the component immediately redirects the visitor to /admin/login. The shared Layout component (sidebar, topbar, notifications) renders once as the parent outlet and each page component is mounted inside it as a nested route.
User Roles
FerreMarket supports two levels of platform access, enforced through Supabase Row-Level Security policies on the database side and role checks in the UI:- Admin — Full access to all modules including user management, system configuration, and all reports.
- Usuario — Operational staff access covering products, sales, customers, and promotions but without the ability to manage other users or view sensitive financial reports.
Ready to get the app running locally? Head to the Quickstart to clone the repo, configure your environment, and launch the dev server in under five minutes.