{"id":13528367,"url":"https://github.com/1backend/1backend","last_synced_at":"2025-05-13T21:11:47.298Z","repository":{"id":26874552,"uuid":"110535597","full_name":"1backend/1backend","owner":"1backend","description":"AI-native microservices platform.","archived":false,"fork":false,"pushed_at":"2025-05-13T10:03:55.000Z","size":53697,"stargazers_count":2187,"open_issues_count":8,"forks_count":94,"subscribers_count":40,"default_branch":"main","last_synced_at":"2025-05-13T11:20:03.681Z","etag":null,"topics":["ai","ai-platform","microservices","microservices-platform","on-premise","on-premise-ai","paas"],"latest_commit_sha":null,"homepage":"https://1backend.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1backend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-13T10:44:25.000Z","updated_at":"2025-05-13T10:00:28.000Z","dependencies_parsed_at":"2024-06-18T19:50:40.624Z","dependency_job_id":"cfd76e6d-69f6-4c64-8343-67294951b46f","html_url":"https://github.com/1backend/1backend","commit_stats":{"total_commits":179,"total_committers":8,"mean_commits":22.375,"dds":"0.43575418994413406","last_synced_commit":"a00f14f822c88ba756f4fc5b588d59cb769f2bf4"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1backend%2F1backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1backend%2F1backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1backend%2F1backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1backend%2F1backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1backend","download_url":"https://codeload.github.com/1backend/1backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929546,"owners_count":21985828,"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":["ai","ai-platform","microservices","microservices-platform","on-premise","on-premise-ai","paas"],"created_at":"2024-08-01T06:02:28.224Z","updated_at":"2025-05-13T21:11:42.281Z","avatar_url":"https://github.com/1backend.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"150px\" src=\"./docs-source/1b_logo.svg\" style=\"border-radius: 50%;\" /\u003e\n  \u003cdiv align=\"center\"\u003e\n    \u003cspan\u003e\n      \u003ch1 style=\"border-bottom: none\"\u003e1Backend\u003c/h1\u003e\n      \u003ca href=\"https://discord.gg/eRXyzeXEvM\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/66351093b042f69e9698398d33f08a6c36f1b7c56e1494b1e2902950eb24c94f/68747470733a2f2f646362616467652e6c696d65732e70696e6b2f6170692f7365727665722f68747470733a2f2f646973636f72642e67672f655258797a655845764d\" alt=\"\" data-canonical-src=\"https://dcbadge.limes.pink/api/server/https://discord.gg/eRXyzeXEvM\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/1backend/1backend/actions/workflows/backend-tests.yaml/badge.svg\"\u003e\u003cimg src=\"https://github.com/1backend/1backend/actions/workflows/backend-tests.yaml/badge.svg\" alt=\"backend build\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/1backend/1backend/actions/workflows/1backend-ui-docker-build.yaml/badge.svg\"\u003e\u003cimg src=\"https://github.com/1backend/1backend/actions/workflows/1backend-ui-docker-build.yaml/badge.svg\" alt=\"frontend build\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/1backend/1backend/actions/workflows/go-client-build.yaml/badge.svg\"\u003e\u003cimg src=\"https://github.com/1backend/1backend/actions/workflows/go-client-build.yaml/badge.svg\" alt=\"go client build\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/1backend/1backend/actions/workflows/js-client-build.yaml/badge.svg\"\u003e\u003cimg src=\"https://github.com/1backend/1backend/actions/workflows/js-client-build.yaml/badge.svg\" alt=\"js client build\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/1backend/1backend/actions/workflows/go-sdk-build.yaml/badge.svg\"\u003e\u003cimg src=\"https://github.com/1backend/1backend/actions/workflows/go-sdk-build.yaml/badge.svg\" alt=\"go sdk\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n    \u003c/span\u003e\n    \u003cdiv style=\"margin-top: 2rem\"\u003eAI-native microservices platform.\u003c/div\u003e\n    \u003cdiv\u003e\n      \u003ca href=\"https://1backend.com\"\u003e1backend.com\u003c/a\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/p\u003e\n\n1Backend was originally an experimental serverless platform, built by a microservices veteran and his friends. It gained interest back in 2017, but development paused as the team moved on to other ventures.\n\nYears later, while building an on-premise AI platform, the original creator realized there was still no microservices backend that fully matched their vision.\n\nThat project evolved into what 1Backend is today: a general-purpose backend framework designed for private AI deployments and high-concurrency workloads. It also includes a ChatGPT-inspired interface for user interaction, along with a network-accessible API for machines—but at its core, 1Backend is built to be a robust, flexible foundation for modern backend systems.\n\n\u003cimg src=\"https://singulatron.com/assets/1b.png\" /\u003e\n\n## Highlights\n\n- On-premise ChatGPT alternative – Run your AI models locally through a UI, CLI or API.\n- A \"microservices-first\" web framework – Think of it like Angular for the backend, built for large, scalable enterprise codebases.\n- Out-of-the-box services – Includes built-in file uploads, downloads, user management, and more.\n- Infrastructure simplification – Acts as a container orchestrator, reverse proxy, and more.\n- Multi-database support – Comes with its own built-in ORM.\n- AI integration – Works with LlamaCpp, StableDiffusion, and other AI platforms.\n\n## Starting\n\nEasiest way to run 1Backend is with Docker. [Install Docker if you don't have it](https://docs.docker.com/engine/install/).\nStep into repo root and:\n\n```sh\ndocker compose up\n```\n\nto run the platform in foreground. It stops running if you Ctrl+C it. If you want to run it in the background:\n\n```sh\ndocker compose up -d\n```\n\nAlso see [this page](https://1backend.com/docs/category/running-the-server) for other ways to launch 1Backend.\n\n## Building microservices\n\nCheck out the [examples](./examples/go/services/) folder or the [relevant documentation](https://1backend.com/docs/writing-custom-services/your-first-service) to learn how to easily build testable, scalable microservices on 1Backend.\n\n## Prompting\n\nNow that the 1Backend is running you have a few options to interact with it.\n\n### UI\n\nYou can go to `http://127.0.0.1:3901` and log in with username `1backend` and password `changeme` and start using it just like you would use ChatGPT.\n\nClick on the big \"AI\" button and download a model first. Don't worry, this model will be persisted across restarts (see volumes in the docker-compose.yaml).\n\n### Clients\n\nFor brevity the below example assumes you went to the UI and downloaded a model already. (That could also be done in code with the clients but then the code snippet would be longer).\n\nLet's do a sync prompting in JS. In your project run\n\n```sh\nnpm init -y \u0026\u0026 jq '. + { \"type\": \"module\" }' package.json \u003e temp.json \u0026\u0026 mv temp.json package.json\nnpm i -s @1backend/client\n```\n\nMake sure your `package.json` contains `\"type\": \"module\"`, put the following snippet into `index.js`\n\n```js\nimport { UserSvcApi, PromptSvcApi, Configuration } from \"@1backend/client\";\n\nasync function testDrive() {\n  let userService = new UserSvcApi();\n  let loginResponse = await userService.login({\n    body: {\n      slug: \"1backend\",\n      password: \"changeme\",\n    },\n  });\n\n  const promptSvc = new PromptSvcApi(\n    new Configuration({\n      apiKey: loginResponse.token?.token,\n    })\n  );\n\n  // Make sure there is a model downloaded and active at this point,\n  // either through the UI or programmatically .\n\n  let promptRsp = await promptSvc.prompt({\n    body: {\n      sync: true,\n      prompt: \"Is a cat an animal? Just answer with yes or no please.\",\n    },\n  });\n\n  console.log(promptRsp);\n}\n\ntestDrive();\n```\n\nand run\n\n```js\n$ node index.js\n{\n  prompt: {\n    createdAt: '2025-02-03T16:53:09.883792389Z',\n    id: 'prom_emaAv7SlM2',\n    prompt: 'Is a cat an animal? Just answer with yes or no please.',\n    status: 'scheduled',\n    sync: true,\n    threadId: 'prom_emaAv7SlM2',\n    type: \"Text-to-Text\",\n    userId: 'usr_ema9eJmyXa'\n  },\n  responseMessage: {\n    createdAt: '2025-02-03T16:53:12.128062235Z',\n    id: 'msg_emaAzDnLtq',\n    text: '\\n' +\n      'I think the question is asking about dogs, so we should use \u0026quot;Dogs are animals\u0026quot;. But what about cats?',\n    threadId: 'prom_emaAv7SlM2'\n  }\n}\n```\n\nDepending on your system it might take a while for the AI to respond.\nIn case it takes long check the backend logs if it's processing, you should see something like this:\n\n```sh\n1backend-1backend-1   | {\"time\":\"2024-11-27T17:27:14.602762664Z\",\"level\":\"DEBUG\",\"msg\":\"LLM is streaming\",\"promptId\":\"prom_e3SA9bJV5u\",\"responsesPerSecond\":1,\"totalResponses\":1}\n1backend-1backend-1   | {\"time\":\"2024-11-27T17:27:15.602328634Z\",\"level\":\"DEBUG\",\"msg\":\"LLM is streaming\",\"promptId\":\"prom_e3SA9bJV5u\",\"responsesPerSecond\":4,\"totalResponses\":9}\n```\n\n### CLI\n\nInstall `oo` to get started (at the moment you need Go to install it):\n\n```sh\ngo install github.com/1backend/1backend/cli/oo@latest\n```\n\n```sh\n$ oo env ls\nENV NAME   SELECTED   URL                           DESCRIPTION   REACHABLE\nlocal      *          http://127.0.0.1:11337                      true\n```\n\n```sh\n$ oo login 1backend changeme\n\n$ oo whoami\nslug: 1backend\nid: usr_e9WSQYiJc9\nroles:\n- user-svc:admin\n```\n\n```sh\n$ oo post /prompt-svc/prompt --sync=true --prompt=\"Is a cat an animal? Just answer with yes or no please.\"\n# see example response above...\n```\n\n## Context\n\n1Backend is a microservices-based AI platform, the seeds of which began taking shape in 2013 while I was at Hailo, an Uber competitor. The idea stuck with me and kept evolving over the years – including during my time at [Micro](https://github.com/micro/micro), a microservices platform company. I assumed someone else would eventually build it, but with the AI boom and the wave of AI apps we’re rolling out, I’ve realized it’s time to build it myself.\n\n## Run On Your Servers\n\nSee the [Running the daemon](https://1backend.com/docs/category/running-the-server) page to help you get started.\n\n## Services\n\nFor articles about the built-in services see the [Built-in services](https://1backend.com/docs/category/built-in-services) page.\nFor comprehensive API docs see the [1Backend API](https://1backend.com/docs/category/1backend-api) page.\n\n## Run On Your Laptop/PC\n\nWe have temporarily discontinued the distribution of the desktop version. Please refer to this page for alternative methods to run the software.\n\n## License\n\n1Backend is licensed under AGPL-3.0.\n","funding_links":[],"categories":["Go","TypeScript","Lambda","🌐 Web Development - Frontend","golang","Apps","typescript","Platforms","Self-hosting Solutions","Functions as a Service","Repositories"],"sub_categories":["AI","Localization","Code"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1backend%2F1backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1backend%2F1backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1backend%2F1backend/lists"}