Skip to content

seenark/orpc-tutorial

Repository files navigation

ORPC Backend

A backend service built with Bun, TypeScript, and various modern technologies including Prisma, Redis, and ORPC server.

Prerequisites

  • Bun v1.2.13 or higher
  • Node.js and npm (for some development tools)
  • TypeScript v5 or higher

Project Setup

  1. Install dependencies:
bun install
  1. Environment Setup:

The project uses dotenvx for environment management. There are different environment files:

  • .env for development
  • .env.uat for UAT environment
  • .env.prod for production

To manage environment variables:

# Decrypt development environment
bun run env:dev:dc

# Encrypt development environment
bun run env:dev:ec

# Encrypt UAT environment
bun run env:uat:ec

Development

To start the development server:

bun run src/index.ts

Project Structure

/src
  /features      # Feature modules
  /providers     # Service providers (Prisma, etc.)

Technologies Used

  • Runtime: Bun
  • Language: TypeScript
  • Framework: Hono
  • Database: Prisma
  • Caching: Redis
  • Storage: MinIO
  • RPC: ORPC Server

Development Tools

  • ESLint with various plugins for code quality
  • Commitizen and Husky for git commit management
  • Lint-staged for pre-commit hooks
  • Custom commit message format with Gitmoji

Scripts

# Install husky
bun run prepare

# Environment management
bun run dotenvx
bun run env:dev:dc  # Decrypt development env
bun run env:dev:ec  # Encrypt development env
bun run env:uat:ec  # Encrypt UAT env

Contributing

This project uses:

  • Commitizen for standardized commit messages
  • Husky for git hooks
  • ESLint for code quality
  • Gitmoji for commit message formatting

Please ensure you follow the established coding standards and commit message conventions when contributing.

License

Refer to the project's license file for licensing information.

About

this repo is along with my tutorial blog for orpc + effect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published