This repository contains the codebase for the E-Waste Impact Tracker, a system designed to help the Hendricks Foundation efficiently manage donated laptops, track their refurbishment, and calculate their environmental and financial impact.
Before running the app, you’ll need to set up accounts and configurations for the following services:
- Create a Resend account.
- Add and verify your domain for sending emails.
- Generate your API key from the Resend dashboard.
- Click on new project then create a Supabase project.
- Then go to project settings and click on Data API.
- Then note down the supabase URL, anon key, and service role key.
- Sign in to Cloudflare and go to the Turnstile dashboard.
- Create a new Turnstile site key.
- Add your domain and note down the site key.
- Create a Google Cloud account (or use existing Gmail).
- In the top nav bar, click the project selector and choose "New Project".
- Name the project then click "Create"
- In the sidebar, go to APIs & Services then Library.
- Search for "Vision API".
- Click it, then click "Enable".
- Go to IAM & Admin > Service Accounts.
- Click "Create Service Account".
- Give it a name (e.g., ocr-service), click "Create and Continue".
- On the “Grant this service account access” screen, you can skip permissions (optional) and click "Done".
- After creating the service account, click its three-dot menu → Manage keys.
- Under the “Keys” tab, click "Add Key" > "Create new key".
- Choose JSON, then click "Create".
- A .json file will be downloaded — this is your API key file.
To set up and run the frontend locally:
You will need to go into the frontend directory then install all the dependencies for the project.
cd frontend
npm install
Then you will need to define your environment variables. Using what you noted down earlier from the prerequisites.
VITE_SUPABASE_URL=""
VITE_SUPABASE_ANON_KEY=""
VITE_TURNSTILE_SITE_KEY=""
Then you can start your devlopment server!
npm run dev
To set up and run the Backend locally:
You will need to go into the backend directory then install all the dependencies for the project.
cd backend
npm install
Then you will need to define your environment variables. Using what you noted down earlier from the prerequisites. For the GOOGLE_SERVICE_ACCOUNT_JSON copy and past everything in the json key you downloaded and past it making sure its one line.
SUPABASE_URL=""
SUPABASE_SERVICE_ROLE_KEY=""
RESEND_API_KEY=""
GOOGLE_SERVICE_ACCOUNT_JSON=""
Then you can start your devlopment server!
npm run dev