{"id":13568491,"url":"https://github.com/hyperfiddle/electric","last_synced_at":"2025-05-13T19:04:38.588Z","repository":{"id":65846686,"uuid":"299945306","full_name":"hyperfiddle/electric","owner":"hyperfiddle","description":"Electric Clojure: full-stack differential dataflow for UI","archived":false,"fork":false,"pushed_at":"2025-04-17T17:20:00.000Z","size":10748,"stargazers_count":1943,"open_issues_count":9,"forks_count":50,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-27T05:59:35.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperfiddle.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2020-09-30T14:24:43.000Z","updated_at":"2025-04-26T18:10:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fb95c2d-8346-4f62-8008-22d251bdccff","html_url":"https://github.com/hyperfiddle/electric","commit_stats":{"total_commits":2826,"total_committers":18,"mean_commits":157.0,"dds":0.5753715498938429,"last_synced_commit":"f620a2f89f8e706d1c3d42c29837bb2889e301ef"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperfiddle%2Felectric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperfiddle%2Felectric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperfiddle%2Felectric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperfiddle%2Felectric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperfiddle","download_url":"https://codeload.github.com/hyperfiddle/electric/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251094663,"owners_count":21535329,"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":[],"created_at":"2024-08-01T14:00:26.610Z","updated_at":"2025-05-13T19:04:38.582Z","avatar_url":"https://github.com/hyperfiddle.png","language":"Clojure","funding_links":[],"categories":["Clojure","并发编程"],"sub_categories":[],"readme":"# Electric Clojure – full-stack differential dataflow for UI\n\n`com.hyperfiddle/electric {:mvn/version \"v3-alpha-SNAPSHOT\"}` · 2024 Dec 11\n\n\u003e [!NOTE]\n\u003e Electric v3 is now in private beta! Request beta access here: https://www.hyperfiddle.net/early-access.html\n\n\nElectric is a new way to build rich, interactive web products that simply have too much interactivity, realtime streaming, and too rich network connections to be able to write all the frontend/backend network plumbing by hand. With Electric, you can compose your client and server expressions directly (i.e. in the same function), and the Electric compiler macros will **infer at compile time the implied frontend/backend boundary** and generate the corresponding full-stack app.\n\n![](docs/electric3-explainer.png)\n\n*Figure: In Electric, client and server expressions compose directly, and the Electric compiler transparently solves the network boundary through a straightforward dataflow graph analysis.*\n\n**How it works:** Unlike request/response frameworks, frontend ORMs, and client-side databases that suffer from request waterfalls, over/under fetching, large payload deserialization and other performance issues that get worse as your codebase and database grows, Electric uses a **custom Clojure/Script compiler to perform deep graph analysis** of your unified frontend/backend program and automatically determine the implied network cut, and then compile your program into separate reactive client and server target programs that cooperate and anticipate each other's needs. See [UIs are streaming DAGs (Getz 2022)](https://hyperfiddle.notion.site/UIs-are-streaming-DAGs-e181461681a8452bb9c7a9f10f507991) for a quick 10 minute video explainer of how this works and why it **actually doesn't result in the request waterfalls you might expect,** even in the presence of deep nesting, loops and control flow.\n\n- **Fully reactive:** unlike javascript frameworks, in Electric, reactivity is built directly into the programming language itself. Reactive-if, reactive-for, reactive lambda. When everything is reactive, it feels like nothing is reactive. No observables! No async types! De-load your mind and relax.\n\n\n- **Multi-tier**: frontend and backend are defined in the same expression, same function, same file. It's not code sharing, it's code *splitting*. Let the compiler infer the boundary from your code, instead of contorting your code — nay, your entire architecture — to fit the boundary.\n\n\n- **Network-transparent**: Electric closures close over server and client scope bindings, all in the same expression. The Electric compiler uses compile-time static knowledge of your source code to slice your expressions into client and server portions. Right through closures, loops and deeply nested function calls.\n\n\n- **Strong composition:** Network-transparent Electric functions are true functions. You have lambda, recursion, HOFs, closures, dynamic scope, macros, etc: the full undamaged composition power of Lisp. Goodbye \"functional core imperative shell\"; with Electric the **entire system is a function**.\n\nOur mission is to raise the abstraction ceiling in web development in the same way that managed memory did in the 90s, paving the way for something new.\n\n\n# Lightning talk – 5 minutes\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://share.descript.com/view/nJkFVXo15lM\" target=\"_blank\"\u003e\n    \u003cimg alt=\"lightning talk video\" src=\"./docs/lightning_talk_cover.png\" width=\"480\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n# Tutorial and live examples\n\n- v3 live tutorial: https://electric.hyperfiddle.net/\n- v3 starter app: not yet generally available, [request early access here](https://www.hyperfiddle.net/early-access.html)\n\n# Talks and essays\n- [Talk: Electric Clojure v3: Differential Dataflow for UI (Getz 2024)](https://hyperfiddle-docs.notion.site/Talk-Electric-Clojure-v3-Differential-Dataflow-for-UI-Getz-2024-2e611cebd73f45dc8cc97c499b3aa8b8)\n- [Talk: Electric Clojure: compiler managed datasync for rich web apps (Getz 2023)](https://hyperfiddle-docs.notion.site/Talk-Electric-Clojure-compiler-managed-datasync-for-rich-web-apps-Getz-2023-e089a8c0caeb456daaf2f9675e3ac4e7)\n- [Talk: UIs are streaming DAGs (Getz 2022)](https://hyperfiddle.notion.site/UIs-are-streaming-DAGs-e181461681a8452bb9c7a9f10f507991)\n- [Talk: Missionary: a functional approach to massively concurrent application design (Noel 2023)](https://hyperfiddle-docs.notion.site/Talk-Missionary-a-functional-approach-to-massively-concurrent-application-design-Noel-2023-a74748f610c044328d19d038a6daffa1)\n- [You don't need a web framework, you need a web language (Getz 2021)](https://hyperfiddle.notion.site/Reactive-Clojure-You-don-t-need-a-web-framework-you-need-a-web-language-44b5bfa526be4af282863f34fa1cfffc)\n- [Talk: Functional effects and streaming systems in Clojure (Noel 2021)](https://hyperfiddle-docs.notion.site/Talk-Functional-effects-and-streaming-systems-in-Clojure-Noel-2021-f3f907e5e9b04d08a3be33d53a3cd18e)\n- https://clojureverse.org/t/electric-clojure-a-signals-dsl-for-fullstack-web-ui/9788\n- https://clojureverse.org/t/signals-vs-streams/9840/1\n\n# Community\n\n* slack support chatroom: #hyperfiddle @ [clojurians.net](https://clojurians.net/)\n* follow https://twitter.com/dustingetz for progress updates\n* **Contributing:** we do not currently accept PRs against Electric itself as this has historically not been productive for us. However, **we'd love for you to contribute demos!** Many of our coolest demos were started by early users, this is an amazing and productive way for you to get involved and collaborate with us. This will require a signed contributors agreement (like Clojure), DM dustingetz on slack.\n\n# License\n\nElectric v3 is free for bootstrappers and non-commercial use, but is otherwise a commercial project, which helps us continue to invest and maintain payroll for a team of 4. See [license change announcement](https://tana.pub/lQwRvGRaQ7hM/electric-v3-license-change).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperfiddle%2Felectric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperfiddle%2Felectric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperfiddle%2Felectric/lists"}