Giter Site home page Giter Site logo

labpro_singleservicebe's Introduction

Seleksi Asisten Labpro - Single Service Backend

Author

Antonio Natthan Krishna - 13521162

How to Run The Program

  1. Clone this repository
git clone https://github.com/natthankrish/Labpro_SingleServiceBE.git
  1. Change the current directory to Labpro_SingleServiceBE folder
cd Labpro_SingleServiceBE
  1. Build and run the container
    Your app should be running at port :80 or just simply open localhost
docker-compose up --build

Config

Aplikasi akan berjalan pada port 3000 dengan database pada port 5432. Database yang digunakan PostgreSQL.

Design Patterns

  1. Template Method Pattern
    BarangAgent dan PerusahaanAgent merupakan template method yang dibutuhkan oleh fungsi fungsi controller. Fungsi controller akan memanggil template function pada BarangAgent dan PerusahaanAgent sesuai dengan karakteristik yang dibutuhkannya. Pembangunan BarangAgent dan PerusahaanAgent didasarkan pada entitas Barang dan Perusahaan yang menjadi struktur dari tabel.

  2. Mediator
    Folder Agent berisikan mediator antara Folder Entitas dan Folder Controller. Hal ini dimaksudkan agar controller tidak secara langsung menyentuh database melainkan dengan pertolongan agent yang memegang kendali atas entitas entitas pada folder Entity

  3. Composite
    Function routes terdiri atas repository user, barang, dan perusahaan yang dibangun SATU KALI selama berjalannya aplikasi. Fungsi lain yang memerlukan repository tersebut mendapat data melalui passing parameter dari function routes.

Tech Stack

PostgreSQL, ExpressJS

SOLID

  1. Single Responsibility Principle
    Setiap kebutuhan sudah dipecah menjadi fungsi fungsi yang hanya memiliki SATU tujuan. Sehingga, tidak terdapat fungsi dan entitas yang menangani dua hal sekaligus.

  2. Open Closed Principle
    Apabila diperlukan penambahan route maka dapat dibuat controller baru yang sesuai TANPA mengubah agent yang sudah ada. Apabila sebaliknya terdapat perubahan algoritma pada agent, maka kita tidak perlu merubah apapun yang ada pada controller.

  3. Liskov Substitution Principle
    Tidak ada inheritence yang digunakan dalam repository ini.

  4. Interface Segregation
    Setiap controller dan agent dibangun berdasarkan entitas yang ditanganinya.

  5. Dependency Injection
    Tidak ada penggunaan dependency injection dalam repository ini.

labpro_singleservicebe's People

Contributors

natthankrish 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.