Giter Site home page Giter Site logo

1backend / 1backend Goto Github PK

View Code? Open in Web Editor NEW
2.2K 43.0 89.0 4.22 MB

Run your web apps easily with a complete platform that you can install on any server. Build composable microservices and lambdas.

Home Page: https://1backend.com

License: Other

Shell 1.59% Go 34.26% Smarty 0.92% TypeScript 36.99% JavaScript 0.65% CSS 3.26% HTML 21.81% Dockerfile 0.53%
go golang paas typescript angular2 microservices redis mysql

1backend's Introduction

1Backend circleci status go report go coverage

1Backend is a platform designed to make deploying, running and maintaining lambda functions/microservices easy.

1backend service screenshot

It enables you to launch a new live app in seconds - after choosing your tech stack (e.g. Go with access to an SQL database) you get an empty app which is already live and callable from the outside (through HTTP).

You just have to plug in your own code (no, you don't have to write code in the browser). It's even pre-connected to your database and other infrastructure elements of your choosing.

With the help of a simple DSL, you can even define language-agnostic types and APIs for your services, which are used to generate type-safe clients. These clients are then published on each language's package manager (e.g. NPM).

Documentation

You can find the documentation here.

What's supported?

Languages

  • Go
  • JavaScript (Node.js)
  • TypeScript

Infrastructure

  • MySQL

Client library generation

  • Go
  • Angular: an NPM installable Angular service is generated and published on NPM if your service has type definitions.

What's the state of the project?

It's very early.

What's the tech used?

Angular 2, Go, MySQL, Redis.

What's happening?

For announcements please follow our twitter account.

How can I install it?

A simple one click/single command installation is coming soon, but in the mean time:

Frontend

If you have docker:

sudo docker run -p 4222:80 1backend/frontend

The above means on http://127.0.0.1:4222 you will have the 1backend app available, once the server is also running (see below).

Or if you want to hack on the Angular app:

npm install
npm start

Backend

You need two containers running on your box: a MySQL one and a Redis one. The 1backen flavoured MySQL one has the table schemas loaded into it (available in this file) already.

You can launch the complete sytem with 3 commands:

# Start mysql container. Comes with the database schema preloaded.
sudo docker run -e MYSQL_ROOT_PASSWORD=root -p=3306:3306 -d 1backend/mysql

# Start redis container.
sudo docker run -p=6379:6379 -d redis redis-server --appendonly yes

# Launch the 1backend server with the following command:
sudo docker run -e INTERNAL_IP=$(ip route get 8.8.8.8 | head -1 | cut -d' ' -f8) \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -p 8883:8883 1backend/server

The above does 3 things:

  • passes the host internal network ip as an envar to the container
  • mounts the docker socket

You can also mount a config file into the container under the path /var/1backend-config.json. We haven't talked about configuration, so let's do it now:

Configuration

The server container loads configuration from the location /var/1backend-config.json. Details of the config parameters are here.

A very basic and working example of such file would be:

{
   "SiteUrl": "http://127.0.0.1",
   "Path": "/go/src/github.com/1backend/1backend/backend",
}

This is the default config file if you don't mount a config file to run the 1backend server docker container.

Of course, there are more in depth things to consider...

API generation

Given services and endpoints have type information saved with them (can be set in the UI of each service), we generate client APIs for each service in a number of languages.

To do this we need integration with GitHub.

GitHub

To get the GitHub integration working, you need two things:

  • a user who can create repositories in your organisation (only possible through GitHub's HTTP API)
  • an SSH key on the machine and added to a users' GitHub account who can commit into said repositories (ssh-keygen -t rsa -b 4096 -C "[email protected]"; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa). This user must be the one who runs the server - likely root, since root is needed to access docker, unless you configure your machine otherwise.

1backend's People

Contributors

chocolateboy avatar crufter avatar davidcsikai94 avatar dobika avatar drace12 avatar viktorsmari avatar vvik91 avatar zoliii1995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

1backend's Issues

Implement a cli to enable project import and export between 1Backend installations.

To solve the problem of moving a service from one 1Backend installation to an other (for example in my case the live one and the local one), we could implement a command line interface.

Proposed features:

  • login
  • import project from folder
  • export project to folder

For export import we would need a nice way to represent a service: something like a yaml config file.

Register func is fowarding the call :9993

It is not possible to register because the call to your backend fails
Host: 1backend.com:9993
OPTIONS Call:
HTTP/1.1 504 Gateway Time-out 'Access-Control-Allow-Origin'
is missing

Implement secrets

Open source services might still need a way to hide some information from the public - imagine an email sending service that has a private API key for example.

Create a configuration page for admins

... and create admins.

Idea: if there are no users, redirect the user to a configure page that helps to set up and install 1backend on the server and enables you to configure it, and register the first user, who is an admin.

Email spamming to promote your project

Hi. I realize everyone here is excited about this open source project however promotion by spamming is unprofessional and makes people less likely to trust your project in the future. Consider rethinking your marketing strategy?

Email Headers and Source

Return-Path: <[email protected]> 
X-Original-To: x 
Delivered-To: x 
Received: from o50316379.outbound-mail.sendgrid.net (o50316379.outbound-mail.sendgrid.net 
[50.31.63.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) 
(No client certificate requested) by mail7i.protonmail.ch (Postfix) with ESMTPS id 
843DF92 for <x>; Sun, 11 Mar 2018 15:32:00 -0400 (EDT) 
Received: by filter0017p3las1.sendgrid.net with SMTP id filter0017p3las1-4818-5AA5842E-38 
       2018-03-11 19:31:58.762304833 +0000 UTC 
Received: from NTM0ODQ1Nw (cpc1-finc17-2-0-cust2034.4-2.cable.virginm.net 
[82.19.231.243]) by ismtpd0001p1lon1.sendgrid.net (SG) with HTTP id 
JQ2kbhuGTxeC1ttDnlxu9Q Sun, 11 Mar 2018 19:31:58.672 +0000 (UTC) 
Authentication-Results: mail7i.protonmail.ch; dmarc=fail (p=none dis=none) 
header.from=gmail.com 
Authentication-Results: mail7i.protonmail.ch; spf=pass 
smtp.mailfrom=bounces+5348457-b3e7-nathanielsuchy=protonmail.com@sendgrid.net 
Authentication-Results: mail7i.protonmail.ch; dkim=pass (1024-bit key) 
header.d=sendgrid.net [email protected] header.b="ufTzeHeP" 
Dkim-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.net; 
 h=from:mime-version:to:content-type:subject; s=smtpapi; 
 bh=GW5QtMCknNLMqirGGSsSF7RKWQU=; b=ufTzeHePaPeiJZ7PrNmgHfjUGtGyn 
sYMXOQ8RT8QE7eC/UMPBv+5Mhl5TmeSnfp3P1WkzElk7+CrklcDYovfbdn2x7ev0 
wgtg+v2uqLvOoRtzM89365PbPi5vDKpwwwg7PImsSs/p5jqSkMxqhpUNzNTL/oAR NDYNqlE44E/+Kc= 
Date: Sun, 11 Mar 2018 19:31:58 +0000 (UTC) 
From: "Janos Dobronszki" <[email protected]> 
Mime-Version: 1.0 
To: Nathaniel x <x> 
Message-Id: <[email protected]> 
Content-Type: text/html 
Subject: Nathaniel Suchy, what's your opinion about this serverless platform? 
X-Sg-Eid: wytieum2Fz3a9LM2bv+fJyi6CUr2PY5jmUvYbL14/4nMGo33RPoOD5xl+l76xU9qXwAtOzsBSINP5E 
8LO/I/yVF05VuPLoz7D/FT7gRY9zHlXi7SvOq7Kf6jhYcnwkl5dgwBVaucIT4t2V/71u01y0es7Pdh 
aINKONgCBHqFqvKmchxr59HTNpyvdJPFqlNjwRWD+cWbK4Y//Vhd1s5irQT8SPCBdj6V1RLSqOjjkN 
muF4J/NWB0AmKoMHqwXHY6 
X-Spam-Flag: YES 
X-Spam-Status: Yes, score=6.5 required=4.0 tests=DKIM_ADSP_CUSTOM_MED, 
DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 
HEADER_FROM_DIFFERENT_DOMAINS,HTML_IMAGE_ONLY_16,HTML_MESSAGE, 
HTTPS_HTTP_MISMATCH,NML_ADSP_CUSTOM_MED,SPF_PASS,T_REMOTE_IMAGE, 
T_RP_MATCHES_RCVD,URIBL_GREY autolearn=no autolearn_force=no version=3.4.0 
X-Spam-Report: * 
 2.0 URIBL_GREY Contains an URL listed in the URIBL * 
     [URIs: sendgrid.net] * 
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * 
     (dobronszki[at]gmail.com) * 
 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is * 
     CUSTOM_MED * 
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail * 
     domains are different * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches 
handover relay * 
     domain * -0.0 SPF_PASS SPF: sender matches SPF record * 
 2.0 HTTPS_HTTP_MISMATCH BODY: No description available. * 
 0.0 HTML_MESSAGE BODY: HTML included in message * 
 1.1 HTML_IMAGE_ONLY_16 BODY: HTML: images with 1200-1600 bytes of words * 
 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * 
     valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and * 
     EnvelopeFrom freemail headers are different * 
 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list * 
 0.0 T_REMOTE_IMAGE Message contains an external image 
X-Spam-Level: ****** 
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on maili.protonmail.ch 
X-Pm-Origin: external 
X-Pm-Content-Encryption: on-delivery 
X-Pm-Transfer-Encryption: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) 

<p>Hi Nathaniel Suchy,</p> 
<p>I've seen you are into serverless computing. There's a tool we have built in that space and would like to get your opinion: <a href="https://u5348457.ct.sendgrid.net/wf/click?upn=S5y7k-2BNwbo2-2BjAo4LAeE7M40grXbVvTncAJ7jV5goCFM1Zok4JZW9ibniv6UnKNb_mJ2vvicTuK2lzdbeKkJ1BXM-2F0MZtLio0GJc2tLaJXaDtL1rvejhBYm2Qy70Q-2FCeFLDk-2Bibsfzo7Z88BBBPMklAQXuCotuKCZiSkcg5HhWAt-2B7-2B1nmV0xbmuPAhW1AeEHpps0Pcs6AsAFjLTdkjOONbYnAOyf6x4YLXjz1A4JlsRYvpZYBn-2B54kF-2Bj1q5L7pcBPLV9Tc4Yd-2Fhqm4oLKt-2BwbwQdQT-2BCQEZHZd2I7wfe-2Fs-3D">https://github.com/1backend/1backend</a></p> 
<p>It's like GitHub but instead of social coding it's social serverless application building :).</p> 
<p>What do you think?</p> 
<p>Cheers Janos</p> 

<img style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" border="0" height="1" width="1" alt="" src="https://u5348457.ct.sendgrid.net/wf/open?upn=mJ2vvicTuK2lzdbeKkJ1BXM-2F0MZtLio0GJc2tLaJXaDtL1rvejhBYm2Qy70Q-2FCeFLDk-2Bibsfzo7Z88BBBPMklMv681wICzfEtHlEuzda3pyfxec-2FOUYk0TM-2B2Br-2BNINLhmHePoEZwJGuQxcv4RJj0-2BUICSuYkrkDKuId-2BI7tcBYSXoE4dsZZLHxOMhayk3jFs5TLswjg5TWOLLrHuz1b-2FROZKZynz35DUqMEGiHKSCk-3D"> 

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.