MUNA is a lightweight, high-performance API for generating fantasy names. It is built using Hono and powers name generation using the @ironarachne/made-up-names library.
- Multiple Races: Generate names for classic fantasy races like Elves, Dwarves, Orcs, and more.
- Name Types: Support for various categories including male, female, family names, and place names (towns, regions).
- Fast & Simple: Returns results in JSON format.
- CORS Enabled: Ready for client-side usage.
GET /
Returns a welcome message listing all currently supported races and basic usage instructions.
GET /race/:race/:nameType/:count
Generates a list of names based on the specified parameters.
Parameters:
:race: The fantasy race (e.g.,elf,dwarf,human,orc).:nameType: The type of name to generate. Common types include:malefemalefamilygiven(mix of male/female)townregion
:count: The number of names to generate (integer).
Example:
curl http://localhost:3000/race/elf/female/5Response:
{
"count": 5,
"names": [
"Name1",
"Name2",
"Name3",
"Name4",
"Name5"
]
}-
Clone the repository:
git clone https://github.com/ironarachne/muna.git cd muna -
Install dependencies:
bun install
To start the development server using Bun:
bun devThe server will start (typically on port 3000).
This project uses Vitest for testing.
To run both unit tests and integration tests, just run:
bun testContributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
Please ensure you add appropriate tests for any new functionality.
This project is licensed under the MIT License.