{"id":13594866,"url":"https://github.com/differentialhq/differential","last_synced_at":"2025-04-09T10:32:17.116Z","repository":{"id":213088136,"uuid":"730205413","full_name":"differentialhq/differential","owner":"differentialhq","description":"Typescript-first background services platform with durable functions.","archived":false,"fork":false,"pushed_at":"2024-08-11T00:19:44.000Z","size":15461,"stargazers_count":108,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T00:58:28.537Z","etag":null,"topics":["background-jobs","nodejs","rpc","service-bus","service-orchestration","service-to-service","typescipt","typescript"],"latest_commit_sha":null,"homepage":"https://www.differential.dev","language":"TypeScript","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/differentialhq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-11T12:31:24.000Z","updated_at":"2024-10-24T09:52:43.000Z","dependencies_parsed_at":"2024-02-26T23:31:21.364Z","dependency_job_id":"b83f7f3c-2d79-41df-a03d-209e020c8318","html_url":"https://github.com/differentialhq/differential","commit_stats":null,"previous_names":["differentialhq/differential"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/differentialhq%2Fdifferential","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/differentialhq%2Fdifferential/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/differentialhq%2Fdifferential/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/differentialhq%2Fdifferential/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/differentialhq","download_url":"https://codeload.github.com/differentialhq/differential/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248020592,"owners_count":21034459,"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":["background-jobs","nodejs","rpc","service-bus","service-orchestration","service-to-service","typescipt","typescript"],"created_at":"2024-08-01T16:01:40.192Z","updated_at":"2025-04-09T10:32:12.101Z","avatar_url":"https://github.com/differentialhq.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","nodejs"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://pub-3fdc530288e945febdc979220f1485b3.r2.dev/logo.png\" width=\"200\" style=\"border-radius: 10px\" /\u003e\n\u003c/p\u003e\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/differentialhq/differential/test.yml) ![NPM Downloads](https://img.shields.io/npm/dm/%40differentialhq%2Fcore) ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/%40differentialhq%2Fcore) ![NPM Version](https://img.shields.io/npm/v/%40differentialhq%2Fcore?logo=npm\u0026label=%40differentialhq%2Fcore)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/differentialhq/differential)\n\n# Differential\n\nDifferential is an open-source application code aware service mesh (control-plane) and a set of adapters (client libraries) which connects your services together with first-class support for Typescript.\n\n1. Differential builds on the concepts developers are already familiar with, and doesn't require you to learn a new programming model.\n2. Services are collections of plain old javascript functions which can be deployed in almost any compute. Services ship their own type-safe Typescript clients.\n3. The control plane takes care of routing data between the functions, and recovering from transient failures, transparently.\n\n## Why would I use it?\n\n1. Create services out of plain old Typescript functions, and get type-safe clients for free.\n2. Adopt a service-oriented architecture without changing your codebase / programming model.\n3. Recover your workloads from crashes and network failures without custom code.\n\n## What does the code look like?\n\n![Alt text](assets/image-3.png)\n\n### 1. Write a service that connects to the Differential control-plane\n\n```ts\nimport { Differential } from \"@differentialhq/core\";\n\n// You can get a token from console.differential.dev\nconst d = new Differential(\"MY_API_SECRET\");\n\n// Write your business logic as if it were local\n\nfunction sum(a: number, b: number) {\n  return a + b;\n}\n\nfunction get(url: string) {\n  // ...even functions with side effects\n  return fetch(url).then((res) =\u003e res.json());\n}\n\n// Register your functions with the control-plane\nconst myService = d.service(\"my-service\", {\n  functions: {\n    sum,\n    get,\n  },\n});\n\n// Start the service, and it will connect to the\n// control-plane and listen for function calls from other places\nmyService.start();\n```\n\n### 2. Consume the service with full type safety from anywhere\n\n```ts\nimport { Differential } from \"@differentialhq/core\";\n\n// Import the types of the Differential service\nimport type { myService } from \"./my-service\";\n\n// Initialize the Differential SDK with the same API secret\nconst d = new Differential(\"MY_API_SECRET\");\n\n// Create a client for the service.\n// (Notice that you don't have to provide an endpoint. Clients talk to the control-plane)\nconst client = d.service\u003ctypeof myService\u003e(\"my-service\");\n\n// call the remote functions as if they were local, with full type safety\nclient.sum(1, 2).then(console.log); // 3\n\nclient.get(\"https://api.differential.dev/live\").then(console.log); // { status: \"ok\" }\n```\n\n## How can I get started?\n\n1. [Build your first end-to-end Differential service in 2 minutes](https://docs.differential.dev/getting-started/quick-start/)\n2. [Sign up for Differential Cloud](https://console.differential.dev) (managed version of Differential)\n\n## More Documentation\n\nAll documentation is hosted at [docs.differential.dev](https://docs.differential.dev). Here are some quick links to get you started:\n\n- [Thinking in Differential](https://docs.differential.dev/getting-started/thinking/)\n- [How it works under the hood](https://docs.differential.dev/advanced/how-things-work/architecture/)\n- [Customizing Function Call Behavior](https://docs.differential.dev/getting-started/customizing-function-calls/)\n\n# About this repo\n\nThis is a mono-repo for almost all of the Differential codebase. It contains the following repositories:\n\n- [Control Plane](./control-plane/) The control plane is the central command \u0026 control for a differential cluster. This is fully open source and can be run on your own infrastructure. We also offer a hosted version of the control plane at [www.differential.dev](https://differential.dev).\n- [Typescript SDK](./ts-core/) The Typescript SDK is the main way to interact with Differential. It is used to define, run and call services.\n- [Admin Console](./admin) The admin console is a web-based UI for Differential. It is used to visualize the service registry, view logs, and more.\n- [CLI](./cli) The CLI is a command-line interface for Differential. It is used to interact with the control plane, deploy services, and more.\n- [Docs](https://docs.differential.dev) The docs are the main source of information for Differential. They are hosted at [/docs](./docs/).\n\n# Contributing\n\nWe welcome contributions to Differential! Please see our [contributing guide](./CONTRIBUTING.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdifferentialhq%2Fdifferential","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdifferentialhq%2Fdifferential","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdifferentialhq%2Fdifferential/lists"}