Skip to content

gavinmgrant/omitplastic-web

Repository files navigation

OmitPlastic

MIT License

OmitPlastic is a full-stack web app that lists products that are plastic-free or use less plastic to reduce plastic pollution. Users can create an account to favorite products. Product data is synced with Amazon product data via a protected endpoint that calls the Bright Data API in Vercel cron jobs.

Live App

See a live version of this app here: www.omitplastic.com.

User Flow

Home Page

  • As a user, I want to be able to search for products by keyword or category.

Product Page

  • As a user, I want to be able to view a product detail page and favorite products.

Favorites Page

  • As a user, I want to be able to view and manage my list of favorite products.

Technology

Getting Started

First, install the dependencies and set up the environment variables (see below):

pnpm install

Run the database migrations to create the tables in the Neon database:

npx drizzle-kit push

Then, start the development server to run the app locally:

pnpm dev

Environmental Variables

# Neon connection string
DATABASE_URL=

# Neon Auth environment variables for Next.js
NEXT_PUBLIC_STACK_PROJECT_ID=
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=
STACK_SECRET_SERVER_KEY=

# BrightData environmental variables to scrape Amazon product data
BRIGHTDATA_API_KEY=
BRIGHTDATA_DATASET_ID=

# Secret to protect the sync endpoint from unauthorized requests for Vercel
CRON_SECRET=

# Google Analytics Measurement ID
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=

About

A full-stack e-commerce affiliate app focusing on reducing plastic consumption that uses Next.js and Neon.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors