This is a robust template for backend development either for serverless or non-serverless using Node.js or SST (Serverless Stack) with Hono, Prisma, and Kysely. The project includes ESLint, Prettier, Husky, and lint-staged for code quality and consistency. It also features Vitest for testing, Swagger and Scalar for API documentation, and Docker for local database management. The template is set up with TypeScript for type safety and uses pnpm as the package manager.
Please read the repo's Project Structure & Code Organization here README.project-structure.md
Choose the approach that best fits your needs:
Branch: main For a basic setup using just the Hono server:
npx degit constROD/template-hono-prisma-kyselyBranch: with-sst-v2 For a setup integrated with Serverless Stack (SST) v2 - AWS Provider:
npx degit constROD/template-hono-prisma-kysely#with-sst-v2Branch: with-jwt-auth For a setup with JWT authentication:
npx degit constROD/template-hono-prisma-kysely#with-jwt-authChoose the command that corresponds to your preferred API layer approach.
- Download extension ESLint and Prettier - Code formatter in your VSCode.
- Install node using nvm or fnm (check version in .nvmrc)
- Install pnpm (check version in package.json file look for
packageManager) - Install Docker for database containerization.
- Install dependencies.
pnpm iDevelopment Mode:
- Start the database container.
pnpm db:start- Stop the database container.
pnpm db:stop- Start the development server.
pnpm devProduction Mode:
- Build the project.
pnpm build- Start the build for production.
pnpm start