Code Monkey home page Code Monkey logo

sslatt-backend's Introduction

SSLATT (OSS marketplace) - backend

Super Slime ๐Ÿ Love All The Time

SSLATT Tech

Sponsors

Add your logo here

Features

Name Description
PGP 2FA โœ…
Autowithdraw โœ…
BTC, XMR โœ…
Escrow / FE โœ…
Multisig support ๐Ÿ”„
Jabberbot ๐Ÿ”„
FE disputes ๐Ÿ”„
Auto dispute resolution ๐Ÿ”„
Walletless pay ๐Ÿ”„

SSLATT Infra

Features backend

Name Description
Database Couchbase via Couchset ORM
API Apollo GraphQL via RoadmanJS Framework
Payments BTC(btcpayserver), XMR(monero rpc) via RoadmanJS Wallet, RoadmanJS MoneroX
Auth JWT, 2FA via RoadmanJS Auth
Storage Local disk / FastDFS via RoadmanJS

Requirements

  • Node.js 18+ and npm
  • Couchbase
  • Redis
  • BTCPayerServer or monero rpc

Getting started backend

Run the following command on your local environment:

git clone [email protected]:stoqey/sslatt-backend.git
yarn

Then, you can run the project locally in development mode with live reload by executing:

yarn dev

Open http://localhost:3000 with your favorite browser to see your project.

Environment

Set up authentication

PORT=3037
APP_NAME=sslatty
DEBUG=sslatty*

# 32 chars each
ACCESS_TOKEN_SECRET=random ass string
REFRESH_TOKEN_SECRET=random ass string

Database and Storage

Set up couchbase and redis

COUCHBASE_URL=
COUCHBASE_BUCKET=dev
COUCHBASE_USERNAME=admin
COUCHBASE_PASSWORD=

REDIS_URL="rediss://:xxxxxxxx@xxxxxxxx:30296"

Default storage is set to local uploads, but you can set fastdfs, pictr e.t.c

Database migration

To set up db indexes, and initial data pass the STARTUP env with any value, this will populate the database with the defined config from src/config i.e categories, site settings, admin user e.t.c

STARTUP=anyvalue

Once app is up and running you can remove the STARTUP env

Set up Payments XMR/BTC

You can accept payments using BTC with btcpayserver or XMR with Monerox

#BTCPAYSERVER ENV
BTCPAYSERVER_TOKEN=xxxxx
BTCPAYSERVER_STORE=xxxxx
BTCPAYSERVER_URL=https://xxxxxxx.com/api/v1
BTCPAYSERVER_BTC=S-xxxxxx-BTC
BTCPAYSERVER_XMR=S-xxxx-XMR
BTCPAYSERVER_CRON_ENABLED=BTC,XMR
BTCPAYSERVER_CRON=*/1 * * * *

# MONEROX
MONEROX_URL=same as backend url
MONEROX_WALLET=xxxx-xxx-xx-xxx-xxxxxx
MONEROX_CRON=*/1 * * * *

# WALLET RPC
WALLET_RPC_URL=http://xxxxxxxxx:38084
WALLET_RPC_USER=rpc_user
WALLET_RPC_PASSWORD=abc123

# MAIN wallet
WALLET_PATH=abc123
WALLET_PASSWORD=abc123
WALLETS_DIR=/Users/ceddy/xmr/xwallet

Backend structure

โ”œโ”€โ”€ README.md                             # README file
โ”œโ”€โ”€ .env                                  # Environment configuration
โ”œโ”€โ”€ .github                               # GitHub folder
โ”œโ”€โ”€ .vscode                               # VSCode configuration
โ”œโ”€โ”€ src                                   #
โ”‚   โ””โ”€โ”€ config                            # Config
โ”‚   โ”‚   โ”œโ”€โ”€ categories.ts                 # Site categories
โ”‚   โ”‚   โ”œโ”€โ”€ site.ts                       # Site settings, admin user, welcome message, e.t.c
โ”‚   โ””โ”€โ”€ feature                           # Feature e.g. auth, user, wallet
โ”‚   โ”‚   โ”œโ”€โ”€ feature.model.ts              # feature couchbase model / collection / table
โ”‚   โ”‚   โ”œโ”€โ”€ feature.methods.ts            # feature methods
โ”‚   โ”‚   โ”œโ”€โ”€ feature.resolver.ts           # feature graphql api resolver
โ””โ”€โ”€ tsconfig.json                         # TypeScript configuration

Backend customization

Use the src/config to set site settings, categories, admin user, welcome message

  • src/config/categories.ts: categories
  • src/config/site.ts: site settings configuration file, admin user, welcome message
  • .env: default environment variables

Sponsors

Add your logo here

SSLATT Tech

Algo Inc

sslatt-backend's People

Contributors

ceddybi avatar

Stargazers

 avatar

Watchers

 avatar Matthias Frener avatar

sslatt-backend's Issues

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.