{"id":13514004,"url":"https://github.com/wundergraph/wunderbase","last_synced_at":"2025-04-05T08:08:32.710Z","repository":{"id":59540131,"uuid":"535983281","full_name":"wundergraph/wunderbase","owner":"wundergraph","description":"Serverless GraphQL Database built on top of Firecracker, SQLite and Prisma","archived":false,"fork":false,"pushed_at":"2022-10-26T14:51:07.000Z","size":81,"stargazers_count":525,"open_issues_count":3,"forks_count":23,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T07:08:31.456Z","etag":null,"topics":["database","db","firecracker","firecracker-containerd","firecracker-microvms","firecracker-vm","go","golang","golang-application","golang-package","graphql","prisma","prisma2","serverless","sqlite","sqlite-database","sqlite3","sqlite3-database","wundergraph"],"latest_commit_sha":null,"homepage":"https://wundergraph.com/blog/wunderbase_serverless_graphql_database_on_top_of_sqlite_firecracker_and_prisma","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wundergraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T06:10:58.000Z","updated_at":"2025-03-15T23:21:32.000Z","dependencies_parsed_at":"2022-09-18T14:21:05.835Z","dependency_job_id":null,"html_url":"https://github.com/wundergraph/wunderbase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wundergraph%2Fwunderbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wundergraph%2Fwunderbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wundergraph%2Fwunderbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wundergraph%2Fwunderbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wundergraph","download_url":"https://codeload.github.com/wundergraph/wunderbase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","db","firecracker","firecracker-containerd","firecracker-microvms","firecracker-vm","go","golang","golang-application","golang-package","graphql","prisma","prisma2","serverless","sqlite","sqlite-database","sqlite3","sqlite3-database","wundergraph"],"created_at":"2024-08-01T05:00:42.679Z","updated_at":"2025-04-05T08:08:32.683Z","avatar_url":"https://github.com/wundergraph.png","language":"Go","readme":"\u003cimg src=\"img/img.png\" align=\"left\"\nalt=\"Size Limit logo by Anton Lovchikov\" width=\"232\" height=\"237\"\u003e\n\nis a Serverless SQLite database exposed through GraphQL.\nIt can sleep for days and wakes up in less than a second.\nDuring sleep, you only pay for storage. It is capable to serve a medium traffic website.\n\n- **Firecracker (Fly.io Machines)** Runs on top of the same technology as AWS Fargate.\n- **Scale to zero**. Cold starts in less than 600ms.\n- **Fast**. 10k reads / 2k writes requests per second.\n- **Cheap** Fly.io free tier allows your to run it almost for free.\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://hub.docker.com/r/wundergraph/wunderbase\"\u003e\n\n![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n\n\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eLove the idea? :heartbeat: Read the announcement \u003ca href=\"https://wundergraph.com/blog/wunderbase_serverless_graphql_database_on_top_of_sqlite_firecracker_and_prisma\"\u003eblog post\u003c/a\u003e to get more insights!\u003c/p\u003e\n\n## Getting Started\n\n### 1. Install dependencies\n\n- Mac\n\n  ```\n  sh install-prisma-darwin.sh\n  ```\n\n- Linux\n  ```\n  sh install-prisma-linux.sh\n  ```\n\n### 2. Start the server\n\n- Run the application locally\n\n  ```sh\n  ENABLE_SLEEP_MODE=false go run main.go\n  ```\n\n- Running with Docker\n  ```sh\n  docker run -p 4466:4466 -e ENABLE_SLEEP_MODE=false wundergraph/wunderbase\n  ```\n\n### 3. Visit the playground\n\nOpen [http://0.0.0.0:4466](http://0.0.0.0:4466) in your browser.\n\n## Running on fly Machines\n\nCheck out the fly.io [Machines documentation](https://fly.io/docs/reference/machines/) on how to deploy WunderBase to fly.io.\nYou can build the image yourself using the Dockerfile in this repo,\nor just use a pre-built image from [Docker Hub](https://hub.docker.com/r/wundergraph/wunderbase).\n\n## Testing\n\n\u003e **Note**: Requires Docker\n\n`go test ./...`\n\n## Firecracker \u0026 Fly Machines\n\n- **Sleep Mode**\n  - By default, sleep mode is enabled. This means, if there is no traffic, WunderBase will sleep.\n    Sleep mode lets WunderBase exit with exit code 0.\n    This indicated to fly that the application wants to sleep.\n- **Cold Starts**\n  - I've measured an avg cold start time of 400-600ms.\n- **Backups**\n  - We're looking at integrating Litestream or a similar service for backups.\n    If you'd like to contribute, please reach out!\n\n### Internals\n\nWunderBase uses the Prisma Query Engine internally to translate GraphQL queries to SQL.\nWe've added a proxy written in Golang to add GraphiQL 2.0 as the frontend and handle the lifecycle to make the service sleep when it's not in use.\nWe're also using the Prisma Migration Engine to run migrations.\n\n### Security\n\nI do not recommend to expose WunderBase to the public internet.\nThe intended use case is to run it on a private network and expose it to your frontend via an API Gateway,\nlike [WunderGraph](https://github.com/wundergraph/wundergraph)!\n\n\u003e **Note**: Get [Early Access](https://wundergraph.com/#early-access) to WunderGraph Cloud - \" The Vercel for Backend \" 🪐\n\u003e The Serverless API Developer Platform 🪄\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwundergraph%2Fwunderbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwundergraph%2Fwunderbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwundergraph%2Fwunderbase/lists"}