Giter VIP home page Giter VIP logo

backend-boilerplate's Introduction

EOSCR Backend Boilerplate

N|Solid

JavaScript Style Guide GitHub GitHub repo size Twitter Follow GitHub forks

A highly scalable skeleton with best practices, ideal for backend projects quick start

Version

  • 0.1.0

Features!

This boilerplate features all the latest tools and practices in the industry

  • hasura Hasura GraphQL Engine is an opensource service that connects to your databases & microservices and auto-generates a production-ready GraphQL backend

  • hapi A back end service for custom busines logic integrated with hasura using actions

  • docker-compose Compose is a tool for defining and running multi-container Docker applications

File Structure

Within the download you'll find the following directories and files:

eoscrbackendboilerplate/
├── hasura
│ ├── migrations
│ └── config.ymal
├── hapi
│ ├── src
│ | ├── config
│ | ├── api
│ | ├── routes
│ | └── config.ymal
│ ├── .dockerignore
│ ├── .eslintrc
│ ├── .prettierrc
│ ├── Dockerfile
│ ├── yarn-lock.json
│ └── package.json
├── .env.example
├── .gitignore
├── docker-compose.yaml
├── .LICENSE
├── .prettierrc
├── Dockerfile
├── LICENSE
└── README.md

There are some important folders like

  • hapi/src/api should have all reusable code for example a code to generate tax invoice
  • hapi/src/routes this folder should only have the endpoint mapping and params validations and use functions from api folder to handle the business logic

Installation

Basic knowledge about Docker, Docker Compose and NodeJS is required.

Before to start

Somethings you need before getting started:

First time

  1. Clone this repo using git clone --depth=1 https://github.com/eoscostarica/backend-boilerplate.git <YOUR_PROJECT_NAME>
  2. Move to the appropriate directory: cd <YOUR_PROJECT_NAME>.
  3. Copy the .env.example then update the environment variables according to your needs
# global
STAGE=dev
APP_NAME=eoscr-backend-boilerplate

# wallet
WALLET_DATA=./wallet_data

# postgres
POSTGRES_USER=eoscr
POSTGRES_PASSWORD=password
POSTGRES_DB=localdb
POSTGRES_DATA=./db_data

# hasura
HASURA_GRAPHQL_ENABLE_CONSOLE=true
HASURA_GRAPHQL_DATABASE_URL=postgres://eoscr:password@postgres:5432/localdb
HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey
HASURA_GRAPHQL_UNAUTHORIZED_ROLE=guest

# hapi
HAPI_EOS_API_ENDPOINT=https://jungle2.eosio.cr
HAPI_EOS_API_CHAIN_ID=e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473
HAPI_EOS_BASE_ACCOUNT=baseaccount
HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW...
HAPI_EOS_WALLET_URL=http://wallet:8888
HAPI_HASURA_URL=http://hasura:8080/v1/graphql
HAPI_HASURA_ADMIN_SECRET=myadminsecretkey
HAPI_SERVER_PORT=9090
HAPI_SERVER_ADDRESS=hapi

Quick start

At this point you can run make run, you can check the services runing on:

License

MIT © EOS Costa Rica

Contributing

Please Read EOS Costa Rica's Open Source Contributing Guidelines.

Please report bugs big and small by opening an issue

Contributors

Thanks goes to these wonderful people (emoji key):

Xavier Fernandez
Xavier Fernandez

🤔📝📢🚇
Teto Gomez
Teto Gomez

🤔💻👀
Adriel Diaz
Rubén Abarca Navarro

📃💻😎
Adriel Diaz
Adriel Diaz

🏡💻❤️

This project follows the all-contributors specification. Contributions of any kind welcome!

About EOS Costa Rica


EOS Costa Rica is an independently-owned, self-funded, bare-metal Genesis block producer that provides stable and secure infrastructure for EOSIO blockchains. We support open source software for our community while offering enterprise solutions and custom smart contract development for our clients.

eoscostarica.io Support OpenSource!

backend-boilerplate's People

Contributors

adriexnet avatar code-factor avatar rubenabix avatar xavier506 avatar

Watchers

 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.