Coder Social home page Coder Social logo

cloudboost / cloudboost Goto Github PK

View Code? Open in Web Editor NEW
1.4K 51.0 195.0 65.27 MB

Realtime JavaScript Backend.

Home Page: https://www.cloudboost.io

License: Apache License 2.0

JavaScript 74.56% HTML 7.01% CSS 10.53% Dockerfile 0.05% SCSS 1.95% EJS 5.90%
backend-services api cloud-platform baas backend-as-a-service backendless realtime realtime-database search storage-api

cloudboost's Introduction

Build Status OpenCollective

CloudBoost is the complete cloud platform for your app. Think of CloudBoost as Parse + Firebase + Algolia + Iron.io all combined into one :

  • Data-Storage / JSON Storage / BLOB Storage
  • 100% data ownership
  • Realtime
  • Search
  • More - ACL's, User Authentication, and more.

CloudBoost also has a managed service, so you don't have to install or configure anything. You can sign up for the managed service here.

Deploy with Docker (recommended)

You can install CloudBoost anywhere you like. We have a Docker Compose file that can help you get started with CloudBoost in few minutes and with just one command. You can use this compose file to install the service locally on your local dev machine, or you can install the service to Azure, AWS, DigitalOcean, Softlayer, Packet and more.

Check out our Docker Compose file here.

Running the server without Docker

Important: Before you begin you need to install MongoDB 3.4 and Redis 3.0 on your machine to run this project.

Step 1 : Git clone the project.

git clone https://github.com/CloudBoost/cloudboost.git

Step 2 : Change directory to CloudBoost.

cd cloudboost

Step 3 : NPM Install.

npm install

Note : NPM requires NodeJS to be installed on your machine. If you don't have NodeJS, you need to install it from here : https://nodejs.org/en/download/

Step 4 : Edit cloudboost.json.

Create a config folder in project root if it does not exist. You need to create a new file cloudboost.json under config folder and save that file with MongoDB and Redis configuration. Here's a sample file :

{
 "mongo" : [{
   "host" : "localhost",
   "port" : "27017"
 }],
 "redis" : [{
       "host" : "127.0.0.1",
       "port" : 6379       
   }]
}

Step 5 : Edit smtp.json.

