bedstack/elysia-drizzle-realworld-example
À propos
RealWorld backend implementation built with ElysiaJS and Drizzle ORM
Données et analyseProgression mesurée des étoiles
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalElysiaJS + Drizzle ORM codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
Demo RealWorld
This codebase was created to demonstrate a fully fledged backend application built with ElysiaJS and Drizzle ORM including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the ElysiaJS and Drizzle ORM community styleguides & best practices.
For more information on how this works with other frontends/backends, head over to the RealWorld repo.
How it works
Architecture
This project follows the Bedstack architecture - a modular, layered approach to building TypeScript backends:
- Modular structure - Each domain (users, articles, comments, etc.) is a self-contained module with its own controller, service, repository, and DTOs
- Layered design - Clear separation between Controller (HTTP handling) → Service (business logic) → Repository (data access)
- Type-safe data flow - DTOs define request/response shapes, mappers transform between layers, schemas define database tables
src/
├── users/ # User module
│ ├── users.controller.ts
│ ├── users.service.ts
│ ├── users.repository.ts
│ ├── users.schema.ts
│ ├── dto/
│ └── mappers/
├── articles/ # Article module (same structure)
├── shared/ # Shared utilities and error handling
└── app.module.ts # Root module composing all features
Read more about the Bedstack architecture →
Technologies
- ElysiaJS - Web framework for HTTP
- Drizzle ORM - TypeScript ORM for PostgreSQL
- ArkType - Runtime validation
- Scalar - API documentation
- Bun - JavaScript runtime and package manager
- Biome - Linting and formatting
Getting started
Install dependencies
bun iCreate a
.envfilecp .env.example .envUse the provided example values or replace them with your own.
Ensure Docker daemon is running and start the database service
bun db:startMigrate the schema to the database
bun db:migrateRun the development server
bun devRun the API tests
bun run test # not `bun test`!(Optional) Start the database studio
bun db:studio
Deploy to production
[!TIP] See more info in ElysiaJS's Deploy to production pattern.
Build the app
bun run build # not `bun build`!Run the server
bun preview
Need help?
If you have questions or ideas:
- Open a GitHub Discussion
- Open an Issue if you believe you found a bug
Contributors
You are welcome to contribute to the project!
Yam C Borodetsky 💬 🤔 📖 🐛 💡 🚇 ⚠️ |
Hajbo 🚇 💻 🎨 🤔 ⚠️ 💬 |
Aruay Berdikulova 💻 🤔 |
Explorer des projets similaires
Chargement…
