https://github.com/pocketbase/pocketbase Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} pocketbase / pocketbase Public * * Notifications * Fork 9 * Star 849 Open Source realtime backend in 1 file pocketbase.io License MIT license 849 stars 9 forks Star Notifications * Code * Issues 2 * Pull requests 0 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights pocketbase/pocketbase This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 1 tag Code Latest commit @ganigeorgiev ganigeorgiev updated readme and paypal donation link ... 1bee6a5 Jul 7, 2022 updated readme and paypal donation link 1bee6a5 Git stats * 2 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github updated readme and paypal donation link Jul 7, 2022 apis initial public commit Jul 6, 2022 cmd initial public commit Jul 6, 2022 core initial public commit Jul 6, 2022 daos initial public commit Jul 6, 2022 examples/base initial public commit Jul 6, 2022 forms initial public commit Jul 6, 2022 mails initial public commit Jul 6, 2022 migrations initial public commit Jul 6, 2022 models initial public commit Jul 6, 2022 resolvers initial public commit Jul 6, 2022 tests initial public commit Jul 6, 2022 tokens initial public commit Jul 6, 2022 tools initial public commit Jul 6, 2022 ui initial public commit Jul 6, 2022 .gitignore initial public commit Jul 6, 2022 .goreleaser.yaml initial public commit Jul 6, 2022 LICENSE.md initial public commit Jul 6, 2022 README.md updated readme and paypal donation link Jul 7, 2022 go.mod initial public commit Jul 6, 2022 go.sum initial public commit Jul 6, 2022 pocketbase.go initial public commit Jul 6, 2022 pocketbase_test.go initial public commit Jul 6, 2022 View code [ ] API SDK clients Overview Installation Example Running and building Testing Security Contributing README.md PocketBase - open source backend in 1 file build Latest releases Go package documentation PocketBase is an open source Go backend, consisting of: * embedded database (SQLite) with realtime subscriptions * built-in files and users management * convenient Admin dashboard UI * and simple REST-ish API For documentation and examples, please visit https://pocketbase.io/ docs. [?][?] Although the web API defintions are considered stable, please keep in mind that PocketBase is still under active development and therefore full backward compatibility is not guaranteed before reaching v1.0.0. API SDK clients The easiest way to interact with the API is to use one of the official SDK clients: * JavaScript - pocketbase/js-sdk (browser and node) * Dart - soon Overview PocketBase could be used as a standalone app or as a Go framework/ toolkit that enables you to build your own custom app specific business logic and still have a single portable executable at the end. Installation # go 1.18+ go get github.com/pocketbase/pocketbase Example package main import ( "log" "net/http" "github.com/labstack/echo/v5" "github.com/pocketbase/pocketbase" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" ) func main() { app := pocketbase.New() app.OnBeforeServe().Add(func(e *core.ServeEvent) error { // add new "GET /api/hello" route to the app router (echo) e.Router.AddRoute(echo.Route{ Method: http.MethodGet, Path: "/api/hello", Handler: func(c echo.Context) error { return c.String(200, "Hello world!") }, Middlewares: []echo.MiddlewareFunc{ apis.RequireAdminOrUserAuth(), }, }) return nil }) if err := app.Start(); err != nil { log.Fatal(err) } } Running and building Running/building the application is the same as for any other Go program, aka. just go run and go build. PocketBase embeds SQLite, but doesn't require CGO. If CGO is enabled, it will use mattn/go-sqlite3 driver, otherwise - modernc.org/sqlite. Enable CGO only if you really need to squeeze the read/write query performance at the expense of complicating cross compilation. Testing PocketBase comes with mixed bag of unit and integration tests. To run them, use the default go test command: go test ./... Check also the Testing guide to learn how to write your own custom application tests. Security If you discover a security vulnerability within PocketBase, please send an e-mail to support at pocketbase.io. All reports will be promptly addressed and you'll be credited accordingly. Contributing PocketBase is free and open source project licensed under the MIT License. You could help continuing its development by: * Suggest new features, report issues and fix bugs * Donate a small amount Please also note that PocketBase was initially created to serve as a new backend for my other open source project - Presentator (see #183), so all feature requests will be first aligned with what we need for Presentator v3. About Open Source realtime backend in 1 file pocketbase.io Topics golang authentication backend realtime Resources Readme License MIT license Stars 849 stars Watchers 8 watching Forks 9 forks Releases 1 v0.1.0 Release Latest Jul 7, 2022 Sponsor this project * https://www.paypal.com/donate/?hosted_button_id=4DVXNL4B8WT98 Languages * Go 60.8% * Svelte 21.4% * SCSS 14.5% * JavaScript 3.2% * Other 0.1% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.