Prerequisites
Before setting up Quality Hub GINEZ locally, ensure you have the following installed:- Node.js 18+ and npm
- Git for version control
- A Supabase account (free tier available)
- Access to Google Sheets for product catalog
- Access to Google Drive for technical documents
Step 1: Clone the Repository
Step 2: Install Dependencies
Install all required npm packages:- Next.js 14 (App Router)
- React 18
- Supabase client libraries
- Tailwind CSS & shadcn/ui components
- Recharts for data visualization
- And more…
Step 3: Configure Environment Variables
Create a.env.local file in the root directory:
.env.local
Getting Supabase Credentials
- Go to Supabase and create a new project
- Navigate to Settings → API
- Copy the Project URL and anon/public key
- Paste them into your
.env.localfile
Setting Up Google Sheets URLs
- Create or access the Google Sheets for product catalogs
- For each sheet, go to File → Share → Publish to web
- Select Comma-separated values (.csv) format
- Copy the published URL and add it to
.env.local
Step 4: Set Up Supabase Database
Create Tables
Run the following SQL in your Supabase SQL Editor:Set Up Row Level Security (RLS) Policies
Step 5: Start Development Server
Step 6: Create Your First Admin User
- Navigate to http://localhost:3000/login
- Register a new account
- Go to Supabase dashboard → Table Editor → profiles
- Find your user and set
is_admintotrue - Log out and log back in to see admin features
Available npm Scripts
Project Structure
Once set up, your project structure should look like this:Troubleshooting
Port Already in Use
If port 3000 is already in use:Supabase Connection Issues
- Verify your
.env.localvariables are correct - Check that your Supabase project is active
- Ensure RLS policies are properly configured
Module Not Found Errors
Next Steps
Database Migrations
Learn how to manage database schema changes
Adding Products
Add new products to the system
Customization
Customize the application for your needs