In the config folder. Creare a new file called smtp.json. You need to create an account at MailGun (https://www.mailgun.com/) and get an API Key. This will help CloudBoost to send emails on your behalf. Here's a quick example :

{
  "provider"  : "mailgun",		
  "apiKey"    : "XXXXXXXXXXXXXXXXXXXXXXX",
  "domain"    : "cloudboost.io",
  "fromEmail" : "[email protected]",
  "fromName"  : "CloudBoost.io"  
}

Step 6 : Enable HTTPS. (Optional)

If you want to enable HTTPS, place your certificate file cert.crt and key key.key in the config folder.

Step 7 : Run the server.

Make sure both Redis and MongoDB are running and then run the CloudBoost server

node server.js

Once the server is running. You'll see the ClusterKey and SecureKey on the console which means you've successfully started CloudBoost. If you don't see any of these keys, please raise a GitHub issue and let us know.

Once the server is running, You can

Once started, you'll see the CloudBoost Secure Key on the console. This is important, Please save it for future use. Secure Key helps you create / delete apps.

Create an app

To create an app, You need to :

        REQUEST TYPE : POST
        URL : <YOUR_SERVER_URL>/app/<APP ID>
        REQUEST BODY :
        {
            secureKey : YOUR_SECURE_KEY
        }

For Example (in curl) :

curl -H "Content-Type: application/json" -X POST -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1

Creating a table

Table lets you store any structured data in your app. To create one, check this documentation out.

Delete an app

To delete an app, You need to :

        REQUEST TYPE : DELETE
        URL : <YOUR_SERVER_URL>/app/<APP ID>
        REQUEST BODY :
        {
            secureKey : YOUR_SECURE_KEY
        }

For Example (in curl) :

        curl -H "Content-Type: application/json" -X DELETE -d '{"secureKey":"xxxxxx-yyyy-xxxx-yyyyy-xxx"}' http://localhost:4730/app/app1

Once your app is ready, You can then get the latest SDK from https://tutorials.cloudboost.io. Remember to save the SDK in your project. and You can then init your app by :

CB.CloudApp.init('Your Server URL', 'Your App ID', 'Your App Key');

You can then follow rest of the documentation from https://tutorials.cloudboost.io. You can also check out API Reference on https://docs.cloudboost.io

JavaScript SDK

JavaScript SDK can be found in the sdk folder of this repo.

NPM Installation

npm install cloudboost

NodeJS Usage

var CB = require('cloudboost');

Bower Installation

bower install cloudboost

JavaScript Usage

<script src="bower_components/cloudboost/dist/cloudboost.js"></script>

Module Bundlers

// For ES6/ES7 , TypeScript(typings included)
import * as CB from 'cloudboost';

//For ES5 (requireJs)
var CB = require('cloudboost');

Sample Code

// AppID and AppKey are your App ID and key of the application created in CloudBoost Dashboard.

//Init your Application
CB.CloudApp.init('YourAppId','YourAppKey');

//Data Storage : Create a CloudObject of type 'Custom' (Note: You need to create a table 'Custom' on CloudBoost Dashboard)

var obj = new CB.CloudObject('Custom');

//Set the property 'name' (Note: Create a column 'name' of type text on CloudBoost Dashboard)
obj.set('name','CloudBoost');

//Save the object
obj.save({
    success:function(res){
        console.log("object saved successfully");
    },
    error:function(err){
        console.log("error while saving object");
    }
});

Cluster Maintenance, Scale, and Updates

CloudBoost runs on MongoDB and Redis. You're responsible for managing the uptime, replication, sharding, backups of your data in each of these databases.

You also need to update CloudBoost with every new release and you need to configure your server to auto-scale it. If you're using Docker, the image is released at the latest tag and you need to check for new releases atleast once a month.

Using our hosted and managed service helps you to save time, development costs, and eliminates managing your own cluster of servers which is cheaper long-term. We recommend using the hosted service if you're running production apps.

App Settings

To read more about app settings, check Click here

Support

Contributing

Pull requests are very welcome!

We'd love to hear your feedback and suggestions in the issue tracker.

LICENSE

Copyright 2020 HackerBay, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cloudboost's People

Contributors

admincloudboost avatar andyrocks16 avatar bryant1410 avatar gtmsingh avatar jason-cooke avatar jignesh248 avatar kashishchakarvarti avatar naaman-saif avatar nawazdhandala avatar otseobande avatar piamancini avatar prabhjotsumman avatar ramakanthreddyl avatar ritishgumber avatar rravithejareddy avatar rtbathula avatar sauban avatar shubhamqweasd avatar simlarsen avatar snyk-bot avatar utkarshpramodgupta avatar yusadolat 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudboost's Issues

JS Client init CORS error

A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute

Please help me i am unable to CB.CloudApp.init call this function

PS: I am totally newbie.

Multiple push certificates per app

Push configuration
Basically a set of iOS/Android/Windows certificates and keys under a common name given by the developer.
Multiple configurations per app.
When sending notifications from client, an array of configuration ids to use for the specific notification

Duplicate CloudObjects in List

i added 2 same cloudObjects in list.

and after when i form normal Find Query,
cloudObject is returning TWO same records in the LIST

Dashboard

how to go to the dashboard??.. for docker installation.... how can i create apps in dashboard?

MandrillApp bridge

It would be nice to provide a bridge to send emails using Cloudboost api. For example (javascript):

CB.Mandrill.send(templateName, tos, vars)

Now that mandrill api key can be configured in dashboard, my client app don't need to know anything about mandrill.

With a good documentation of how to use send() method, it could be a nice feature.

Thanks!

Reg Search and Query: how to search on relations

One of my object is having field which has relation of other object. So when I want to make search on that field how should I search as in that field I will just have IDs

with this : query.equalTo('obj.relatedProp","value"); I can only search on obj._id

I also want to make search on obj.name

Please help me with this

Signup confirmation for user

Actually we have to implement an in-house mechanism to send email confirmation for user signup. Would be nice to have in right in CB.

  1. After signup the user record is in unconfirmed state
  2. A mail (customizable in CB dashboard) is automatically sent to the user email
  3. The user select a confirmation like that opens a default or a customized URL (this step is very important)
  4. The user state become confirmed

Some notes:
During unconfirmed state the user should be able to login. Is up to the app to determine that and behave the desired way. This is important because some system force the user to login after confirmation and that's not always a good experience.

In regard to point 3, the default could just point to a confirmation web page, stating that the account is confirmed. The custom url could have a custom schema or a deep link in order to open directly the client app.

Contributor request

Using cloudboost from last week, impressed by the architecture. wanna know contributing guidelines.

Multiple versions of an app

To allow developers to work on future or customized versions of the same app. Each version with staging/production modes (see other enhancement request).

Delete operations reject request body

I have observed this issue with common Java http-client libraries. When the http method is delete, then a request body is not expected and an error is thrown when there is one. Am not sure at all about other programming languages but I think the issue cuts across.
All *CloudBoost * delete APIs pass critical data in the request body by design. Can something be done about this on the backend?

Table schema editor

As an alternativa to the actual grid, useful for browsing but not for structuring, the possibility to have schema-only vision:

property name, type, options
property name, type, options
property name, type, options

  • add property

Standalone Install Guide

Hello, I've been evaluating many open source backends to 'package' a parse replacement and would like to look at cloudboost but cannot find....anywhere....standalone installation instructions. Docker is cool and all but not a be-all, end-all.

I see NPM and BOWER install packages but nothing on server/redis/mongo configurations...

Gotta move on for now hoping for a positive replay so I can come back and give your backend a look.

API findById not fetching List of files

My query is this

var query = new CB.CloudQuery(table.name);

  for(var i=0;i<table.columns.length;++i){

   if(table.columns[i].dataType=="List" && table.columns[i].document.relatedTo=='File'){          
      query.include(table.columns[i].name);
    }
  }

  query.findById(objectId,{
  success : function(record){ 
    q.resolve(record);                 

  }, error : function(error){                
    q.reject(error);
  }});

CloudQuery orderBy issue when lowercase/uppercase

I have got a list of elements with a column "title" of type text. When ordering these elements by title, treats different titles starting by uppercase than lowercase. Here is an example:

I have got this list:

Lemon, Apple, avocado, Banana

The expected result of CloudQuery.orderByAsc('title') is:

Apple, avocado, Banana, Lemon

But the result is:

Apple, Banana, Lemon, avocado

Thanks!

Expires is not working

When i set expires date to future, it(CloudObject) is expiring immediately.
Although i am doubtful about present,past dates as well

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.