@hedhog/core
v1.0.4
Published
<p align="center"> <img src="https://avatars.githubusercontent.com/u/177489127?s=200&v=4" alt="Hedhog Avatar" /> </p>
Downloads
578
Keywords
Readme
@hedhog/core
A lightweight and robust library for managing database entities and relationships in TypeScript. The Hedhog Core simplifies defining database columns, foreign keys, timestamps, and decorators while maintaining clean and maintainable code.
🚀 Features
- Entity Management 📋: Define entities and their database structures easily.
- Column Types 🛠️: Primary keys, foreign keys, timestamps, and custom column types.
- Decorators ✨: Create reusable decorators to handle user roles and public routes.
- Localized Data 🌐: Supports multilingual values and localization.
- Extensible and Modular 🧩: Built to integrate seamlessly into TypeScript projects.
📦 Installation
Install using npm
or yarn
:
npm install @hedhog/core
# or
yarn add @hedhog/core
🛠️ Core Components
🧩 Columns and Types
Define columns with primary keys, foreign keys, and timestamps.
🛡️ Decorators
Hedhog provides decorators for role-based access control and public routes.
🛠️ Pipes
Custom pipes for request validation and parsing.
🌍 Localization
Define localized fields with ease.
data:
country:
- code: BRA
name:
en: Brazil
pt: Brasil
🗂️ File Structure
src/
├── decorators/ # Role and public decorators
├── dto/ # Data Transfer Objects
├── functions/ # Utility functions
└── pipes/ # Request validation and parsing
└── index.ts # Main entry point
🤝 Contributing
We welcome contributions! To contribute:
- Fork the repository.
- Create a feature branch.
- Submit a pull request.
📜 License
This project is licensed under the MIT License.
🐞 Issues and Feedback
For bug reports, issues, or suggestions, please open an issue on our GitHub repository.
🦔 Hedhog Core - Simplify your entity definitions, one column at a time!
Se precisar de mais ajustes ou exemplos específicos, é só avisar! 😊🚀