All Projects → netlify → Gocommerce

netlify / Gocommerce

Licence: mit
A headless e-commerce for JAMstack sites

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gocommerce

Falcon
DEITY Falcon - Progressive Web App library for any type of website. Fully Open Source, Platform Agnostic and headless. OSL3.0. Supports Magento 2 PWA storefront, Wordpress PWA and BigCommerce PWA Storefront. Built with ReactJS, NodeJS and GraphQL. Join our community and become a contributor at https://slack.deity.io
Stars: ✭ 501 (-57.47%)
Mutual labels:  ecommerce, platform, headless
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 (-37.44%)
Mutual labels:  ecommerce, jamstack, headless
Commerce.js
Open source, JS eCommerce SDK for building headless, Jamstack applications. Build custom storefronts, carts, and checkouts in any frontend framework, platform, or device. Integrates with Stripe, Square, PayPal, Paymill and Razorpay with support for 135+ currencies.
Stars: ✭ 112 (-90.49%)
Mutual labels:  ecommerce, jamstack, headless
Ever
Ever® - Open-Source Commerce Platform for On-Demand Economy and Digital Marketplaces
Stars: ✭ 980 (-16.81%)
Mutual labels:  ecommerce, platform, headless
commercelayer-checkout
Commmerce Layer Checkout (Vue.js)
Stars: ✭ 31 (-97.37%)
Mutual labels:  ecommerce, headless, jamstack
React Storefront
React Storefront - PWA for eCommerce. 100% offline, platform agnostic, headless, Magento 2 supported. Always Open Source, Apache-2.0 license. Join us as contributor ([email protected]).
Stars: ✭ 292 (-75.21%)
Mutual labels:  ecommerce, headless
Mix.core
🚀 Mixcore CMS is an open source CMS that support both headless and decoupled to easily build any kinds of app/web app/customisable APIs built on top of ASP.NET Core / Dotnet Core. It is a completely open source ASP.NET Core (Dotnet Core) CMS solution. https://mixcore.org
Stars: ✭ 304 (-74.19%)
Mutual labels:  ecommerce, headless
Example Storefront
Example Storefront is Reaction Commerce’s headless ecommerce storefront - Next.js, GraphQL, React. Built using Apollo Client and the commerce-focused React UI components provided in the Storefront Component Library (reactioncommerce/reaction-component-library). It connects with Reaction backend with the GraphQL API.
Stars: ✭ 471 (-60.02%)
Mutual labels:  ecommerce, headless
plasmic
Visual page builder and web design tool for any website or web app tech stack
Stars: ✭ 1,475 (+25.21%)
Mutual labels:  headless, jamstack
Nopcommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
Stars: ✭ 6,827 (+479.54%)
Mutual labels:  ecommerce, headless
Swell Js
JS library for building storefronts and checkouts with Swell ecommerce.
Stars: ✭ 24 (-97.96%)
Mutual labels:  ecommerce, jamstack
React Storefront
Build and deploy e-commerce progressive web apps (PWAs) in record time.
Stars: ✭ 275 (-76.66%)
Mutual labels:  ecommerce, headless
ecommerce
Laravel open source e-commerce system.
Stars: ✭ 209 (-82.26%)
Mutual labels:  platform, ecommerce
Bagisto
An easy to use, free and open source laravel eCommerce platform to build your online shop in no time.
Stars: ✭ 4,140 (+251.44%)
Mutual labels:  ecommerce, headless
commercejs-nextjs-vercel
Serverless eCommerce demo store built for the Jamstack. Built with Commerce.js, Next.js and can be one click deployed to Vercel. Includes product catalogue, categories, variants, cart, checkout, order confirmation and printable receipts. This is an open source project.
Stars: ✭ 68 (-94.23%)
Mutual labels:  ecommerce, jamstack
Snipcart Jekyll
Demo for a Snipcart powered e-commerce store built with Jekyll
Stars: ✭ 48 (-95.93%)
Mutual labels:  ecommerce, jamstack
Geekshop
极客商城 ~ 一个面向开发者的、基于Spring+GraphQL+Angular的、无前端(headless)电商框架
Stars: ✭ 52 (-95.59%)
Mutual labels:  ecommerce, headless
Snipcart Wordpress React
Strapping React.js on a WordPress Backend: WP REST API Example
Stars: ✭ 66 (-94.4%)
Mutual labels:  jamstack, headless
tracardi
TRACARDI is a new HOME for your customer data. TRACARDI is an API-first solution, low-code / no-code platform aimed at any e-commerce business that wants to start using user data for marketing purposes.
Stars: ✭ 193 (-83.62%)
Mutual labels:  platform, headless
saleor
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.
Stars: ✭ 15,824 (+1243.29%)
Mutual labels:  ecommerce, headless

