A mock e-commerce platform for Recurse Center participants and alumni.
- Next.js: React framework for server-side rendering
- Material-UI: user interface component library
- Apollo Client: state management library to manage data with GraphQL
- Node.js: JavaScript runtime environment
- Express.js: framework used to create a GraphQL endpoint
- GraphQL: data query and manipulation language
- Apollo Server: GraphQL server
- TypeORM: object relational mapping package to work with PostgreSQL
- PostgreSQL: relational database
- NextAuth.js: authentication library used to implement OAuth
- Stripe API: payment processing
$ git clone https://github.com/jp-tran/rc-store.git
$ npm i --global yarn
$ yarn install
3. Set up PostgreSQL and create a database locally
PORT=4000
CORS_ORIGIN=http://localhost:3000
DATABASE_URL=postgresql://<user>:<password>@localhost:5432/<database-name>
$ yarn watch
$ yarn dev
$ yarn install
3. Create an OAuth app in Recurse Center settings. Set the redirect URI to http://localhost:3000/api/auth/callback/recurse
. Save the ID and secret for step 5.
4. Create a Stripe account and go to your Stripe dashboard to get your Stripe Publishable Key and Secret Key.
# OAuth Info
RECURSE_ID=<The ID from your Recurse Center settings>
RECURSE_SECRET=<The secret from your Recurse Center settings>
NEXT_AUTH_CONFIG_SECRET=<A random string used to hash tokens, sign cookies and generate crytographic keys>
NEXTAUTH_URL=http://localhost:3000/
# Stripe keys
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=<The publishable key from your Stripe dashboard>
STRIPE_SECRET_KEY=<The secret key from your Stripe dashboard>
# GraphQL API URL
NEXT_PUBLIC_API_URL=http://localhost:4000/
$ yarn dev
- OAuth 2.0 to sign in with Recurse Center accounts
- Display Recurse Center merch
- Shopping cart and payments with Stripe
- Set up PostgreSQL database and TypeORM
- Integrate client and server with GraphQL
- Deploy front end on Vercel and back end on Heroku
- Unit tests for front end and back end
- Marketplace feature for Recursers to sell/buy/trade