{"id":14155584,"url":"https://github.com/brandon-schabel/bnkit","last_synced_at":"2025-08-06T01:32:16.217Z","repository":{"id":153900598,"uuid":"625913974","full_name":"brandon-schabel/bnkit","owner":"brandon-schabel","description":"Bun Nook Kit is a toolkit on Bun with no added dependencies, use with your existing app or build a fullstack with just Bun Nook Kits built in modules.","archived":false,"fork":false,"pushed_at":"2024-08-07T06:35:04.000Z","size":9668,"stargazers_count":22,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-01T03:35:29.739Z","etag":null,"topics":["bnk","bun","fullstack","kit","library","mit-license","nook","web"],"latest_commit_sha":null,"homepage":"https://nookit.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandon-schabel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-04-10T11:45:52.000Z","updated_at":"2024-11-11T17:37:36.000Z","dependencies_parsed_at":"2023-07-19T02:40:00.354Z","dependency_job_id":"567c191a-5cd2-49a2-b5b0-0886b498e165","html_url":"https://github.com/brandon-schabel/bnkit","commit_stats":null,"previous_names":["brandon-schabel/instant-bun","brandon-schabel/u-tools","brandon-schabel/bun-nook-kit","nookit-dev/bnkit","brandon-schabel/bnkit"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandon-schabel%2Fbnkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandon-schabel%2Fbnkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandon-schabel%2Fbnkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandon-schabel%2Fbnkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandon-schabel","download_url":"https://codeload.github.com/brandon-schabel/bnkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228821408,"owners_count":17977167,"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":["bnk","bun","fullstack","kit","library","mit-license","nook","web"],"created_at":"2024-08-17T08:04:08.599Z","updated_at":"2024-12-09T02:31:28.474Z","avatar_url":"https://github.com/brandon-schabel.png","language":"TypeScript","funding_links":[],"categories":["web"],"sub_categories":[],"readme":"# Bun Nookit (BNK)\n\n![BNK Logo](https://github.com/nookit-dev/bnkit/assets/18100375/d9f91bca-8875-4c00-8429-87e43b2a026f)\n\n**Bun Nookit (BNK)** is a comprehensive toolkit for software development, leveraging the power of Bun and TypeScript. With zero third-party dependencies, strong TypeScript inferencing, and a focus on Web API standards, BNK offers a modular, type-safe, and efficient way to build robust applications.\n\n![GitHub License](https://img.shields.io/github/license/nookit-dev/bnkit)\n\n![npm](https://img.shields.io/npm/v/bnkit?logo=npm) ![GitHub release (with filter)](https://img.shields.io/github/v/release/nookit-dev/bnkit) ![Stars](https://img.shields.io/github/stars/nookit-dev/bnkit)\n![npm bundle size](https://img.shields.io/bundlephobia/min/bnkit) ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/bnkit)\n\n![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/bun_nook_kit). ![Discord](https://img.shields.io/discord/1164699087543746560)'\n\n## BNK Server Quickstart\n\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/nookit-dev/bnkit/main/scripts/quickstart.sh)\n```\n\nVisit `http://localhost:3000` in your browser and you should see Hello world and\n`http://localhost:3000/json` for the json\n\n---\n\n###\n\n# [📋 Documentation](https://nookit.dev/readme)\n\n#### [🧩 Modules Docs](https://nookit.dev/modules)\n\n#### [🖥️ BNK CLI Docs](https://nookit.dev/bnk-cli/bnk-cli-readme)\n\n#### [🔌 Plugin Docs](https://nookit.dev/plugins/BNK+Plugins)\n\n###\n\n## Bun Nookit Package Installation\n\nInstall in your project:\n`bun add bnkit`\n\nPlugin install example:\n`bun add @bnk/react`\n\nUse any an all Bun Nookit modules - server example with json response (similar to starter project)\n\n`index.ts`\n\n```typescript\nimport { jsonRes, serverFactory } from 'bnkit/server'\nimport { middleware, type RoutesWithMiddleware } from './middlewares'\n\nconst routes = {\n  '/': {\n    // parse from request if neeeded\n    get: (request) =\u003e new Response('Hello World!'),\n  },\n  '/json': {\n    get: (request) =\u003e\n      bnk.server.jsonRes({\n        message: 'Hello JSON Response!',\n      }),\n  },\n} satisfies RoutesWithMiddleware\n\nconst { start, routes } = bnk.server.serverFactory({\n  routes,\n  middleware,\n})\n\n// start on default port 3000\nstart()\n```\n\n## Discord Server\n\nJoin our [Discord Server](\"https://discord.gg/rQyWN7V6\") https://discord.gg/rQyWN7V6, drop in and ask questions, give feedback or just for a chat!\n\n## Key Highlights\n\n- **Zero Third Paty Dependencies** - BNK uses nothin' but Bun\n- **Unit Tested** - To ensure BNK is reliable, changeable, and upgradeable.\n\n- **TypeSafe with Strong TypeScript type Inferencing** - Strong types tell you where things are incorrect, strong type inferrence allows you to utilize the advantages of strong types and not having to deal with too much TypeScript.\n\n- **Modular** Everything is built with as little direct dependency on other modules in the repo, however they still work together. Soon I'll be working on a full stack auth package which will utilize everything from server routes, cookies, database(sqlite).\n\n- **Builds on Web APIs** Bun itself is built on strong principles of sticking to Web APIs In order to maintain as much comptaibility across various packages, BNK sticks to the fundementals of the webplatform APIs.\n\n## Plugins\n\nCurrently Bun Nookit has a React plugin, as well as a hook called `useServerState` for connecting to a Bun Nookit websocket server state, a `useLocalStorage` hook, and a `useClipboard` hook.\n\n## Architecture\n\nBun Nookit is built upon a robust and flexible architecture using factory functions, taking full advantage of their benefits to offer a streamlined, efficient, and versatile toolkit for your development needs.\n\n- **Encapsulation**: Bun Nookit employs factory functions to streamline object creation, concealing the complexity of the process and offering a user-friendly interface. This enables you to utilize module functionalities without delving into the detailed construction logic.\n\n- **Adaptability**: Factory functions in Bun Nookit are engineered to return varied object types, dependent on input parameters, ensuring the toolkit can be precisely adapted to meet your project's unique requirements.\n\n- **Code Reusability**: Adhering to functional programming principles, Bun Nookit’ factory functions facilitate efficient code management and hasten development through enabling code reusability and composability.\n\n- **Object Initialization**: Bun Nookit' factory functions manage complex object initialization, ensuring modules are instantiated with necessary properties or states.\n\nMoreover, Bun Nookit employs factory functions to inject additional context where needed. For example, in the files folder module, a base path can be specified to anchor all operations to a particular directory. In the fetcher’s case, it allows the provision of a TypeSafe interface to the module, enabling type-safe fetch requests throughout your project. It also enhances user experience and usability by providing intellisense for available functions in the module. Although Bun Nookit heavily utilizes factory functions, almost all functions within them can also be used directly.\n\nThis version aims to maintain the original meaning while enhancing clarity and grammatical structure. Let me know if further modifications are needed!\n\n## Alpha Software\n\nPlease use at your own risk, this is alpha software and is still very much in the early stages and the APIs are **guranteed** to change.\n\n## Coming Soon\n\n### Stacks 🥞\n\nI have a few templates for building full stack apps in the works.\n\n1. BNK Payments Stack - Use BNKs built in HTMLody and it's CSS engine to create interactive full stack applications with payments and auth preconfigured.\n2. BNK SSR React With Client Side Hydration with Auth - A Stack that will come preconfigurated with a full stack SSR'd BNK based server plugin. This allows you to take full advantage of the existing React ecosystem.\n3. Decoupled Client/Server with Auth\n\n### Finalize V1 APIs\n\nClose To Final For V1:\n\n- Server\n- SQLite\n- UUID\n- JWT\n- Cookies\n- HTMLody/CSS-Engine\n- Fetcher\n\n### Dev Tools\n\n### Use JS Libraries Like React Anywhere in HTMLody\n\n### Better handling for Server Sent Events in Server, Fetcher, etc\n\n## Screenshots\n\n(if you made it this far)\n\nCreate typesafe server routes and middleware!\n\n\u003cimg width=\"555\" alt=\"Xnapper-2023-11-14-19 43 47\" src=\"https://github.com/nookit-dev/bnkit/assets/18100375/0d66c9ec-0f3a-487c-98f8-8c14faeaa82d\"\u003e\n\n\u003cimg width=\"582\" alt=\"Xnapper-2023-11-14-19 47 14\" src=\"https://github.com/nookit-dev/bnkit/assets/18100375/78afc0e7-46c0-4269-8072-e8622f111b08\"\u003e\n\n### Sponsors\n\nNone! Be the first to sponsor BNK :)\n\n## License\n\nBun Nookit is licensed under the MIT License. Enjoy the freedom to use, modify, and distribute the software under very permissive terms.\n\nJumpstart your journey to revolutionary software development with Bun Nookit!\n\nContribute to the docs:\n\n### [Docs Repo](https://github.com/nookit-dev/bnkit-docs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandon-schabel%2Fbnkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandon-schabel%2Fbnkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandon-schabel%2Fbnkit/lists"}