/vrs

A serverless virtual reality e-commerce experience powered by Vercel

Primary LanguageTypeScriptApache License 2.0Apache-2.0


VRS

VRS is a fully-functional e-commerce store using Next.js 12, three.js, NextAuth.js, Stripe Elements, and Airtable.

Demo

https://serverless-vrs.vercel.app/

Configuration

Step 1

Clone the repository

$ git clone https://github.com/vercel/vrs.git

Step 2

In order to run this example locally, you have to set up your environment in the .env.local file.

Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

cp .env.local.example .env.local

Then, open .env.local and add the missing environment variables:

  • NEXTAUTH_SECRET: A secret value that's used by NextAuth.js to encrypt JWTs. Read more about NextAuth.js's secret value here.
  • STRIPE_PK: Stripe's publishable key. Read more about Stripe's API keys here.
  • STRIPE_SK: Stripe's secret key. Read more about Stripe's API keys here.
  • GITHUB_CLIENT_ID: Client ID of your registered OAuth application within Github. Read more about creating a Github app here.
  • GITHUB_CLIENT_SECRET: Client Secret of your registered OAuth application within Github. Read more about creating a Github app here.

In this example, we're using Airtable as our data source. If you haven't configured Airtable, this example uses the local mock data that can be found in mockdata.ts. You can optionally provide the necessary environment variables in the .env.local file.

  • AIRTABLE_API_KEY (optional): Airtable's API key. Read more about Airtable's API keys here
  • AIRTABLE_BASE_NAME (optional): Your Airtable's base name. Read more about Airtable's API keys here
  • AIRTABLE_TABLE_NAME (optional): Your Airtable's Table name. Read more about using data from Airtable here.
  • AIRTABLE_VIEW_NAME (optional): Your Airtable's View name. Read more about using data from Airtable here.