Giter Site home page Giter Site logo

simple-ecommerce-koa-server's Introduction

CI/CD Pipeline codecov

simple-ecommerce-koa-server

Project setup

  • Make sure node version is 16
  • $ npm install

Run

  • $ npm run start

Tests

  • $ npm run test

Development

  • $ npm run start
  • $ npm run dev for hot reloading

Config

By default, without any code customization, the app will start with sqlite connection, but we can customize by creating local.js

module.exports = {
  Db: {
    // url: 'mysql://user:pass@localhost/dbname',
    // dialect: 'mysql',
    // url: 'postgres://user:pass@localhost/dbname',
    // dialect: 'postgres',
    url: 'sqlite:db.sqlite',
    dialect: 'sqlite',
    }
  }

What is included

  • RESTful products crud with serving product images
  • User register/login with JWT
  • Validation with Joi
  • Refreshing token mechanism
  • Architectural designs: "Model-Controller API", "Layered" and "Modular" Architectures
  • Single point of app configuration management with Node Config that supports different environments
  • Autoload for app models and controllers (Routers). Check db-loader.js and router-loader.js
  • Basic role-based authorization
  • App errors lib/errors for better error control
  • App and db loggers
  • Consistent response interface { status, messages, validationErrors, data }. Check lib/response/result.js
  • Storage provider pattern lib/storage to easily implement more providers like AWS S3
  • Unit tests with Jest. Ex: product-service.test.js and user-service.test.js
  • Integration test with Jest and Supertest. Ex: product-router.test.js
  • Coverage with Codecov
  • Linters
  • Semantic releasing to manage package versions, releasing, and generate changelog documentation
  • CICD Pipeline with GitHub actions. It checks npm audit, lint, run tests, upload to Codecov, deploy, and semantic release
  • Conventional commit messages with Git-cz and Husky

Live

Frontend Vue repository

https://github.com/m0uneer/vue-simple-ecommerce-app

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.