Coder Social home page Coder Social logo

backend.php's Introduction

Platform Backend

Drone (cloud)

Introduction

Every microservice architecture must have a glue and its our glue for I1820 Platform. This service handles authentication, authorization, and acts as a proxy between frontend and other services. It also caches the additional information about projects and things.

Up and Running

Let's up and run this piece of shit on ubuntu 18.04 with nginx. First of all you must install the php.

sudo apt install curl php-cli php-mbstring git unzip
sudo apt install php-fpm php-pear php-dev
sudo apt install php-curl

Then you must install the php composer for php package management.

curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm composer-setup.php

Almost Done! Install the mongodb extension for php with the following command.

sudo pecl install mongodb
# remember to enable mongodb extension on php.ini [extension=mongodb.so]

You have the php environment so let's run this shit and its requirements!

docker-compose up -d
composer install
php artisan key:generate
php artisan config:cache
php artisan jwt:secret

# setup database
php artisan migrate:fresh
php artisan db:seed

# setup the loraserver.io as a lora connectivity
php artisan loraserver:setup

php artisan serve --host=0.0.0.0 --port=7070

Errors Numbers

sjd-backend returns the following error codes with HTTP 200 OK:

  • 701 UnAuthorized
  • 704 Not Found
  • 706 Already Existed
  • 707 Validation Error

backend.php's People

Contributors

sajjadrahnama avatar 1995parham avatar samanfekri avatar mmdaz avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar sepehr sabour avatar Bahador Bakhshi avatar

Forkers

makhshari mmdaz

backend.php's Issues

Production with Docker

Create a specific Dockerfile for using in production. I think this link could help us in this dark and scary way.

Packages

Corrects packages informations

Thing Remove

Remove thing from its project then delete it. it is supported in the tm service.

Thing Show/List

Provide information about the thing last seen and more in thing show API and do not return them in thing listing to improve performance.

Migration

Add database migration for collection indexes. This could help.

Jobs

Use queue and jobs to handle the time-consuming works like sending an email

ABP support

Adds following parameters:

  • AppSKey
  • NetSKey
  • DeviceAddr

Aliasing

There is a great performance degradation when the ThingController loop over all collected data so this phase must remove.

loraserver.io Thing Name

loraserver.io thing's names must not have any space so we cannot just pass the user entered name into loraserver.io

Project/Thing Not Found

Return related error when the given thing or project is not available instead of crashing by 500.

LoRa Application

There is no point in building an application for each project in loraserver.io.
This causes a heavy load on the backend and providing nothing.

Better Registeration

Send activation links to users with the notification system and generate links as singed URL. This article may help a lot about this.

Project Perimeter

Users can define perimeter for their project as a polygon using the geojson and store them. This perimeter will be shown on the project management page and their things will be there too.

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.