MCPcopy
hub / github.com/spacecloud-io/space-cloud

github.com/spacecloud-io/space-cloud @v0.21.5 sqlite

repository ↗ · DeepWiki ↗ · release v0.21.5 ↗
3,057 symbols 10,075 edges 567 files 1,383 documented · 45%
README

Space Cloud

Develop, Deploy and Secure Serverless Apps on Kubernetes.

WebsiteDocsSupport

<a href="https://discord.gg/RkGjW93"><img src="https://img.shields.io/badge/chat-discord-brightgreen.svg?logo=discord&%20style=flat"></a>



<a href="https://goreportcard.com/report/github.com/spaceuptech/space-cloud">
<img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/spaceuptech/space-cloud">
</a>
<a href="https://opensource.org/licenses/Apache-2.0"><img
alt="Apache License"
src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
<a href="https://twitter.com/intent/follow?screen_name=spacecloudio"><img src="https://img.shields.io/badge/Follow-spacecloudio-blue.svg?style=flat&logo=twitter"></a>

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 :heart::

  • 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.

Extension points exported contracts — how you extend this code

CrudAuthInterface (Interface)
CrudAuthInterface is an interface consisting of functions of crud module used by auth module [8 implementers]
gateway/model/types.go
SchemaInterface (Interface)
SchemaInterface is an interface consisting of functions of schema module used by graphql module [5 implementers]
gateway/utils/graphql/types.go
Crud (Interface)
Crud abstracts the implementation crud operations of databases [3 implementers]
gateway/modules/crud/crud.go
Store (Interface)
Store abstracts the implementation of letsencrypt storage operations [3 implementers]
gateway/managers/syncman/store.go
IntegrationAuthResponse (Interface)
IntegrationAuthResponse is sent back as a response to auth checks [3 implementers]
gateway/config/integration.go
Interface (Interface)
Interface is the interface of the modules which interact with the deployment targets [2 implementers]
runner/utils/driver/driver.go
WebsocketModulesInterface (Interface)
WebsocketModulesInterface is used to accept the modules object [2 implementers]
gateway/server/handlers/websocket.go
ServiceCallMetricHook (FuncType)
ServiceCallMetricHook logs apply service operation
runner/model/metrics.go

Core symbols most depended-on inside this repo

Error
called by 320
gateway/config/integration.go
Context
called by 205
gateway/utils/client/client.go
getIndexName
called by 202
gateway/modules/schema/helpers.go
Lock
called by 157
gateway/modules/global/letsencrypt/sc_store.go
Unlock
called by 157
gateway/modules/global/letsencrypt/sc_store.go
AskOne
called by 152
space-cli/cmd/utils/input/input.go
Status
called by 127
gateway/config/integration.go
Get
called by 124
gateway/utils/atomic.go

Shape

Method 1,317
Function 1,091
Struct 509
TypeAlias 64
Interface 59
FuncType 17

Languages

Go100%
TypeScript1%
Python1%

Modules by API surface

runner/modules/scaler/externalscaler/externalscaler.pb.go92 symbols
gateway/model/types.go82 symbols
gateway/managers/syncman/types_test.go71 symbols
gateway/config/config.go53 symbols
gateway/managers/syncman/types.go38 symbols
runner/utils/driver/istio/helpers.go27 symbols
runner/utils/driver/driver.go26 symbols
gateway/modules/schema/helpers.go26 symbols
gateway/modules/crud/crud.go26 symbols
gateway/modules/eventing/types.go25 symbols
gateway/modules/eventing/helpers.go24 symbols
space-cli/cmd/utils/file/file.go23 symbols

Dependencies from manifests, versioned

cloud.google.com/go/storagev1.6.0 · 1×
github.com/AlecAivazis/survey/v2v2.0.7 · 1×
github.com/DATA-DOG/go-sqlmockv1.5.0 · 1×
github.com/Masterminds/goutilsv1.1.1 · 1×
github.com/Masterminds/semverv1.5.0 · 1×
github.com/Masterminds/sprigv2.22.0+incompatible · 1×
github.com/aws/aws-sdk-gov1.34.28 · 1×
github.com/briandowns/spinnerv1.9.0 · 1×
github.com/cpuguy83/go-md2man/v2v2.0.0 · 1×
github.com/denisenkom/go-mssqldbv0.0.0-2020042802233 · 1×
github.com/docker/dockerv17.12.0-ce-rc1.0.20 · 1×

Datastores touched

companiesCollection · 1 repos
customersCollection · 1 repos
ordersCollection · 1 repos
(mongodb)Database · 1 repos
myprojectDatabase · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add space-cloud \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact