Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes

Space Cloud

Develop, Deploy and Secure Serverless Apps on Kubernetes.

WebsiteDocsSupport


Go Report Card Apache License

Space Cloud is a Kubernetes based serverless platform that provides instant, realtime APIs on any database, with event triggers and unified APIs for your custom business logic.

Space Cloud helps you build modern applications without having to write any backend code in most cases.

It provides GraphQL and REST APIs which can be consumed directly by your frontend in a secure manner.

Features

View complete feature set here.

  • Powerful CRUD: Flexible queries, transactions, aggregations and cross-database joins
  • Realtime: Make live queries to your database
  • File storage: Upload/download files to scalable file stores (e.g., Amazon S3, Google Cloud Storage)
  • Extensible: Unified APIs for your custom HTTP services
  • Event-driven: Trigger webhooks or serverless functions on database or file storage events
  • Fine-grained access control: Dynamic access control that integrates with your auth system (e.g., auth0, firebase-auth)
  • Scalable: Written in Golang, it follows cloud-native practices and scales horizontally
  • Service Mesh: Get all the capabilities of a service mesh without having to learn any of that!
  • Scale down to zero: Auto scale your http workloads including scaling down to zero

Supported databases ❤️ :

  • MongoDB
  • PostgreSQL and PostgreSQL compatible databases (For eg. CockroachDB, Yugabyte, etc.)
  • MySQL and MySQL compatible databases (For eg. TiDB, MariaDB, etc.)
  • SQL Server

Table of Contents

Quick start

If you are new to Space Cloud, we strongly recommend following our step-by-step guide to get started

Other guides

View the installation guides for Docker and Kubernetes.

Client-side tooling

Space Cloud exposes GraphQL and REST APIs. See setting up project guide to choose a client and set it up.

GraphQL APIs

GraphQL is the recommended way to use Space cloud, and it works with any GraphQL client. However, we recommend using Apollo Client. See awesome-graphql for a list of clients.

REST APIs

You can use the REST APIs of Space Cloud if you are more comfortable with REST.

To make it easy to consume the REST APIs in web projects, we have created a Javascript SDK for you.

How it works

Space Cloud is meant to replace any backend php, nodejs, java code you may write to create your endpoints. Instead, it exposes your database over an external API that can be consumed directly from the frontend. In other words, it allows clients to fire database queries directly.

However, it's important to note that the client does not send database (SQL) queries to Space Cloud. Instead, it sends an object describing the query to be executed. This object is first validated by Space Cloud (using security rules). Once the client is authorized to make the request, a database query is dynamically generated and executed. The results are sent directly to the concerned client.

We understand that not every app can be built using only CRUD operations. Sometimes it's necessary to write business logic. For such cases, Space Cloud allows you to access your custom HTTP servers via the same consistent APIs of Space Cloud. In this scenario, Space Cloud acts merely as an API gateway between your services and the client. However, the cool part is that you can even perform joins on your microservices and database via the GraphQL API of Space Cloud

Detailed Space Cloud architecture

Space Cloud integrates with Kubernetes and Istio natively to bring to you a highly scalable Serverless Platform. It encrypts all traffic by default and lets you describe communication policies to protect your microservices.

With that, it also provides autoscaling functionality out of the box including scaling down to zero

Support & Troubleshooting

The documentation and community should help you troubleshoot most issues. If you have encountered a bug or need to get in touch with us, you can contact us using one of the following channels:

Contributing

Space Cloud is a young project. We'd love to have you onboard if you wish to contribute. To help you get started, here are a few areas you can help us with:

  • Writing the documentation
  • Making sample apps in React, Angular, Android, and any other frontend tech you can think of
  • Deciding the road map of the project
  • Creating issues for any bugs you find
  • And of course, with code for bug fixes and new enhancements

License

Space Cloud is Apache 2.0 licensed.

Comments
  • Add check for valid email

    Add check for valid email

    When signing up a user the validity of the email address should be checked by sending an email with a confirmation-URL. Also one should be able to set if a user with an unconfirmed email is allowed to sign in.

  • Request to allow hosting static files.

    Request to allow hosting static files.

    It would be really useful if space-cloud allowed the user to host static files as well. Adding this feature will definitely help space-cloud lift up above the others.

  • The download config file steps in the quick start guide leads to errors

    The download config file steps in the quick start guide leads to errors

    I've heard quite a few people having troubles with downloading the config file step. Apparently copying and pasting the config directly in a file doesn't work.

    @KhushalPShah faced the same issue I guess.

  • unsafe password handling

    unsafe password handling

    actual plaintext passwords being sent in user management, really unsafe thing to do. Standard way is to salt the passwords and the compare the hashes, not plain text passwords

  • Need to improve the docs and quick start

    Need to improve the docs and quick start

    The docs are not good enough. People new to the project won't be able to understand its aim and where it fits. Also the quick start seems to be a bit scattered and doesn't paint a clear picture regarding what it does.

  • Rework the role-model for the auth-module

    Rework the role-model for the auth-module

    The problem faced currently?

    The client can set the role when creating an user. This is a security issue, especially when the role is used for authorization rules in the config file.

    How can we solve it?

    Rework the role-model so that no unauthorized and no unauthenticated entity can change the role of a user.

    If you want this feature to be implemented, give it a thumbs up reaction, so that we can determine which features are important to you. 👍

  • Implement web/REST based admin ui

    Implement web/REST based admin ui

    The problem faced currently?

    • Managing users can only be done from DB client(not really sexy) or frontend client(needs work before being able to do so).
    • Dealing with security rules can be tricky when they grow and become huge

    How can we solve it?

    Implement web admin interface with the following features

    • [ ] manage users (CRUD)
    • [ ] manage collections / db (import / export)
    • [ ] rules generator (and why not live update config with generated data)
  • db.liveQuery(...).where(condition).subscribe(onSnapshot, onError) - onSnapshot not called for deletes

    db.liveQuery(...).where(condition).subscribe(onSnapshot, onError) - onSnapshot not called for deletes

    Expected: onSnapshot to be called when db.delete(...) is called

    Actual: Document(s) are deleted but onSnapshot is not called

    delete

    removeTodo(id) {
        db.delete('todos').where(and(cond('id', '==', id))).one().then(res => {
            if (res.status !== 200) {
                console.log('Delete Failed:', res)
            }
    
        }).catch(ex => {
            // Exception occured while processing request
            console.log('Delete Exception:', ex)
        });
    }
    

    subscription

    componentDidMount() {
        // Get user id from local storage
        const userId = localStorage.getItem('userId')
    
        const onSnapshot = (docs, type) => {
            console.log('onSnapshot > docs', docs)
            this.setState({todos: docs}, () => {
                console.log('onSnapshot > setState > this.state.todos', this.state.todos)
            })
        }
        const onError = (err) => {
            console.log('Live query error', err)
        }
        const condition = cond('userId', '==', userId);
        db.liveQuery("todos")
            .where(condition)
            .subscribe(onSnapshot, onError)
        db.liveQuery("todos")
            .where() // testing not sure if this even works
            .subscribe((doc) => {
                console.log('subscribe > doc', doc)
            }, onError)
    }
    
  • fixed issue of current data and timestamp #1043

    fixed issue of current data and timestamp #1043

    1)the problem was the $1 or @p1 was replaced by current date or timestamp, but if $2 exists, the execution fails bcz respective doesn't exists in the query 2)so i decrease the number followed by $ or @p each by 1 in sanitiseUpdateQuery2 3)current_date doesn't work for sql server, so change it accordingly 4)fixed the test for update.go

  • Document procedure to use the gateway binary directly

    Document procedure to use the gateway binary directly

    The problem faced currently?

    In some environment we can't use docker, so we need native binary file to use with hashicorp/nomad

    How can we solve it?

    By keeping the old containerless deployment way.

    If you want this feature to be implemented, give it a thumbs up reaction, so that we can determine which features are important to you. 👍

  • Defining/editing Schema doesn't persist changes (Mysql DB)

    Defining/editing Schema doesn't persist changes (Mysql DB)

    Describe the bug

    When defining the Schema or updating it, the saved message is displayed but nothing happens within the data itself when querying and it doesn't persist those changes to the db as well (mysql in this case)

    Expected behaviour

    Schema updates/created are saved and usable

    Actual behaviour

    Steps to reproduce

    Your environment

    • Space Cloud version:
    • OS:
    • The client api version (if applicable):
    • Browser (if applicable):

    If this bug restricts your use of space-cloud, give it a thumbs up reaction, so that we can determine which bugs need to be fixed immediately. 👍

  • Bump helm.sh/helm/v3 from 3.6.3 to 3.10.3 in /space-cli

    Bump helm.sh/helm/v3 from 3.6.3 to 3.10.3 in /space-cli

    Bumps helm.sh/helm/v3 from 3.6.3 to 3.10.3.

    Release notes

    Sourced from helm.sh/helm/v3's releases.

    Helm v3.10.3

    v3.10.3

    Helm v3.10.3 is a security (patch) release. Users are strongly recommended to update to this release.

    While fuzz testing Helm, provided by the CNCF:

    • a possible stack overflow was discovered with the strvals package. Stack overflow cannot be recovered from in Go. This can potentially be used to produce a denial of service (DOS) for SDK users. More details are available in the advisory.
    • a possible segmentation violation was discovered with the repo package. Some segmentation violations cannot be recovered from in Go. This can potentially be used to produce a denial of service (DOS) for SDK users. More details are available in the advisory.
    • a possible segmentation violation was discovered with the chartutil package. This can potentially be used to produce a denial of service (DOS) for SDK users. More details are available in the advisory

    The community keeps growing, and we'd love to see you there!

    • Join the discussion in Kubernetes Slack:
      • for questions and just to hang out
      • for discussing PRs, code, and bugs
    • Hang out at the Public Developer Call: Thursday, 9:30 Pacific via Zoom
    • Test, debug, and contribute charts: ArtifactHub/packages

    Installation and Upgrading

    Download Helm v3.10.3. The common platform binaries are here:

    This release was signed with F126 1BDE 9290 12C8 FF2E 501D 6EA5 D759 8529 A53E and can be found at @​hickeyma keybase account. Please use the attached signatures for verifying this release using gpg.

    The Quickstart Guide will get you going from there. For upgrade instructions or detailed installation notes, check the install guide. You can also use a script to install on any system with bash.

    What's Next

    • 3.11.0 is the next feature release and will be on January 18, 2023.

    Changelog

    • Fix backwards compatibility 835b7334cfe2e5e27870ab3ed4135f136eecc704 (Martin Hickey)
    • Update string handling 3caf8b586b47e838e492f9ec05396bf8c5851b92 (Martin Hickey)
    • Update repo handling 7c0e203529d4b9d51c5fe57c9e0bd9df1bd95ab4 (Martin Hickey)
    • Update schema validation handling f4b93226c6066e009a5162d0b08debbf3d82a67f (Martin Hickey)

    Helm v3.10.2 is a patch release. Users are encouraged to upgrade for the best experience. Users are encouraged to upgrade for the best experience.

    ... (truncated)

    Commits
    • 835b733 Fix backwards compatibility
    • 3caf8b5 Update string handling
    • 7c0e203 Update repo handling
    • f4b9322 Update schema validation handling
    • 50f003e fix a few function names on comments
    • c3a62f7 redirect registry client output to stderr
    • 727bdf1 Readiness & liveness probes correct port
    • 9f88ccb Updating the deb location for azure cli
    • a59afc4 Updating the repo the azure cli is installed from
    • 35af809 Updating to kubernetes 1.25.2 packages
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • Add a confirmation for before deleting the project

    Add a confirmation for before deleting the project

    The problem faced currently?

    There is no confirmation prior to deletion so accidental deletion happens image

    How can we solve it?

    Give a prompt before deleting it

  • [Feature Request] Ability to apply certs when connecting to database

    [Feature Request] Ability to apply certs when connecting to database

    YugabyteDB Managed require to specify cert location in order to connect to the database. But currently there is no way to specify certs location when connecting to the database. @YourTechBud

  • Bump github.com/gogo/protobuf from 1.3.1 to 1.3.2 in /runner

    Bump github.com/gogo/protobuf from 1.3.1 to 1.3.2 in /runner

    Bumps github.com/gogo/protobuf from 1.3.1 to 1.3.2.

    Release notes

    Sourced from github.com/gogo/protobuf's releases.

    Release v.1.3.2

    Tested versions:

    go 1.15.6 protoc 3.14.0

    Bug fixes:

    skippy peanut butter

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

A project for sharing secrets in a quick and secure manner
A project for sharing secrets in a quick and secure manner

Yopass - Share Secrets Securely Yopass is a project for sharing secrets in a quick and secure manner*. The sole purpose of Yopass is to minimize the a

Sep 28, 2021
💲 Golang, Go Fiber, RabbitMQ, MongoDB, Docker, Kubernetes, GitHub Actions
💲 Golang, Go Fiber, RabbitMQ, MongoDB, Docker, Kubernetes, GitHub Actions

Bank Projeto para simular empréstimos financeiros em um banco para clientes Tecnologias Utilizadas Golang MongoDB RabbitMQ Github Actions Docker Hub D

Dec 9, 2022
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)

gokv Simple key-value store abstraction and implementations for Go Contents Features Simple interface Implementations Value types Marshal formats Road

Dec 24, 2022
🐺 Deploy Databases and Services Easily for Development and Testing Pipelines.
🐺 Deploy Databases and Services Easily for Development and Testing Pipelines.

Peanut provides an API and a command line tool to deploy and configure the commonly used services like databases, message brokers, graphing tools ... etc. It perfectly suited for development, manual testing, automated testing pipelines where mocking is not possible and test drives.

Jan 3, 2023
Examples and code to assign a name to your MongoDB, MySQL, PostgreSQL, RabbitMQ, and redis connection.
Examples and code to assign a name to your MongoDB, MySQL, PostgreSQL, RabbitMQ, and redis connection.

