npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xgenx

v1.1.1

Published

A microservice template generator

Downloads

10

Readme

XgenX

XgenX is a microservice template generator. It helps you quickly scaffold a new microservice project with pre-configured architecture, APIs, and utility helpers, saving you time and ensuring consistency across your microservice projects.

Features

  • Generate microservice boilerplate for Go language.
  • Supports different architectural patterns like Clean Architecture.
  • Option to include REST APIs and utilities.
  • Select various databases like MySQL, PostgreSQL, MongoDB, Redis, and more.
  • Easily add logging, time utilities, and response helpers.
  • Supports custom external service integration.
  • Automatically installs Google Wire when using Clean Architecture.
  • Includes Makefile, editor config, and other project essentials.

Installation

xgenx is designed to be installed globally so you can use it in any project.

npm install -g xgenx

Once installed, you can run the xgenx command to generate your project.

Usage

To create a new microservice project, run:

xgenx

You will be prompted with a series of questions to configure your project, such as:

  • Project name
  • Programming language (currently supports Go)
  • Architecture type (e.g., Clean Architecture)
  • API type (e.g., REST)
  • Helpers and utilities to include (e.g., logging, time utilities)
  • Database choice (MySQL, PostgreSQL, MongoDB, etc.)
  • External service integration (optional)
  • Sample domain generation (optional)

After answering the prompts, xgenx will scaffold a new project in the specified directory.

Example

xgenx

Example prompts:

? Enter project name (e.g., my-microservice): awesome-service
? Choose programming language: Go
? Choose architecture type: Clean Architecture
? Enter Golang Module Name: github.com/yourname/awesome-service
? Choose API type: REST
? Choose helpers to include: Logging, General Rest Utils
? Choose databases to use: PostgreSQL
? Do you want to include a sample domain source? Yes
? Provide a name for the example Domain: user

Once the generation is complete, the directory awesome-service/ will contain the scaffolded project.

Configuration Options

Languages

Currently, xgenx supports Go for generating microservice boilerplates. More languages will be added in future releases.

Architecture

  • Clean Architecture: Pre-configured support for Clean Architecture.
  • MVP Architecture (Coming soon)

Databases

Select one or more databases to include in the project:

  • MySQL
  • PostgreSQL
  • MongoDB
  • ElasticSearch
  • Redis

Note: You cannot select both MySQL and PostgreSQL in the same project.

Helpers

xgenx allows you to include the following helpers in your project:

  • General Rest Utils: Common utilities for working with REST APIs.
  • Response Helper: Helpers for structuring API responses.
  • Time Utilities: Functions to handle time manipulation.
  • Logging: Structured logging for your service.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests on the GitHub repository.

Author

Created and maintained by Teuku Mulia Ichsan.