{"id":13687511,"url":"https://github.com/telamon/picostack","last_synced_at":"2025-10-11T11:31:41.002Z","repository":{"id":40590338,"uuid":"490669641","full_name":"telamon/picostack","owner":"telamon","description":"Web8.0 Framework, 0% Backend, 10'000% Frontend","archived":false,"fork":false,"pushed_at":"2024-07-31T13:40:01.000Z","size":93,"stargazers_count":69,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-19T01:51:34.795Z","etag":null,"topics":["blockchain","decentralized","framework","frontend","p2p","peer-to-peer"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/telamon.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-10T11:36:26.000Z","updated_at":"2025-09-06T18:47:54.000Z","dependencies_parsed_at":"2025-01-14T14:08:52.314Z","dependency_job_id":"e00c7be9-04c4-4f71-bc30-8816df265f94","html_url":"https://github.com/telamon/picostack","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.016393442622950838","last_synced_commit":"c0829c212e498660d5837979db65075ad311483d"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/telamon/picostack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telamon%2Fpicostack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telamon%2Fpicostack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telamon%2Fpicostack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telamon%2Fpicostack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telamon","download_url":"https://codeload.github.com/telamon/picostack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telamon%2Fpicostack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007031,"owners_count":26084227,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","decentralized","framework","frontend","p2p","peer-to-peer"],"created_at":"2024-08-02T15:00:55.815Z","updated_at":"2025-10-11T11:31:40.705Z","avatar_url":"https://github.com/telamon.png","language":"JavaScript","readme":"```\n _ __  (_)  ___  ___   ___ | |_  __ _   ___ | | __\n| '_ \\ | | / __|/ _ \\ / __|| __|/ _` | / __|| |/ /\n| |_) || || (__| (_) |\\__ \\| |_| (_| || (__ |   \u003c\n| .__/ |_| \\___|\\___/ |___/ \\__|\\__,_| \\___||_|\\_\\\n|_|  network without super node\n```\n\n\u003e If you stash your entire Backend inside Frontend you get \"Blockend\".\n\nThis is a toolkit to build P2P application cores, using _emepheral_ states.\n\nWhy do we need yet another consensus engine in 202x?\nWell this one provides a non-token based approach to decentralization _(and also it runs in frontend/-user device with finite resources)_.\n\n**The General Idea**\nIn a picoverse nothing is permanent, blocks dissapear, chains corrupt,\nstates across nodes differ.\nThe global state exists but is considered \"non computable\", so each node attempts to gather and forward as many valid block sequences as it can hold, discarding lesser along the way.\nIn bc-terms pico could be called an intricate mempool that gives you fine control over computing states that \"could be\".\n\n\nThis kit exposes a higher level API to quickly design and test what ever consensus\nyou imagine.\nIf you stumble on a local state that you wish to persist as truth, you can of course\ncopy the pico-blocks to what ever medium you like.\nTheir format is binary and _quite_ space-efficient.\n\n\n**Update 2024**\nAfter _a lot_ of iterations picostore 3.x is starting to emerge.\nIn hindsight I would have liked to rename some components like `stack =\u003e core-kit` and `store =\u003e block-engine`,\nit makes more sense.\n\n\n### [[live demo]](https://pico-todo.surge.sh/)\n\n## core components\n\n- [picofeed](https://github.com/telamon/picofeed) Ultra-portable secure feed/chain-of-blocks\n- [picostore](https://github.com/telamon/picostore) block engine w/ garbarge collector.\n- [piconet](https://github.com/telamon/piconet) Internet Protocol redesigned for P2P, provides a stateless and easy to use alternative to network streams.\n- [Modem56](https://github.com/telamon/picochat/blob/master/modem56.js) hyperswarm to pico-net converter.\n- [nuro](https://github.com/telamon/piconuro) A pure functional approach to reactive store pattern, design your own reactive neural pathways, completely framework agnostic.\n- [HyperSimulator](https://github.com/telamon/hyper-simulator) Run dat/[hyper](https://hypercore-protocol.org/)-apps in an in-memory swarm and watch the chaos unfold.\n- [picorepo](https://github.com/telamon/picorepo) Lightweight persistent block store ontop of leveldb/leveljs.\n\n## Quickstart\n\nUse the [project template](https://github.com/telamon/pico-template):\n\n```bash\nnpx degit telamon/pico-template my-project\n```\n\nCheck the `README.md` in the generated folder.\n\n## usage\n\nExtend [`SimpleKernel`](./simple-kernel.js) when starting new.\n\n```js\n// blockend.js\nimport { SimpleKernel } from 'picostack'\nconst { decodeBlock } = SimpleKernel\n\nclass Kernel extends SimpleKernel {\n  constructor(db) {\n    super(db)\n\n    // Register reducer - see picostore docs\n    this.store.register({\n      name: 'clock', // slice name\n      initialValue: 0, // initial state\n      filter ({ block }) { // network-consensus\n        const { type, time } = decodeBlock(block.body)\n        if (type !== 'tick') return true // silent ignore\n        if (time \u003e Date.now()) return 'TimestampFromFuture'\n      },\n      reducer ({ block }) { // mutate state\n        const { time } = decodeBlock(block.body)\n        return time\n      }\n    })\n  }\n\n  // Create action\n  async createTick () {\n    const feed = await this.createBlock(\n      'tick', // BlockType:string\n      { time: Date.now() } // Payload:any\n    )\n    return feed.last.sig // block-id\n  }\n}\n\nasync function main() {\n  // Spawn 2 peers\n  const alice = new Kernel(memdown())\n  await alice.boot()\n\n  const bob = new Kernel(memdown())\n  await bob.boot()\n\n  // Attach state-observers\n  alice.store.on('clock', state =\u003e console.log('Alice:', state))\n  bob.store.on('clock', state =\u003e console.log('Bob:', state))\n\n  // Wire up\n  alice.spawnWire()(bob.spawnWire())\n\n  await alice.createTick()\n  // Both kernels logs new state\n}\nmain().catch(console.error)\n```\n\n## Ad\n\n```ad\n|  __ \\   Help Wanted!     | | | |         | |\n| |  | | ___  ___ ___ _ __ | |_| |     __ _| |__  ___   ___  ___\n| |  | |/ _ \\/ __/ _ \\ '_ \\| __| |    / _` | '_ \\/ __| / __|/ _ \\\n| |__| |  __/ (_|  __/ | | | |_| |___| (_| | |_) \\__ \\_\\__ \\  __/\n|_____/ \\___|\\___\\___|_| |_|\\__|______\\__,_|_.__/|___(_)___/\\___|\n\nIf you're reading this it means that the docs are missing or in a bad state.\n\nWriting and maintaining friendly and useful documentation takes\neffort and time.\n\n  __How_to_Help____________________________________.\n |                                                 |\n |  - Open an issue if you have questions!         |\n |  - Star this repo if you found it interesting   |\n |  - Fork off \u0026 help document \u003c3                  |\n |  - Say Hi! :) https://discord.gg/8RMRUPZ9RS     |\n |.________________________________________________|\n```\n\n## ZEN.md\n\nWord of advice to the brave, this code was written mainly during tired off-hours,\nit is intristically minimalistic and mostly dependency free.\n\nBest code, no code:\n\n- standard - no semis\n- spaces until tabs.\n- Uint8Array \u003e Buffer\n- JSDoc types on plebic APIs\n\nThat's it.. sorry.\n\n## License\n\n[AGPL-3.0-or-later](./LICENSE)\n\n2022 © Tony Ivanov\n","funding_links":[],"categories":["frontend"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelamon%2Fpicostack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelamon%2Fpicostack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelamon%2Fpicostack/lists"}