Skip to content

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.

Notifications You must be signed in to change notification settings

Hack4Impact-BU/Hendricks-Ecalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Hendricks-Ecalc

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.

Prerequisites

Before running the app, you’ll need to set up accounts and configurations for the following services:

  1. Create a Resend account.
  2. Add and verify your domain for sending emails.
  3. Generate your API key from the Resend dashboard.
  1. Click on new project then create a Supabase project.
  2. Then go to project settings and click on Data API.
  3. Then note down the supabase URL, anon key, and service role key.
  1. Sign in to Cloudflare and go to the Turnstile dashboard.
  2. Create a new Turnstile site key.
  3. Add your domain and note down the site key.

Create a Google Cloud Project

  1. Create a Google Cloud account (or use existing Gmail).
  2. In the top nav bar, click the project selector and choose "New Project".
  3. Name the project then click "Create"

Enable the Vision API

  1. In the sidebar, go to APIs & Services then Library.
  2. Search for "Vision API".
  3. Click it, then click "Enable".

Create a Service Account

  1. Go to IAM & Admin > Service Accounts.
  2. Click "Create Service Account".
  3. Give it a name (e.g., ocr-service), click "Create and Continue".
  4. On the “Grant this service account access” screen, you can skip permissions (optional) and click "Done".

Generate JSON Key

  1. After creating the service account, click its three-dot menu → Manage keys.
  2. Under the “Keys” tab, click "Add Key" > "Create new key".
  3. Choose JSON, then click "Create".
  4. A .json file will be downloaded — this is your API key file.

Frontend

To set up and run the frontend locally:

Installation

You will need to go into the frontend directory then install all the dependencies for the project.

cd frontend
npm install

Environment Variables

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=""

Development Server

Then you can start your devlopment server!

npm run dev

Backend

To set up and run the Backend locally:

Installation

You will need to go into the backend directory then install all the dependencies for the project.

cd backend
npm install

Environment Variables

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=""

Development Server

Then you can start your devlopment server!

npm run dev

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages