Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c5f1536
feat: Initialize project scaffolding with core application components…
bouroo Jan 1, 2026
2953577
feat: Migrate template from Go/Echo/SQLC to Bun/Hono/Drizzle ORM with…
bouroo Jan 1, 2026
e8c7440
feat(template): Migrate template from Go/Echo/SQLC to Bun/Hono/Drizzl…
bouroo Jan 2, 2026
c771e53
ci: Add comprehensive CI/CD and testing infrastructure including Dock…
bouroo Jan 2, 2026
930bf6b
ci(config): update test database image to postgres:18-alpine
bouroo Jan 2, 2026
109fea4
Merge commit '9f1f7da' into init/migrate-from-go
bouroo Jan 2, 2026
feee2cd
feat(template): Migrate from Go/Echo/SQLC to Bun/Hono/Drizzle ORM
bouroo Jan 2, 2026
f6dcd32
Merge commit '55dc8a2' into init/migrate-from-go
bouroo Jan 2, 2026
ba13106
ci: Update Docker Compose command to V2 syntax
bouroo Jan 2, 2026
c0c1da2
Merge commit '0357325' into init/migrate-from-go
bouroo Jan 2, 2026
1e8ba67
chore(test): add test environment and directory
bouroo Jan 2, 2026
a17c5ce
Merge commit '33c2491' into init/migrate-from-go
bouroo Jan 2, 2026
b625318
ci(workflow): update database container name in readiness check
bouroo Jan 2, 2026
24a3582
Merge commit '073d8a7' into init/migrate-from-go
bouroo Jan 2, 2026
2065d0a
build: fix Docker build stage and update build for Bun
bouroo Jan 2, 2026
ca3a1f7
Merge commit '63dae66' into init/migrate-from-go
bouroo Jan 2, 2026
933ed7b
refactor(middleware): extract getRequestID to dedicated module
bouroo Jan 2, 2026
60e5c7f
Merge commit '9489440' into init/migrate-from-go
bouroo Jan 2, 2026
dcf9321
build(docker): fix base image tag and remove docker-compose version spec
bouroo Jan 2, 2026
4e1b2df
Merge commit '92ea5c3' into init/migrate-from-go
bouroo Jan 2, 2026
379e788
build(docker): standardize database env vars and update docker build
bouroo Jan 2, 2026
ea72184
Merge commit 'd0b9938' into init/migrate-from-go
bouroo Jan 2, 2026
837acd3
style(config): improve formatting of database env vars
bouroo Jan 2, 2026
6811b8d
Merge commit '7ac3c24' into init/migrate-from-go
bouroo Jan 2, 2026
ad43976
refactor(core): restructure application architecture and simplify use…
bouroo Jan 30, 2026
53c8e5c
chore: update documentation and consolidate ci workflows
bouroo Feb 10, 2026
83d3af6
feat(init): initialize project with Hono, Bun, and TypeScript archite…
bouroo Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
383 changes: 229 additions & 154 deletions .agents/rules/memory-bank/architecture.md

Large diffs are not rendered by default.

88 changes: 74 additions & 14 deletions .agents/rules/memory-bank/brief.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,81 @@
# Zercle Bun Template - Project Brief
# Project Brief

**Project Name:** zercle-bun-template
**Last Updated:** 2026-02-10

**Purpose:** Production-ready RESTful API template built with Bun runtime and Hono framework, featuring clean architecture, JWT authentication, and PostgreSQL database.
## Project Identity

**Target Audience:** Developers looking for a solid foundation to build Bun microservices or REST APIs with best practices already implemented.
- **Name:** zercle-hono-template
- **Type:** Production-ready Hono.js web application template with Bun runtime
- **Runtime:** Bun 1.x
- **Language:** TypeScript 5.x

**Key Value Proposition:**
## Purpose

- Clean architecture with domain-driven design principles
- Type-safe database operations using Drizzle ORM
- Comprehensive testing infrastructure (unit, integration, mocks)
- Production-ready features (JWT auth, rate limiting, CORS, logging)
- Docker support for easy deployment
- OpenAPI documentation out of the box
- Fast runtime with Bun's performance
This project provides a comprehensive, production-ready Hono.js web application template following Clean Architecture and Hexagonal principles. It serves as a foundation for building scalable, maintainable web services with JWT authentication, user management, and a well-structured codebase, leveraging Bun's high-performance runtime.

**Current Status:** Active development template with User and Task domains as working examples.
## Core Requirements

**Repository:** github.com/zercle/zercle-bun-template
1. **Clean Architecture Implementation**
- Feature-based organization
- Clear separation of concerns (Presentation → Business Logic → Infrastructure)
- Dependency injection for loose coupling

2. **Authentication & Security**
- JWT-based authentication with access/refresh tokens
- Bcrypt/Argon2 password hashing
- Secure configuration management

3. **Data Persistence**
- Better-SQLite3 database with Drizzle ORM for type-safe queries
- In-memory repository for testing/development
- Repository pattern for data access abstraction

4. **API Design**
- RESTful API with Hono.js framework
- OpenAPI/Swagger documentation via Scalar
- Standardized response format

5. **Developer Experience**
- Comprehensive testing (unit, integration)
- Type-safe development with TypeScript
- Structured logging with Bun's built-in logger or Pino
- Environment-based configuration

## Target Audience

- Backend developers building Hono.js web services
- Teams requiring a production-ready starting point
- Projects needing Clean Architecture implementation
- Applications requiring JWT authentication
- Services requiring SQLite integration with Drizzle ORM

## Key Features

- User CRUD operations with validation
- Email/password authentication
- JWT token generation and validation
- Password hashing with Bcrypt/Argon2
- Configurable repository implementations
- Graceful shutdown handling
- Request/response logging middleware
- Health check endpoints
- OpenAPI documentation with Scalar

## Project State

The template is production-ready with:
- Complete implementation of user and auth features
- Dual repository implementations (memory + SQLite/Drizzle)
- Comprehensive test coverage
- Docker support for containerization
- CI/CD configuration (pre-commit hooks, ESLint, Prettier)
- Migration scripts for database schema

## Bun Runtime Benefits

- **Fast Startup:** Near-instant cold starts
- **Native TypeScript:** No transpilation step required
- **Hot Reloading:** Instant reload during development
- **High Performance:** 3-4x faster than Node.js for many workloads
- **Native Testing:** Built-in test runner with Jest-compatible API
- **Bundle Management:** Fast npm/yarn/pnpm alternative with Bun install
Loading
Loading