This guide is for someone who downloaded this project as a ZIP from GitHub and wants to run it locally.
Because ZIP downloads do not include ignored files, you will be missing some important local-only items such as:
.envfiles.venvPython virtual environmentnode_modules- generated upload folders
- Supabase project secrets
- local database/storage configuration
This document explains everything step by step.
CertifyPro is built with these main parts:
- Frontend: React + Vite + TypeScript + Tailwind CSS
- Backend: FastAPI + Python
- Database/Auth/Storage: Supabase
- Optional serverless flow: Supabase Edge Function for access request processing
Install these on your system first:
- Node.js 20.x or later
- npm 10.x or later
- Python 3.11 or later
- A Supabase account and a Supabase project
- Git
- VS Code
- Supabase CLI
- Bun (optional, only if you prefer
bun installovernpm install)
pdf2imagePython package- Poppler installed on your system and added to
PATH
If you do not install pdf2image and Poppler, the main app can still run, but PDF-to-image preview generation for uploaded templates may fail.
Unzip the repository anywhere on your machine.
Example path:
D:\CertifyProIn this guide, that folder is called the project root.
Open a terminal in the project root, then move into the frontend folder:
cd frontend
npm installIf you prefer Bun:
cd frontend
bun install@hookform/resolvers@radix-ui/react-accordion@radix-ui/react-alert-dialog@radix-ui/react-aspect-ratio@radix-ui/react-avatar@radix-ui/react-checkbox@radix-ui/react-collapsible@radix-ui/react-context-menu@radix-ui/react-dialog@radix-ui/react-dropdown-menu@radix-ui/react-hover-card@radix-ui/react-label@radix-ui/react-menubar@radix-ui/react-navigation-menu@radix-ui/react-popover@radix-ui/react-progress@radix-ui/react-radio-group@radix-ui/react-scroll-area@radix-ui/react-select@radix-ui/react-separator@radix-ui/react-slider@radix-ui/react-slot@radix-ui/react-switch@radix-ui/react-tabs@radix-ui/react-toast@radix-ui/react-toggle@radix-ui/react-toggle-group@radix-ui/react-tooltip@react-three/drei@react-three/fiber@supabase/supabase-js@tanstack/react-queryaxiosclass-variance-authorityclsxcmdkdate-fnsembla-carousel-reactframer-motioninput-otplucide-reactnext-themesreactreact-day-pickerreact-domreact-hook-formreact-resizable-panelsreact-router-domrechartssonnertailwind-mergetailwindcss-animatethreevaulzod
@eslint/js@tailwindcss/typography@testing-library/jest-dom@testing-library/react@types/node@types/react@types/react-dom@vitejs/plugin-react-swcautoprefixereslinteslint-plugin-react-hookseslint-plugin-react-refreshglobalsjsdomlovable-taggerpostcsstailwindcsstypescripttypescript-eslintvitevitest
Go back to the project root and create a Python virtual environment:
cd ..
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pipInstall the backend packages:
pip install fastapi uvicorn python-dotenv supabase requests httpx qrcode[pil] pillow pandas openpyxl python-multipart email-validator pydanticInstall this only if you want PDF template preview generation:
pip install pdf2imagefastapiuvicornpython-dotenvsupabaserequestshttpxqrcode[pil]pillowpandasopenpyxlpython-multipartemail-validatorpydanticpdf2imageoptional
fastapi: backend API frameworkuvicorn: ASGI server used to run FastAPIpython-dotenv: loads.envvaluessupabase: database, auth, storage accessrequestsandhttpx: HTTP requests to Supabase and assetsqrcode[pil]: QR generation for certificate verificationpillow: image editing for certificatespandasandopenpyxl: Excel import supportpython-multipart: required for file upload endpointsemail-validator: required because the backend usesEmailStrpdf2image: optional PDF preview support
This repository does not include real .env files. You must create them yourself.
Create these files manually:
backend/.envfrontend/.env
Optional:
- root
.env
The backend code explicitly tries to load backend/.env. If you also keep a root .env, it can help when running commands from the repository root.
Create backend/.env with the following content:
SUPABASE_URL=https://YOUR_PROJECT.supabase.co
SUPABASE_SERVICE_ROLE_KEY=YOUR_SUPABASE_SERVICE_ROLE_KEY
FRONTEND_ORIGINS=http://localhost:5173
ACCESS_INVITE_REDIRECT_URL=http://localhost:5173/reset-password?type=invite
SMTP_HOST=smtp.yourprovider.com
SMTP_PORT=587
SMTP_USER=your-smtp-user
SMTP_PASSWORD=your-smtp-password
SMTP_FROM_EMAIL=no-reply@yourdomain.com
CONTACT_DESTINATION_EMAIL=certifyprocare@gmail.com
CONTACT_BRAND_NAME=ElevateX
API_BASE_URL=http://127.0.0.1:8000
PUBLIC_VERIFY_BASE_URL=http://localhost:5173/verifySUPABASE_URL: your Supabase project URLSUPABASE_SERVICE_ROLE_KEY: server-side key used by FastAPIFRONTEND_ORIGINS: allowed frontend origin for CORSACCESS_INVITE_REDIRECT_URL: redirect used in admin invite flowsSMTP_HOST: mail server hostSMTP_PORT: mail server port, normally587SMTP_USER: SMTP usernameSMTP_PASSWORD: SMTP passwordSMTP_FROM_EMAIL: sender email addressCONTACT_DESTINATION_EMAIL: support inbox for contact form submissionsCONTACT_BRAND_NAME: brand label used in contact emailsAPI_BASE_URL: backend base URL used when generating public file linksPUBLIC_VERIFY_BASE_URL: verification page URL encoded into QR flows
Do not put the service role key in the frontend .env. It must remain backend-only.
Create frontend/.env with this content:
VITE_SUPABASE_URL=https://YOUR_PROJECT.supabase.co
VITE_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEYVITE_SUPABASE_URL: same Supabase project URLVITE_SUPABASE_ANON_KEY: public anonymous key for browser auth
You need a Supabase project before the app can work.
From Project Settings -> API, copy:
- Project URL
anonpublic keyservice_rolekey
Use them in the .env files above.
This project depends on Supabase tables, policies, and storage configuration. Run these SQL files in the Supabase SQL Editor.
backend/database/supabase_schema.sqldatabase/profiles_schema.sqldatabase/authentication_details.sql
organizationsapp_userstemplatesstudentscertificatesgenerated_certificatesworkspace_templatesactivitiesprofilesaccess_requests- some indexes
- some triggers
- some RLS policies
- one storage bucket policy set for organization documents
Some SQL files overlap on the organizations table. That is acceptable because they use create table if not exists and create index if not exists. Still, run them in the order above.
If you want the full organization-scoped admin/co-admin access-control system, also follow the SQL steps in:
ACCESS_CONTROL_SETUP.md
That document includes additional backfill queries for:
- organization keys
- organization IDs
app_users.metadata- access-control metadata
- optional student backfill
If you skip that document, the app may still run, but the advanced access-control flows may be incomplete.
Create this bucket manually in Supabase Storage:
certificate-templates
Set it to:
- Public =
true
This is required because uploaded certificate template files are stored there and the backend expects a public URL.
org-documentsOrg_idsoptional legacy bucket name checked by the edge function
org-documents is referenced in SQL policies and access request validation.
This project expects Supabase Auth to be active.
- Email/password login in the frontend
- Password reset flow
- Invite/onboarding flow for approved access requests
- User profile data linked through
profilesandapp_users
Supabase Auth users live in auth.users, while app-specific role data lives in:
profilesapp_users
Both matter.
If you want the automated access-request approval flow, deploy the Supabase Edge Function located at:
supabase/functions/process-access-request/index.ts
Follow Supabase CLI installation for your OS, then log in:
supabase loginsupabase link --project-ref YOUR_PROJECT_REFsupabase secrets set SUPABASE_URL=https://YOUR_PROJECT.supabase.co
supabase secrets set SUPABASE_SERVICE_ROLE_KEY=YOUR_SUPABASE_SERVICE_ROLE_KEY
supabase secrets set APP_RESET_PASSWORD_URL=http://localhost:5173/reset-password?type=invite
supabase secrets set APP_LOGIN_URL=http://localhost:5173/login
supabase secrets set SMTP_HOST=smtp.yourprovider.com
supabase secrets set SMTP_PORT=587
supabase secrets set SMTP_USER=your-smtp-user
supabase secrets set SMTP_PASSWORD=your-smtp-password
supabase secrets set SMTP_FROM_EMAIL=no-reply@yourdomain.comsupabase functions deploy process-access-requestThe main app can still run, but automated access-request processing, invitation handling, and approval emails may not work.
Some ignored folders are created automatically, but it is safe to create them manually first.
Create these folders if they do not exist:
mkdir backend\uploads
mkdir backend\uploads\generated
mkdir uploads
mkdir uploads\templates
mkdir uploads\generated- The FastAPI app serves files from
backend/uploads - generated certificates are written to
backend/uploads/generated - missing upload folders can break certificate generation or previews
From the project root:
.\.venv\Scripts\Activate.ps1
uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000If setup is correct, backend should start at:
http://127.0.0.1:8000
Open a second terminal:
cd frontend
npm run devThe frontend should start at:
http://localhost:5173
Before testing the app, confirm all of these are done:
- Frontend dependencies installed
- Backend dependencies installed
backend/.envcreatedfrontend/.envcreated- Supabase project created
- SQL files executed
certificate-templatesbucket created and public- backend upload folders exist
- backend running on port
8000 - frontend running on port
5173
Once both apps are running, test these locally:
- Frontend home page:
http://localhost:5173 - Backend docs:
http://127.0.0.1:8000/docs - Verification flow:
http://localhost:5173/verify - Login page:
http://localhost:5173/login
Cause:
backend/.envis missing or not loaded
Fix:
- Create
backend/.env - Add
SUPABASE_URL - Add
SUPABASE_SERVICE_ROLE_KEY - restart backend
Cause:
frontend/.envmissingVITE_SUPABASE_URLorVITE_SUPABASE_ANON_KEY
Fix:
- create
frontend/.env - add both values
- restart Vite dev server
Cause:
certificate-templatesbucket does not exist- bucket is not public
SUPABASE_URLis wrong
Fix:
- create bucket in Supabase Storage
- make it public
- check backend
.env
Cause:
pdf2imagenot installed- Poppler not installed
Fix:
- run
pip install pdf2image - install Poppler
- add Poppler
binfolder toPATH
Cause:
python-multipartis not installed
Fix:
pip install python-multipartCause:
email-validatoris not installed
Fix:
pip install email-validatorCause:
- SMTP values missing in backend or edge function secrets
- edge function not deployed
Fix:
- configure SMTP in
backend/.env - configure SMTP in
supabase secrets - deploy
process-access-request
If you want the shortest working path, do this in order:
- Install Node.js, npm, Python, and create a Supabase project
- Run
npm installinfrontend - Create
.venvand install Python packages - Create
backend/.env - Create
frontend/.env - Run the SQL files in Supabase
- Create the
certificate-templatespublic bucket - Start backend with Uvicorn
- Start frontend with Vite
- Deploy the edge function only if you need access-request automation
This repository currently does not include a backend requirements.txt or env example files. After you get the project working, it is a good idea to create these locally:
requirements.txt.env.examplebackend/.env.examplefrontend/.env.example
That will make future ZIP-based setup easier.