GoCommerce Build Status

A small go based API for static e-commerce sites.

It handles orders and payments. Integrates with Stripe for payments and will support international pricing and VAT verification.

GoCommerce is released under the MIT License. Please make sure you understand its implications and guarantees.

What your static site must support

Each product you want to sell from your static site must have unique URL where GoCommerce can find the meta data needed for calculating pricing and taxes in order to verify that the order is legitimate before using Stripe to charge the client.

The metadata can be anywhere on the page, and goes in a script tag in this format:

<script class="gocommerce-product" type="application/json">
{"sku": "my-product", "title": "My Product", "prices": [{"amount": "49.99", "currency": "USD"}], "type": "ebook"}
</script>

The minimum required is the Sku, title and at least one "price". Default currency is USD if nothing else specified.

VAT, Countries and Regions

GoCommerce will regularly check for a file called https://example.com/gocommerce/settings.json

This file should have settings with rules for VAT or currency regions.

This file is not required for GoCommerce to work, but will enable support for various advanced features. Currently it enables VAT calculations on a per country/product type basic.

The reason we make you include the file in the static site, is that you'll need to do the same VAT calculations client side during checkout to be able to show this to the user. The commerce-js client library can help you with this.

Here's an example settings file:

{
  "taxes": [{
    "percentage": 20,
    "product_types": ["ebook"],
    "countries": ["Austria", "Bulgaria", "Estonia", "France", "Gibraltar", "Slovakia", "United Kingdom"]
  }, {
    "percentage": 7,
    "product_types": ["book"],
    "countries": ["Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus", "Denmark", "Estonia"]
  }]
}

Based on these rules, if an order includes a product with "type" set to "ebook" in the product metadata on the site and the users billing Address is set to "Austria", GoCommerce will verify that a 20 percentage tax has been included in that product.

JavaScript Client Library

The easiest way to use GoCommerce is with commerce-js.

IMPORTANT: Since Release 1.8.0 of GoCommerce at least Version 5.0.0 of the JavaScript Client is required.

Running the GoCommerce backend

GoCommerce can be deployed to any server environment that runs Go. Minimum requirement for Go is version 1.11 since GoCommerce is using Go modules.

The button below provides a quick way to get started by running on Heroku:

Deploy

Configuration

You may configure GoCommerce using either a configuration file named .env, environment variables, or a combination of both. Environment variables are prefixed with GOCOMMERCE_, and will always have precedence over values provided via file.

For local dev, the easiest way to get started is to copy the included example.env file to .env

Top-Level

GOCOMMERCE_SITE_URL=https://example.netlify.com/

SITE_URL - string required

The base URL your site is located at.

OPERATOR_TOKEN - string Multi-instance mode only

The shared secret with an operator (usually Netlify) for this microservice. Used to verify requests have been proxied through the operator and the payload values can be trusted.

API

GOCOMMERCE_API_HOST=localhost
PORT=9999

API_HOST - string

Hostname to listen on.

PORT (no prefix) / API_PORT - number

Port number to listen on. Defaults to 8080.

API_ENDPOINT - string Multi-instance mode only

Controls what endpoint Netlify can access this API on.

Database

GOCOMMERCE_DB_DRIVER=sqlite3
DATABASE_URL=gotrue.db

DB_DRIVER - string required

Chooses what dialect of database you want. Choose from sqlite3, mysql, or postgres.

DATABASE_URL (no prefix) / DB_DATABASE_URL - string required

Connection string for the database. See the gorm examples for more details.

DB_NAMESPACE - string

Adds a prefix to all table names.

DB_AUTOMIGRATE - bool

If enabled, creates missing tables and columns upon startup.

Logging

LOG_LEVEL=debug

