A comprehensive business management system for cosmetics makers. Manage formulations, track inventory, handle accounting (expenses & income), and generate financial reports.
- Formulation Management - Create and manage cosmetic formulations with:
- Percentage and weight-based ingredient tracking
- Batch size scaling (scale up or down)
- Cost calculation per batch
- Metadata (pH, shelf life, usage instructions)
- Ingredient Library - Organize ingredients with:
- Editable categories
- Notes and descriptions
- Cost per unit tracking
- Inventory Tracking - Track ingredient purchases with:
- Supplier information
- Purchase date and cost
- Quantity and units
- Automatic cost-per-unit calculation
- Expense Tracking - Manage business expenses:
- Categorized expense management
- Vendor tracking
- Payment method recording
- Date-based organization
- Income Tracking - Record revenue:
- Multiple income sources (Etsy, Squarespace, custom)
- CSV import functionality
- Order and customer tracking
- Payment method recording
- Financial Reports:
- Income Statement (P&L) with date range selection
- Balance Sheet with assets and liabilities
- Category-wise breakdowns
- Net income calculations
- Authentication - Secure user authentication via Supabase
- Dashboard - Overview of all business metrics
- Frontend: React + TypeScript + Vite
- Styling: Tailwind CSS
- Backend/Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Hosting: Vercel (recommended)
git clone <repository-url>
cd formulation
npm install- Go to https://supabase.com and create a free account
- Create a new project
- Go to the SQL Editor in your Supabase dashboard
- Copy the entire contents of
DATABASE_SCHEMA.mdand run it in the SQL Editor - Configure Authentication URLs (IMPORTANT):
- Go to Authentication > URL Configuration
- Set Site URL to
http://localhost:5173 - Add
http://localhost:5173/**to Redirect URLs - (Later, add your production URL when deployed)
- Go to Settings > API to get your project URL and anon key
-
Copy
.env.exampleto.env:cp .env.example .env
-
Edit
.envand add your Supabase credentials:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
npm run devThe app will be available at http://localhost:5173
-
Push your code to GitHub:
git add . git commit -m "Initial commit" git push
-
Go to https://vercel.com and sign up (free)
-
Click "New Project" and import your GitHub repository
-
Add your environment variables in the Vercel dashboard:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
-
Click "Deploy"
-
Update Supabase URLs (IMPORTANT):
- Once deployed, go back to your Supabase project
- Go to Authentication > URL Configuration
- Update Site URL to your Vercel URL (e.g.,
https://your-project.vercel.app) - Add
https://your-project.vercel.app/**to Redirect URLs
Your app will be live at https://your-project.vercel.app
-
Push your code to GitHub
-
Go to https://netlify.com and sign up
-
Click "Add new site" > "Import an existing project"
-
Connect to your GitHub repository
-
Build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
-
Add environment variables in Netlify dashboard
-
Click "Deploy site"
-
Update Supabase URLs (IMPORTANT):
- Once deployed, go back to your Supabase project
- Go to Authentication > URL Configuration
- Update Site URL to your Netlify URL
- Add your Netlify URL with
/**to Redirect URLs
- Sign up for an account at your deployed URL
- Create ingredient categories (e.g., Oils, Butters, Actives, Preservatives)
- Add ingredients to your library
- Record ingredient purchases to track costs
- Create your first formulation
- Go to "Formulations" and click "Create Formulation"
- Fill in the formulation details (name, batch size, etc.)
- Add ingredients and their percentages
- Ensure percentages total 100%
- Save the formulation
- Open any formulation
- Change the batch size in the input field
- The ingredient amounts and costs will automatically recalculate
- Add purchases for each ingredient with quantity and cost
- The system will calculate cost per unit
- When viewing formulations, you'll see the total cost per batch based on the latest purchase prices
See DATABASE_SCHEMA.md for the complete database schema and SQL setup instructions.
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewThis application can run completely free:
- Supabase: Free tier includes 500MB database, 50MB file storage, 2GB bandwidth
- Vercel: Free tier includes unlimited personal projects with 100GB bandwidth
- Total: $0/month for personal use
MIT