Giter Site home page Giter Site logo

mammates-be's Introduction

MamMates Backend Service

Backend service of seller and buyer app of MamMates.

Technology

  • Node.js (for Production)
  • Bun (for Development and package installer)
  • Nodemon (monitoring and hot reload)

Tools/Framework

  • Express (web server)
  • Sequelize (ORM)
  • JWT (access token)
  • Joi (request body validation)
  • ESLint for linting

Storage

  • MySQL
  • Cloud SQL for MySQL
  • Cloud Storage

Infrastructure

  • Google Cloud Platform

Folder Structure

.
├── src/
│   ├── controllers/
│   │   ├── index.js
│   │   ├── auth_controller.js
│   │   └── ...
│   ├── dto/
│   │   ├── request/
│   │   │   ├── index.js
│   │   │   ├── auth_dto.js
│   │   │   └── ...
│   │   └── response/
│   │       ├── index.js
│   │       ├── default_response.js
│   │       └── ...
│   ├── middlewares/
│   │   ├── index.js
│   │   └── jwt.js
│   ├── models/
│   │   ├── index.js
│   │   ├── create_master.js
│   │   ├── migrate.js
│   │   └── ...
│   ├── pkg/
│   │   ├── index.js
│   │   ├── orm.js
│   │   └── server.js
│   ├── routes/
│   │   ├── index.js
│   │   ├── auth_route.js
│   │   └── ...
│   ├── validators/
│   │   ├── index.js
│   │   ├── auth_validator.js
│   │   └── ...
│   └── app.js
├── .env
├── .eslintrc.json
├── .gitignore
└── package.json

Structure Explanation

  • src is the source of backend service
  • app.js on src is the entry point for the service
  • each components like middlewares or controllers have their own index.js as import/export module
  • create your own .env based on .env.example key provided

How to Install

  1. Clone this repo, cd to the cloned repo and checkout to dev
    git clone https://github.com/MamMates/mammates-be.git
    cd mammates-be
    git checkout dev
  2. Install dependencies
    npm install
    or
    bun install
  3. Create MySQL database named mammates
  4. Update your .env
  5. Uncomment await initialMigrate() and it's module import on src/app.js
  6. Run for the first time
    npm run dev
    or
    bun dev
  7. Recomment lines on 5th step

Script Available

  • start to start service on production
  • dev to start service on development
  • mon to start nodemon (hot reload)
  • lint to start ESLint check

Respose

{
    "status": true,
    "code": 200,
    "message": "get data success",
    "data": {
        "foods": {

        }
    }
}

mammates-be's People

Contributors

tudemaha avatar zeeetone avatar

Watchers

Putu Widyantara Artanta Wibawa 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.