All Projects → SwiftCommerce → OrderSystem

SwiftCommerce / OrderSystem

Licence: other
An independent micro-service that takes orders in and processes payments.

Programming Languages

swift
15916 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to OrderSystem

VaporGCM
A simple Android GCM/FCM library for Swift/Vapor
Stars: ✭ 25 (+56.25%)
Mutual labels:  vapor, vapor-swift
next
(Work in progress) The rewritten version of the original PizzaQL 🍕
Stars: ✭ 45 (+181.25%)
Mutual labels:  order, order-management
VaporCRUDRouter
A Rails-inspired extension to Vapor's routing system
Stars: ✭ 58 (+262.5%)
Mutual labels:  vapor, vapor-swift
vapor-ext
⚙️ A collection of Swift extensions for wide range of Vapor data types and classes
Stars: ✭ 36 (+125%)
Mutual labels:  vapor, serverside-swift
puffery
A SwiftUI iOS App and Vapor Server to send push notifications fueled by Siri Shortcuts.
Stars: ✭ 17 (+6.25%)
Mutual labels:  vapor, vapor-swift
template
A Vapor template for convenient and fast scaffolding 🏎
Stars: ✭ 33 (+106.25%)
Mutual labels:  vapor, vapor-swift
VaporElasticsearch
A Vapor/Swift Elasticsearch client
Stars: ✭ 26 (+62.5%)
Mutual labels:  vapor, vapor-swift
xcode-leaf-color-schemer
https://ashokgelal.com/2017/01/19/leaf_color_schemer_xcode/?ref=github
Stars: ✭ 26 (+62.5%)
Mutual labels:  vapor, vapor-swift
JSONAPISerializer
JSONAPISerializer for Server Side Swift
Stars: ✭ 21 (+31.25%)
Mutual labels:  vapor, vapor-swift
Food-Order
Food ordering template application using Ionic, Angular and Typescript.
Stars: ✭ 20 (+25%)
Mutual labels:  order
sendgrid
SendGrid-powered mail backend for Vapor
Stars: ✭ 66 (+312.5%)
Mutual labels:  vapor
sqlite-kit
Non-blocking SQLite client library with SQL builder built on SwiftNIO
Stars: ✭ 51 (+218.75%)
Mutual labels:  vapor
KarmaAPI
Swift API using the Vapor web framework and Turnstile for authentication
Stars: ✭ 20 (+25%)
Mutual labels:  vapor
mongodb-vapor
MongoDB + Vapor integration
Stars: ✭ 31 (+93.75%)
Mutual labels:  vapor
apns
Helpful extensions and abstractions for using APNSwift
Stars: ✭ 75 (+368.75%)
Mutual labels:  vapor
swiftybeaver-provider
SwiftyBeaver Logging Provider for Vapor, the server-side Swift web framework https://swiftybeaver.com
Stars: ✭ 32 (+100%)
Mutual labels:  vapor
sqlite-nio
Non-blocking wrapper for libsqlite3-dev using SwiftNIO
Stars: ✭ 33 (+106.25%)
Mutual labels:  vapor
alphabetical-sorter
VScode extension - For variable alphabetical re-order
Stars: ✭ 30 (+87.5%)
Mutual labels:  order
async
⏱ Promises and reactive-streams in Swift built for high-performance and scalability.
Stars: ✭ 35 (+118.75%)
Mutual labels:  vapor
magento2-edit-order-email
Magento2 - Edit Order Email from Admin
Stars: ✭ 30 (+87.5%)
Mutual labels:  order-management

Order System

Overview

Order System is a micro-service written in Vapor, a server-side Swift framework, that handles the purchasing of merchandise for an e-commerce platform. It has third-party payments with providers like PayPal and Stripe, order histories for users, guest checkout, and customizable user attributes for any additional features you want to build in.

This service does not manage a store's products and inventory, user accounts, or customer service.

Setup

Once you have the Order System service forked and downloaded, you will want to do specific configurations so it works with your app.

First, there are a few environment variables you will have to declare and configuration values to set.

JWT

Since Order System use JWT for authenticating users, you will need to create JWT_PUBLIC and JWT_SECRET variables, which will be the n and d values respectively. If you don't have values yet for these variables, you can create them with the OpenSSL command-line tool (instructions from Google Cloud docs):

openssl genrsa -out rsa_private.pem 2048
openssl rsa -in rsa_private.pem -pubout -out rsa_public.pem

Note that these values must be RSA compatible.

PayPal

If you are going to keep the built-in PayPal integration, you will need to set the PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET variables. You can see where to get these values in the skelpo/PayPal package README

In the Sources/App/Configuration/OrderService.swift file, you will need to set the paypalPayeeEmail, paypalRedirectApprove, paypalRedirectCancel to replace the default values with the ones your app will use.

Stripe

If you are going to use the built-in Stripe integration, you will need to set the STRIPE_KEY or STRIPE_TEST_KEY variables depending on your environment.

ProductManager

The Order System service relies on a different service to handle the store's products and inventory. To connect to it, you will need to have a service that has a URL structure of uri/:id and returns a JSON structure that follows this pattern:

{
	"id": Int?,
	"sku": String,
	"name": String,
	"description": String?,
	"prices": ([Price]?) [
		{
			"id": Int?,
			"cents": Int,
			"active": Bool,
			"currency": String
		}
	]
}

Skelpo provides a ProductManager that handles this that you can use.

The uri variable needs to be set to the route of the product management service you are hosting that a product can be accessed from when a forward slash and the product's ID (/:id) are appended to the route path. The variable is in the Sources/App/Configuration/ProductManager.swift file.

MySQL Database

Order System is built on a MySQL database. The configuration is in the Sources/App/Configuration/databases.swift file.

The configuration values are fetched from the environment variables used by Vapor Cloud with development variables as the default values. If you want a dev MySQL database to connect to the service without any changes, it will need to:

  • Have localhost as its hostname.
  • Created under the user root.
  • Its password set to password.
  • Its name is order_system.

Order System assumes the database will always be on port 3306.

API

You can read the API docs for this service here.

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].