Skip to content
/ bun-api-starter Public template

A simple but complete TypeScript API starter boilerplate in Bun runtime environment. Already covered transactional queries, input validation, JWT auth, and exception handling. Also helpful for VSCode user (debugger etc.)

Notifications You must be signed in to change notification settings

sultanfariz/bun-api-starter

Repository files navigation

TypeScript Bun API Starter

A simple and customizable TypeScript API boilerplate for Bun projects.

Table of Contents

Getting Started

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/typescript-node-boilerplate.git
cd typescript-node-boilerplate
  1. Install dependencies:
bun install
  1. Configure the project as needed. You may need to set environment variables from **
  2. To start the development server:
bun run index.ts

or you also could run debugger if you use Visual Studio Code.

  1. Create new routes, controllers, and repositories in the src directory.

File Structures

.
└── src/
    ├── controllers/
    │   └── ${...}Controller.ts -> configurable
    └── infrastructure/
        ├── commons/
        │   ├── exceptions/
        │   │   ├── index.ts
        │   │   ├── CustomError.ts
        │   │   └── ${...}Error.ts -> configurable
        │   └── middlewares
        ├── repository/
        │   ├── gsheet -> configurable
        │   │   └── user
        │   └── prisma -> configurable
        │       ├── user
        │       └── admin
        ├── transport/
        │   └── validator/
        │       ├── index.ts
        │       └── ${...}Schema.ts -> configurable
        ├── routes
        └── app.ts

you can insert any file or folder on the 'configurable' mark in above diagram.

About

A simple but complete TypeScript API starter boilerplate in Bun runtime environment. Already covered transactional queries, input validation, JWT auth, and exception handling. Also helpful for VSCode user (debugger etc.)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published