Haru.Api
0.5.0
dotnet new install Haru.Api::0.5.0
<p align="center" style="margin-bottom: 0;"> <img src="https://raw.githubusercontent.com/IAmJoshuaEscarez/haru/main/wwwroot/images/haru.png" width="230" alt="Haru Logo" /> </p> <h1 align="center" style="margin-top: -20px;">HARU</h1>
<p align="center"> <a href="https://github.com/IAmJoshuaEscarez/haru-cli" target="_blank" style="text-decoration:none;"><img src="https://img.shields.io/badge/Haru_CLI-v0.5.0-007acc?style=flat&logo=github&logoColor=white" alt="Haru CLI Version"></a> <a href="https://github.com/IAmJoshuaEscarez/haru.git" style="text-decoration:none;"><img src="https://img.shields.io/badge/Haru-v0.5.0-6b7280.svg?style=flat-square" alt="Haru Version"></a> <a href="https://dotnet.microsoft.com/download/dotnet/9.0" style="text-decoration:none;"><img src="https://img.shields.io/badge/.NET-9.0-512bd4.svg?style=flat-square" alt=".NET 9"></a> <a href="https://www.docker.com/" style="text-decoration:none;"><img src="https://img.shields.io/badge/Docker-supported-2496ed.svg?style=flat-square" alt="Docker"></a> <a href="https://www.apache.org/licenses/LICENSE-2.0" style="text-decoration:none;"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=flat-square" alt="License"></a> </p>
Overview
Haru is a .NET 9 Web API starter kit built on the Repository Pattern. It replaces complex dotnet commands with a simple CLI that automates project scaffolding, built-in JWT authentication with token rotation, and database configuration for MySQL or PostgreSQL based on user choice.
<br />
| Technical Features | Specification |
|---|---|
| Simplified CLI | Replaces long dotnet commands with simple commands for schema updates and scaffolding. |
| Automatic Config | Dynamically generates connection strings and Docker infrastructure based on user-selected MySQL or PostgreSQL providers. |
| Built-in Security | Native implementation of JWT authentication protocols featuring automated refresh token rotation. |
01. Prerequisites
Systems must satisfy the following technical requirements:
- Runtime — .NET SDK 9.0
- Containerization — Docker Engine (Desktop or Server)
02. Setup
Install the Haru global tool and initialize local template registration:
# Install tool via NuGet
dotnet tool install --global haru.cli --version 0.5.0
# Initialize core template
haru install
03. Docker Installation
Windows
- Download Docker Desktop from the official website.
- Run the installer and ensure WSL 2 is enabled.
- Restart your computer and launch Docker Desktop.
macOS
- Download the
.dmginstaller from Docker Hub. - Drag Docker to the Applications folder.
- Open Docker from your Applications to finish the setup.
Linux (Ubuntu)
# Download Docker convenience script
curl -fsSL https://get.docker.com -o get-docker.sh
# Run the install script
sudo sh get-docker.sh
# Start Docker service
sudo systemctl start docker
Optional steps for convenience:
# Allow current user to run docker without sudo
sudo usermod -aG docker $USER
# Logout and login again for changes to take effect
# Enable Docker to start on boot
sudo systemctl enable docker
# Verify installation
docker --version
docker run hello-world
04. Usage
Scaffolding
Haru prompts for your database choice and automatically configures your connection strings and Docker image.
# Instance Initialization (MySQL Default)
haru create MyApiName
# Instance Initialization (Direct initialization of MySQL)
haru create MyApiName mysql
# Instance Initialization (PostgreSQL)
haru create MyApiName postgresql
Database Workflow
Skip manual migration commands. Haru handles the persistence layer directly.
# Provision docker infrastructure
docker compose up -d
# Execute schema synchronization
haru migrate InitialSetup
haru update-db
05. Command Reference
| Command | Action |
|---|---|
haru install |
Registers the template locally |
haru uninstall |
Uninstall the template locally |
haru create |
Scaffolds project with auto-configured DB and Docker |
haru migrate |
Simplified command to add a database migration |
haru update-db |
Simplified command to sync database schema |
06. Removal
To purge the CLI from the local environment:
dotnet tool uninstall --global haru.cli
07. Project Resources
For technical contributions and source code access, please visit the official CLI repository:
- Haru CLI Repository — Source code, issue tracking, and tool documentation.
<br/> <br/>
<p align="center" style="opacity: 0.6; font-size: 0.85em; letter-spacing: 0.5px; margin-top: 40px; color: #6b7280;"> 2026 John Joshua Manalo Escarez </p>
<p align="center" style="margin-top: 10px;"> <a href="https://www.facebook.com/Jashesc" target="_blank" style="text-decoration: none;"><img src="https://img.shields.io/badge/Facebook-1877F2?style=flat&logo=facebook&logoColor=white" alt="Facebook" height="28" /></a> <a href="escarezjohnjoshuamanalo@gmail.com" style="text-decoration: none;"><img src="https://img.shields.io/badge/Email-D14836?style=flat&logo=gmail&logoColor=white" alt="Email" height="28" /></a> <a href="www.linkedin.com/in/joshuaesc" target="_blank" style="text-decoration: none;"><img src="https://img.shields.io/badge/LinkedIn-0A66C2?style=flat&logo=linkedin&logoColor=white" alt="LinkedIn" height="28" /></a> <a href="https://www.tiktok.com/@iamjosh_dotnetdev" target="_blank" style="text-decoration: none;"><img src="https://img.shields.io/badge/TikTok-000000?style=flat&logo=tiktok&logoColor=white" alt="TikTok" height="28" /></a> </p>
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.