Giter VIP home page Giter VIP logo

location-based-searcher's Introduction

Company anniversary

Service description?

Company celebrates its company anniversary and wants to invite all customers located within a 100km radius. This repository hosts a solution implemented to meet the requirements of Parloa's anniversary application

Prerequisites:

NPM 14.X

Docker

docker-compose

helm -for production

skaffold -for production

minikube (or any other kubernetes cluster) -for production


Clone

git clone https://gitlab.com/moeidtopcoder2/parloa.git
cd parloa

Project Documentation project-documentation.md


Hierarchy

├── k8s

│ └── templates

│ └── tests

├── scripts

├── src

│ ├── application

│ │ ├── controllers

│ │ └── dtos

│ ├── domain

│ │ ├── decorators

│ │ ├── entities

│ │ ├── enums

│ │ │ └── httpResponse

│ │ ├── exceptions

│ │ ├── guards

│ │ ├── helpers

│ │ ├── interceptors

│ │ ├── interfaces

│ │ ├── modules

│ │ │ └── common

│ │ ├── pipes

│ │ └── services

│ │ └── repositories

│ │ └── common

│ └── infrastructure

│ ├── config

│ └── modules

│ └── common

└── __test__

├── controllers

├── e2e

├── factories

└── service

Instllation

cd scripts

bash start.h {argument}

Arguments:

bash start.h -h



-h, --help Print this help and exit

-build_docker Build the docker image called "invitation:latest"

-build_and_run_docker Build the docker image and run on local machine

-stop_docker Stop running docker container named "invitation"

-run_app Run application with npm in usual way for development

-run_test Run npm test

-run_lint Run npm lint

-generate_doc Generate the code documentation

-deploy_on_kubernetes you need to have a kubernetes cluster already up and running on the machine.

Run without script

npm install

npm start

Run the tests

npm test

linting

npm run lint

generate documentation

npm run doc

running on

http://localhost:7000


Build docker image

docker build . -t {image-name}

.env

NODE_ENV={production|development}

NODE_PORT={port-number}

PARLOA_LAT={parloa (default is 52.493256)}
PARLOA_LONG={parloa (default is 52.493256)}

Run in Browser

http://localhost:{port-number}/api/v1/invitation/customers?radius={radius}&page={page_number_}&limit={limit_number}


API documentation

http://localhost:{port-number}/api


Health check

http://localhost:{port-number}/health


Deploy to kubernetes

through Makefile

make

through config files

cd k8s/configFiles
kubectl apply -f invitation-namespace.yaml,invitation-configmap.yaml,invitation-configmap.yaml,invitation-deployment.yaml,invitation-service.yaml

Prometheus metrics

http://localhost:{port-number}/metrics

location-based-searcher's People

Contributors

moeidheidari avatar

Stargazers

 avatar  avatar

Watchers

 avatar

location-based-searcher's Issues

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.