All Projects → njosefbeck → Unicorn Mart

njosefbeck / Unicorn Mart

Licence: mit
A proof of concept e-commerce store leveraging Contentful, GatsbyJS, Stripe, and serverless via clay.run

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Unicorn Mart

Ecommerce Netlify
🛍 A JAMstack Ecommerce Site built with Nuxt and Netlify Functions
Stars: ✭ 1,147 (+5361.9%)
Mutual labels:  serverless, netlify, stripe-checkout
Cartoonify
Deploy and scale serverless machine learning app - in 4 steps.
Stars: ✭ 157 (+647.62%)
Mutual labels:  serverless, aws-lambda, netlify
Bootcamp 2020
Learn to Build Modern Full Stack Serverless Multi-Tenant SaaS Apps and APIs
Stars: ✭ 369 (+1657.14%)
Mutual labels:  aws-lambda, netlify, gatsbyjs
Aws Auto Terminate Idle Emr
AWS Auto Terminate Idle AWS EMR Clusters Framework is an AWS based solution using AWS CloudWatch and AWS Lambda using a Python script that is using Boto3 to terminate AWS EMR clusters that have been idle for a specified period of time.
Stars: ✭ 21 (+0%)
Mutual labels:  serverless, aws-lambda
Lamb
monitoring tool for better visibility when developing AWS Lambda functions
Stars: ✭ 11 (-47.62%)
Mutual labels:  serverless, aws-lambda
Gatsby Starter Ghost
A starter template to build lightning fast websites with Ghost & Gatsby
Stars: ✭ 752 (+3480.95%)
Mutual labels:  netlify, gatsbyjs
Aws Serverless Auth Reference App
Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Stars: ✭ 724 (+3347.62%)
Mutual labels:  serverless, aws-lambda
Lambdalogs
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.
Stars: ✭ 18 (-14.29%)
Mutual labels:  serverless, aws-lambda
Serverless Plugin Warmup
Keep your lambdas warm during winter. ♨
Stars: ✭ 814 (+3776.19%)
Mutual labels:  serverless, aws-lambda
Aws Lambda Workshop
Some incremental examples suitable to host an AWS Lambda Functions workshop
Stars: ✭ 18 (-14.29%)
Mutual labels:  serverless, aws-lambda
Epsagon Go
Automated tracing library for Go 1.x ⚡️
Stars: ✭ 24 (+14.29%)
Mutual labels:  serverless, aws-lambda
Cloudmagick
CloudMagick is a serverless application which provides a dynamic image transformation like the small light module of apache2
Stars: ✭ 11 (-47.62%)
Mutual labels:  serverless, aws-lambda
Commercejs Nextjs Demo Store
Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.
Stars: ✭ 737 (+3409.52%)
Mutual labels:  serverless, netlify
Archive aws Lambda Go Shim
Author your AWS Lambda functions in Go, effectively.
Stars: ✭ 799 (+3704.76%)
Mutual labels:  serverless, aws-lambda
Gofaas
A boilerplate Go and AWS Lambda app. Demonstrates an expert configuration of 10+ AWS services to support running Go functions-as-a-service (FaaS).
Stars: ✭ 731 (+3380.95%)
Mutual labels:  serverless, aws-lambda
Serverless Aws Lambda Node Postgres
Serverless AWS Lambda with Node.js,Postgres Rest API with Sequelize.
Stars: ✭ 18 (-14.29%)
Mutual labels:  serverless, aws-lambda
Aws Node Elasticache Vpc
Serverless function using elasticache (redis) within VPC
Stars: ✭ 22 (+4.76%)
Mutual labels:  serverless, aws-lambda
Lambda Api
Lightweight web framework for your serverless applications
Stars: ✭ 929 (+4323.81%)
Mutual labels:  serverless, aws-lambda
Serverless Python Requirements
⚡️🐍📦 Serverless plugin to bundle Python packages
Stars: ✭ 838 (+3890.48%)
Mutual labels:  serverless, aws-lambda
Lambda Packages
Various popular python libraries, pre-compiled to be compatible with AWS Lambda
Stars: ✭ 713 (+3295.24%)
Mutual labels:  serverless, aws-lambda

unicorn-mart

A proof of concept for an e-commerce store powered by Contentful, Gatsby.js, Stripe, Clay, and hosted by Netlify.

This project has been updated to use Gatsby v2

This project uses the old version of Stripe Checkout. For an updated e-commerce Gatsby + Stripe integration, see my project dragon-mart.

The Goal

I wanted to create a simple e-commerce solution that leverages the awesomeness that is static generators, while still giving clients a CMS to manage their inventory. My goal is always to get off of using WordPress whenever a CMS is required by a client. Bye bye WordPress!

To Run

Of course you'll need to create accounts and download all the things you'll need to download to use the above services and tools. Once that's all set up, and you've cloned the repo:

  1. Run npm install.
  2. In Contentful, create a Product content type. To run this example exactly as is, your content type should have six fields:
    • Name (short text)
    • Product Id (integer)
    • Price (integer)
    • Images (media, many files)
    • Colors (short text, list)
    • Sizes (short text, list)
  3. Make a product in Contentful. Mine, of course, was a unicorn! The images are included as a zip file in this project.
  4. Make your own .env file at the root of the project, and put your Contentful Space Id and Access Token there.
  5. For Clay serverless function, I basically just used the code here. If you want to change the implementation, feel free to fork what Kareem has and edit it! My version actually just returns a "success" object and doesn't do any charging. In the front-end code, you'll just need to change the endpoint URL in cart.js to point to your own endpoint.

What I Learned / Remaining Questions

First, though I love Contentful, it might have made more sense to handle inventory in Stripe itself. This way I could have treated it more easily as inventory, with specific stock, SKUs, etc. That beind said, I know there are ways to alter the data that gets stored in Contentful through their Management API, so I also could have leveraged that. An extension of this project would be to implement that functionality.

Second, creating a Gatsby plugin to inject Stripe's Checkout JS library was surprisingly simple, thanks to the examples provided by Gatsby. I have since made two standalone Gatsby / Stripe plugins for implementing Stripe Checkout (download on npm) and Stripe Elements (download on npm).

Third, going serverless with Clay was great! Such an awesome team, and such a great product. I especially like how easy it is, the logs, and the ability to easily copy and customize what others have done.

Fourth, this project could be extended / improved in (I'm sure) a multitude of ways. Notably:

  • Implement Redux (mostly for funsies)
  • Use Contentful's Management API to show how to decrease inventory and ultimately show if a product is 'sold out' on the front-end
  • Make a store with multiple products
  • Implement Stripe Elements instead of Stripe Checkout
  • Have the Clay serverless function e-mail a receipt to the customer and an order summary to me

If you're interested in tackling any of these things, feel free to fork! Also, I'm sure my current code could use some refactoring or cleaning up. Feel free to fork and go wild! :) Any questions or comments, get in touch via Twitter!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].