{"id":49335566,"url":"https://github.com/bedstack/elysia-drizzle-realworld-example","last_synced_at":"2026-04-27T00:32:31.232Z","repository":{"id":196239873,"uuid":"694792493","full_name":"bedstack/elysia-drizzle-realworld-example","owner":"bedstack","description":"RealWorld backend implementation built with ElysiaJS and Drizzle ORM","archived":false,"fork":false,"pushed_at":"2026-04-24T00:45:42.000Z","size":2720,"stargazers_count":64,"open_issues_count":16,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T02:30:05.271Z","etag":null,"topics":["arktype","backend","biomejs","bun","drizzle-orm","elysiajs","realworld","realworld-backend","scalar","server","typescript","web"],"latest_commit_sha":null,"homepage":"https://realworld.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"gothinkster/realworld-starter-kit","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bedstack.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":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-21T17:47:25.000Z","updated_at":"2026-04-24T00:45:04.000Z","dependencies_parsed_at":"2023-09-25T21:58:30.525Z","dependency_job_id":"7ce0b5e6-ed02-46e1-bbf5-f875816cfc8e","html_url":"https://github.com/bedstack/elysia-drizzle-realworld-example","commit_stats":null,"previous_names":["agnyz/elysia-realworld-example-app","agnyz/the-bed-stack","agnyz/bedstack","codingfrombed/bedstack","bedtime-coders/bedstack","yamcodes/bedstack","bedstack/elysia-drizzle-realworld-example"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bedstack/elysia-drizzle-realworld-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedstack%2Felysia-drizzle-realworld-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedstack%2Felysia-drizzle-realworld-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedstack%2Felysia-drizzle-realworld-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedstack%2Felysia-drizzle-realworld-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bedstack","download_url":"https://codeload.github.com/bedstack/elysia-drizzle-realworld-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedstack%2Felysia-drizzle-realworld-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arktype","backend","biomejs","bun","drizzle-orm","elysiajs","realworld","realworld-backend","scalar","server","typescript","web"],"created_at":"2026-04-27T00:32:31.147Z","updated_at":"2026-04-27T00:32:31.222Z","avatar_url":"https://github.com/bedstack.png","language":"TypeScript","readme":"# ![RealWorld Example App](assets/logo.png)\n\n\u003e ### ElysiaJS + Drizzle ORM codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API.\n\n### [Demo](https://demo.realworld.show)\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[RealWorld](https://github.com/gothinkster/realworld)\n\n[![Tests Status](https://github.com/bedstack/elysia-drizzle-realworld-example/actions/workflows/tests.yml/badge.svg?event=push\u0026branch=main\u0026)](https://github.com/bedstack/elysia-drizzle-realworld-example/actions/workflows/tests.yml?query=branch%3Amain+event%3Apush) [![License](https://custom-icon-badges.demolab.com/github/license/bedstack/elysia-drizzle-realworld-example?label=License\u0026color=blue\u0026logo=law\u0026labelColor=0d1117)](https://github.com/bedstack/elysia-drizzle-realworld-example/blob/main/LICENSE) [![ElysiaJS](https://custom-icon-badges.demolab.com/badge/ElysiaJS-0f172b.svg?logo=elysia)](https://elysiajs.com/) [![Drizzle](https://img.shields.io/badge/Drizzle-C5F74F?logo=drizzle\u0026logoColor=000)](https://drizzle.team/) [![ArkType](https://custom-icon-badges.demolab.com/badge/ArkType-0d1526?logo=arktype2\u0026logoColor=e9eef9)](https://arktype.io/) [![Scalar](https://img.shields.io/badge/Scalar-080808?logo=scalar\u0026logoColor=e7e7e7)](https://scalar.com/) [![Bun](https://img.shields.io/badge/Bun-14151a?logo=bun\u0026logoColor=fbf0df)](https://bun.com/) [![Biome](https://img.shields.io/badge/Biome-24272f?logo=biome\u0026logoColor=f6f6f9)](https://biomejs.dev/) [![Star](https://custom-icon-badges.demolab.com/github/stars/bedstack/elysia-drizzle-realworld-example?logo=star\u0026logoColor=373737\u0026label=Star)](https://github.com/bedstack/elysia-drizzle-realworld-example/stargazers/)\n\nThis codebase was created to demonstrate a fully fledged backend application built with **[ElysiaJS](https://elysiajs.com/)** and **[Drizzle ORM](https://orm.drizzle.team/)** including CRUD operations, authentication, routing, pagination, and more.\n\nWe've gone to great lengths to adhere to the **ElysiaJS** and **Drizzle ORM** community styleguides \u0026 best practices.\n\nFor more information on how this works with other frontends/backends, head over to the [RealWorld](https://github.com/gothinkster/realworld) repo.\n\n# How it works\n\n## Architecture\n\nThis project follows the [Bedstack](https://bedstack.js.org/) architecture - a modular, layered approach to building TypeScript backends:\n\n- **Modular structure** - Each domain (users, articles, comments, etc.) is a self-contained module with its own controller, service, repository, and DTOs\n- **Layered design** - Clear separation between Controller (HTTP handling) → Service (business logic) → Repository (data access)\n- **Type-safe data flow** - DTOs define request/response shapes, mappers transform between layers, schemas define database tables\n\n```\nsrc/\n├── users/          # User module\n│   ├── users.controller.ts\n│   ├── users.service.ts\n│   ├── users.repository.ts\n│   ├── users.schema.ts\n│   ├── dto/\n│   └── mappers/\n├── articles/       # Article module (same structure)\n├── shared/         # Shared utilities and error handling\n└── app.module.ts   # Root module composing all features\n```\n\n[Read more about the Bedstack architecture →](https://bedstack.js.org/)\n\n## Technologies\n\n- **[ElysiaJS](https://elysiajs.com/)** - Web framework for HTTP\n- **[Drizzle ORM](https://orm.drizzle.team/)** - TypeScript ORM for PostgreSQL\n- **[ArkType](https://arktype.io/)** - Runtime validation\n- **[Scalar](https://scalar.com/)** - API documentation\n- **[Bun](https://bun.sh/)** - JavaScript runtime and package manager\n- **[Biome](https://biomejs.dev/)** - Linting and formatting\n\n# Getting started\n\n1. **Install dependencies**\n\n    ```sh\n    bun i\n    ```\n\n2. **Create a `.env` file**\n\n   ```sh\n   cp .env.example .env\n   ```\n\n   Use the provided example values or replace them with your own.\n\n3. **Ensure Docker daemon is running and start the database service**\n\n   ```sh\n   bun db:start\n   ```\n\n4. **Migrate the schema to the database**\n\n   ```sh\n   bun db:migrate\n   ```\n\n5. **Run the development server**\n\n   ```sh\n   bun dev\n   ```\n\n6. **Run the API tests**\n\n   ```sh\n   bun run test # not `bun test`!\n   ```\n\n7. **(Optional) Start the [database studio](https://orm.drizzle.team/drizzle-studio/overview)**\n   ```bash\n   bun db:studio\n   ```\n\n# Deploy to production\n\n\u003e [!TIP]\n\u003e See more info in ElysiaJS's [Deploy to production](https://elysiajs.com/patterns/deploy) pattern.\n\n1. **Build the app**\n\n   ```sh\n   bun run build # not `bun build`!\n   ```\n\n2. **Run the server**\n\n   ```sh\n   bun preview\n   ```\n\n# Need help?\n\nIf you have questions or ideas:\n- Open a [GitHub Discussion](https://github.com/bedstack/elysia-drizzle-realworld-example/discussions)\n- Open an [Issue](https://github.com/bedstack/elysia-drizzle-realworld-example/issues) if you believe you found a bug\n\n# Contributors\n\nYou are welcome to [contribute to the project](https://github.com/bedstack/elysia-drizzle-realworld-example/blob/main/CONTRIBUTING.md)!\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://yam.codes\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2014360?v=4?s=100\" width=\"100px;\" alt=\"Yam C Borodetsky\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYam C Borodetsky\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#question-yamcodes\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"#ideas-yamcodes\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#doc-yamcodes\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#bug-yamcodes\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#example-yamcodes\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#infra-yamcodes\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#test-yamcodes\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Hajbo\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/35660161?v=4?s=100\" width=\"100px;\" alt=\"Hajbo\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHajbo\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-Hajbo\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#code-Hajbo\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#design-Hajbo\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#ideas-Hajbo\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#test-Hajbo\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#question-Hajbo\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/aruaycodes\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/57131628?v=4?s=100\" width=\"100px;\" alt=\"Aruay Berdikulova\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAruay Berdikulova\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-aruaycodes\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-aruaycodes\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedstack%2Felysia-drizzle-realworld-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbedstack%2Felysia-drizzle-realworld-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedstack%2Felysia-drizzle-realworld-example/lists"}