LOG_LEVEL - string

Controls what log levels are output. Choose from panic, fatal, error, warn, info, or debug. Defaults to info.

LOG_FILE - string

If you wish logs to be written to a file, set log_file to a valid file path.

Payment

Stripe

PAYMENT_STRIPE_ENABLED - bool

Whether Stripe is enabled as a payment provider or not.

PAYMENT_STRIPE_SECRET_KEY - string

The Stripe secret key used when authenticating with the Stripe API.

PayPal

PAYMENT_PAYPAL_ENABLED - bool

Whether PayPal is enabled as a payment provider or not.

PAYMENT_PAYPAL_CLIENT_ID - string PAYMENT_PAYPAL_SECRET - string

The OAuth credentials PayPal issued to you. GoCommerce will use them to obtain an access token.

PAYMENT_PAYPAL_ENV - string

The PayPal environment to use. Choose from production or sandbox.

Downloads

DOWNLOADS_PROVIDER - string

The provider to use for downloads. Choose from netlify or ``.

DOWNLOADS_NETLIFY_TOKEN - string

The authentication bearer token used to access the Netlify downloads API.

Coupons

COUPONS_URL - string

A URL that contains all the coupon information in JSON.

COUPONS_USER - string COUPONS_PASSWORD - string

HTTP Basic Authentication information to use if required to access the coupon information.

Webhooks

WEBHOOKS_ORDER - string WEBHOOKS_PAYMENT - string WEBHOOKS_UPDATE - string WEBHOOKS_REFUND - string

A URL to send a webhook to when the corresponding action has been performed.

WEBHOOKS_SECRET - string

A secret used to sign a JWT included in the X-Commerce-Signature header. This can be used to verify the webhook came from GoCommerce.

JSON Web Tokens (JWT)

GOCOMMERCE_JWT_SECRET=supersecretvalue

JWT_SECRET - string required

The secret used to verify JWT tokens with.

JWT_ADMIN_GROUP_NAME - string

The name of the admin group (if enabled). Defaults to admin.

E-Mail

Sending email is not required, but is highly recommended. If enabled, you must provide the required values below.

GOCOMMERCE_SMTP_HOST=smtp.mandrillapp.com
GOCOMMERCE_SMTP_PORT=587
[email protected]
GOCOMMERCE_SMTP_PASS=correcthorsebatterystaple
[email protected]
GOCOMMERCE_MAILER_SUBJECTS_ORDER_CONFIRMATION="Please confirm"

SMTP_ADMIN_EMAIL - string required

The From email address for all emails sent. Order receipts are also sent to this address.

SMTP_HOST - string required

The mail server hostname to send emails through.

SMTP_PORT - number required

The port number to connect to the mail server on.

SMTP_USER - string

If the mail server requires authentication, the username to use.

SMTP_PASS - string

If the mail server requires authentication, the password to use.

MAILER_SUBJECTS_ORDER_CONFIRMATION - string

Email subject to use for order confirmations. Defaults to Order Confirmation.

MAILER_SUBJECTS_ORDER_RECEIVED - string

Email subject to use for orders sent to the store admin. Defaults to Order Received From {{ .Order.Email }}.

MAILER_TEMPLATES_ORDER_CONFIRMATION - string

URL path, relative to the SITE_URL, of an email template to use when sending an order confirmation. Order and Transaction variables are available.

Default Content (if template is unavailable):

<h2>Thank you for your order!</h2>

<ul>
{{ range .Order.LineItems }}
<li>{{ .Title }} <strong>{{ .Quantity }} x {{ .Price }}</strong></li>
{{ end }}
</ul>

<p>Total amount: <strong>{{ .Order.Total }}</strong></p>

MAILER_TEMPLATES_ORDER_RECEIVED - string

URL path, relative to the SITE_URL, of an email template to use when sending order details to the store admin. Order and Transaction variables are available.

Default Content (if template is unavailable):

<h2>Order Received From {{ .Order.Email }}</h2>

<ul>
{{ range .Order.LineItems }}
<li>{{ .Title }} <strong>{{ .Quantity }} x {{ .Price }}</strong></li>
{{ end }}
</ul>

<p>Total amount: <strong>{{ .Order.Total }}</strong></p>
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].