Coder Social home page Coder Social logo

vincentroman / commerce Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.94 MB

Digital license and support ticket management platform for software developers.

Home Page: https://weweave.net/products/commerce/

License: GNU General Public License v3.0

Dockerfile 0.13% JavaScript 0.30% TypeScript 99.56%

commerce's Introduction

weweave Commerce

weweave Commerce is an open source web platform for selling digital goods. It relies on external brokers performing the actual transaction and provides a order notification API for those.

Screenshot weweave Commerce

Features:

  • Backend for handling order notifications from brokers
  • Domain-based license key generation (incl. RSA-based public/private key signature)
  • Automatic customer account creation upon order notification
  • Administration portal:
    • Management of products, product variants, brokers and customers
    • Handling support requests
    • Manual license key generation and assigning license keys to customers
  • Customer portal for:
    • License key management
    • Support ticket management
    • Purchase assistant

The software consists of two parts:

  • A backend providing REST APIs, written in TypeScript, based on Node.js (this project)
  • A frontend for customers and administrators, written in TypeScript, based on Angular (see this project)

Setup

The easiest way of getting weweave Commerce up and running is to use our pre-built Docker images. However, you can of course choose to build from source.

Using Docker

  1. Create a config.json file (see below).
  2. Run the image like this (assuming you want to link it with your MySQL container):
    docker run \
        -p 3000:3000 \
        --name commerce \
        --link mysql:mysql \
        -v /tmp/config.json:/usr/src/app/config.json \
        weweave/commerce
    
  3. Access the web frontend at port 3000. Default username is "[email protected]", password is "admin".
  4. After logging in with the admin account, change the username and/or password under "Persons" and configure the system further under "Settings".

Using with docker-compose

  1. Create a config.json file (see below). Password should be changed from root to my-secret-pw.
  2. Bring up the compose file with the followign command: docker-compose up -d
  3. Access web frontend at: http://commerce.docker.localhost

Building from source

  1. Make sure you have Node.js installed (tested with Node.js v8).
  2. Check out the source code and build it:
    git clone https://github.com/weweave/commerce.git
    cd commerce
    npm install
    npm run build-prod
    
  3. Update config.json to match your environment (see below).
  4. Run the server:
    node dist/server.js
    
  5. Access the web frontend at port 3000. Default username is "[email protected]", password is "admin".
  6. After logging in with the admin account, change the username and/or password under "Persons" and configure the system further under "Settings".

Configuration

The settings required on server start are in config.json. Make sure to change this file before starting the server.

{
    "database": {
        "driver": {
            "type": "mysql",
            "host": "mysql",
            "port": 3306,
            "username": "root",
            "password": "root",
            "database": "commerce"
        },
        "logging": ["error", "warn"]
    },
    "basePath": "/",
    "session": {
        "secret": "fkj49l7WwjUtqcfLZKlLA269J28kC4uL",
        "issuer": "https://change.me",
        "lifetime": "12h"
    },
    "importTldListOnStart": true
}

More settings can be changed at runtime by logging in with an administrator account and navigating to "Settings".

Adding the web frontend

If you just set up this project, you'll just get the backend up and running. The frontend must be set up separately.

Docker Compose

Please use a cloud native edge router like Traefik (or nginx or haproxy):

  • Route all incoming requests to /api/ to the backend.
  • Route all other incoming requests to the frontend.

If your frontend is not running at the root path, you must change the base href by setting the frontend's docker environment variable BASE_HREF.

Building from source

  1. Make sure you have Node.js installed (tested with Node.js v8).
  2. Make sure you have Angular CLI installed:
    npm install -g @angular/cli
    
  3. Check out the source code and build it:
    git clone https://github.com/weweave/commerce-www.git
    cd commerce-www
    npm install
    ng build --prod
    
  4. Copy the contents of the dist/commerce-www/ folder to the www/ folder of the previously built backend project.

Demo Mode

Just want to sneak a peek with some demo data prepared for you?

If you start weweave Commerce with environment variable DEMO=1, the server automatically uses an SQLite In-Memory Database and generates some random sample data. The easiest way to run weweave Commerce in Demo Mode is to use the Docker image like this:

docker run -e "DEMO=1" -p 3000:3000 -it weweave/commerce

Afterwards, open your browser and go to: http://localhost:3000

Documentation

Check out the documentation at: https://weweave.net/products/commerce/documentation/

commerce's People

Contributors

gitaroktato avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.