your connection deserves a name ?? When your app interacts with an external system, assign a name to the connection. An external system in this contex

Dec 14, 2022
PostgreSQL driver and toolkit for Go

pgx - PostgreSQL Driver and Toolkit pgx is a pure Go driver and toolkit for PostgreSQL. pgx aims to be low-level, fast, and performant, while also ena

Jan 4, 2023
Mongo Go Models (mgm) is a fast and simple MongoDB ODM for Go (based on official Mongo Go Driver)
Mongo Go Models (mgm) is a fast and simple MongoDB ODM for Go (based on official Mongo Go Driver)

Mongo Go Models Important Note: We changed package name from github.com/Kamva/mgm/v3(uppercase Kamva) to github.com/kamva/mgm/v3(lowercase kamva) in v

Jan 2, 2023
Google Go Client and Connectors for Redis

Go-Redis Go Clients and Connectors for Redis. The initial release provides the interface and implementation supporting the (~) full set of current Red

Oct 25, 2022
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

upper/db is a productive data access layer (DAL) for Go that provides agnostic tools to work with different data sources

Jan 3, 2023
A pure go library to handle MySQL network protocol and replication.

A pure go library to handle MySQL network protocol and replication.

Jan 3, 2023
GoBigdis is a persistent database that implements the Redis server protocol. Any Redis client can interface with it and start to use it right away.

GoBigdis GoBigdis is a persistent database that implements the Redis server protocol. Any Redis client can interface with it and start to use it right

Apr 27, 2022
A MongoDB compatible embeddable database and toolkit for Go.
A MongoDB compatible embeddable database and toolkit for Go.

lungo A MongoDB compatible embeddable database and toolkit for Go. Installation Example Motivation Architecture Features License Installation To get s

Jan 3, 2023
A Golang implemented Redis Server and Cluster.
A Golang implemented Redis Server and Cluster.

Godis is a golang implementation of Redis Server, which intents to provide an example of writing a high concurrent middleware using golang.

Dec 28, 2022
Redis powered simple OTS service - contains two endpoints, to create and find a secret

Onetimesecret This is a simple service that stores and finds your secret. Small but powerfull service - does not have any unnesseccery dependencies. H

Aug 20, 2022
Redis-benchmark - Simple get, mget and pipelined get benchmark.

redis-benchmark Simple get, mget and pipelined get benchmark. Usage git clone https://github.com/Ali-A-A/redis-benchmark.git cd ./redis-benchmark dock

Dec 31, 2021
Uptrace - Distributed tracing backend using OpenTelemetry and ClickHouse
Uptrace - Distributed tracing backend using OpenTelemetry and ClickHouse

Distributed tracing backend using OpenTelemetry and ClickHouse Uptrace is a dist

Mar 8, 2022
Priority queue with message-group based partitioning and equal attention guarantee for each message group based on Redis

redis-ordered-queue-go Priority queue with message-group based partitioning and equal attention guarantee for each message group based on Redis What i

Oct 21, 2022
Web app built with Go/Golang and Buffalo, deployed on Heroku, using Heroku Postgres

hundred-go-buffalo Background Read Go Read Buffalo Read Getting Started on Heroku with Go Recommended Tools PowerShell terminal Chocolatey Windows pac

Dec 18, 2021
Gets Firebase auth tokens (for development purposes only)Gets Firebase auth tokens

Firebase Token Gets Firebase auth tokens (for development purposes only) Getting started Create Firebase project Setup Firebase authentication Setup G

Nov 17, 2021
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.
Project Flogo is an open source ecosystem of opinionated  event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.

Project Flogo is an Open Source ecosystem for event-driven apps Ecosystem | Core | Flows | Streams | Flogo Rules | Go Developers | When to use Flogo |

Dec 31, 2022