Skip to content

RESTful API built with a clean architecture approach, utilizing the Bun for runtime, Elysia framework, and Prisma ORM for database operations.

Notifications You must be signed in to change notification settings

bryan-matheus/bun-clean-architecture-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API with Clean Architecture using Bun, Elysia, and Prisma ORM

This project is a RESTful API built with a clean architecture approach, utilizing the Bun for runtime, Elysia framework, and Prisma ORM for database operations. The API exposes two routes: GET /users and POST /users.

Project Structure

The project structure is organized as follows:

  • src/
    • adapters/
      • This directory contains adapters responsible for interacting with external systems or data sources.
    • core/
      • The core of the application, containing business logic and domain-specific code.
    • external/
      • External dependencies and configurations reside in this directory.
    • http/
      • This directory houses HTTP-related files and modules for handling API requests.

Getting Started

To get started with this project, follow these steps:

Prerequisites

Before running the development server, ensure you have the following prerequisites installed:

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/bryan-matheus/bun-clean-architecture-api.git
  1. Navigate to the project directory:
cd bun-clean-architecture-api
  1. Install project dependencies:
bun install

Development

To start the development server, run the following command:

bun run dev

This will launch the server locally, and you can access it by opening http://localhost:3000/ in your web browser.

API Routes

The API provides the following routes:

  • GET /users: Retrieve a list of users.
  • POST /users: Create a new user.

You can use HTTP requests to interact with these routes and perform the respective actions.

Dependencies

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

RESTful API built with a clean architecture approach, utilizing the Bun for runtime, Elysia framework, and Prisma ORM for database operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published