Git Product home page Git Product logo

package-express's Introduction

Express Application

This application provides an API (Application Programming Interface) to deliver packages.

Note please pay attention that because of the lake of time I did not use transactions explicitly when storing the partners data in the system, but I have done such things in my other project's before, therefore if you wish to see how I would done it you can check this OrderRepository file from my coffee shop project which is publicly available to see.

Index

Structure

The project structure is as bellow

  • .assets The assets of the readme file are placed here
  • .web The nginx configurations are placed here
  • .backend The backend application configurations are placed here
  • backend The backend application itself is placed here
  • .gitignore The assets that should be ignored by git
  • docker-compose.yml docker compose configuration
  • Makefile This file is here to help working with the project

Requirements

You need docker and docker-compose in order to run this application. If you don't have make on your operating system for running the application, you need to read Makefile and do as up method says, otherwise you just need to follow Running section.

Caution your operating system's user needs to be able to run docker without requiring the sudo prefix.

Usage

In this section working with the application is described.

Quick start

You can quickly start assemble all the application requirements by running this command.

make up assemble

Run Application

For running application you need to execute up method using make command like bellow:

make up

Assemble

You can have a quick start by running bellow command.

make assemble

This command will install required packages for you and prepares the application and the database for you to start.

Status

If you need to check the project's container states, you can do so by one of the bellow commands.

make ps
make status

Down

You can stop the project using bellow command.

make down

Destroy

If you wish to destroy the project's allocated volumes and containers you can do so like this.

make destroy

Tests

You can run tests outside the application's container by make tool using bellow command.

make test

Coverage Report

You can get a nice test coverage report from the PHPUnit by running this command.

make coverage

This command will create a coverage folder under ./backend/tests/.coverage folder for you, and then you can open index.html file in the .coverage folder so you can visually see the test covered parts of the project.

Diagram

Caution the diagram is showing full picture of the database design that is supposed to be but for the sake of YAGNI only the parts that were using got implemented.

The reason that I have implemented the address with a free type is if in future there be any need to change the address of the partner from point to for example a multipoint the relations be correct. and using the polymorphic relation the type of the field can you restored again.

Database diagram

Postman

You can check the generated collection for this application by importing this postman collection into postman.

package-express's People

Contributors

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