Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vratix

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vratix

Easy-to-use, open-source modules that implement common API logic for seamless integration into Node.js APIs.

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
131
increased by1210%
Maintainers
0
Weekly downloads
 
Created
Source

Vratix CLI: vratix

Contributor Covenant

Overview

Easy-to-use, open-source modules that implement common API logic for seamless integration into Node.js APIs.

We created this library of reusable API modules to streamline API development. As backend developers, we often found ourselves doing repetitive work or copying outdated code from old projects and inconsistent online sources.

This led us to build a high-quality repository of reusable API modules that address common functionality used in every backend service. In the age of AI code assistants, these modules remain reliably crafted by developers, following best practices with minimal assumptions. This makes it easy for any developer to integrate these modules into any API project with flexibility.

Currently, the modules support Express.js, and we’re actively working to extend compatibility with other backend languages and popular Node.js frameworks.

Installation

You’re free to copy and use any code from the API Module Library — it's designed to be a foundation you can build on.

To simplify setup and integration, we created a CLI tool that helps you start new projects or integrate our API Modules into existing ones. The CLI handles imports, configurations, and dependencies automatically, so you can get up and running in minutes.

Start a New Project

Use the init command to create a new Node.js project or configure an existing one. Add the -c flag to specify a custom folder, or the CLI will set up the project in the current directory:

npx vratix-cli init

Configure Your Project

The CLI will prompt you with a few questions to configure your project and create ./config/modules.json:

Select your package manager: › pnpm
What database are you going to use: › PostgreSQL
Select your schema validator: › zod
Should we set up Docker containers for this service (docker-compose.yaml): › no / yes 
Should we configure a web proxy for this project (NGINX): › no / yes

Choose API Modules

During setup, select any initial API Modules you’d like to install as part of the project template:

☐ Auth (Basic)
☐ Stripe Subscriptions
☐ S3 File Upload
☐ None

If you choose "None" you can add modules individually after setup.

Set Folder Overrides

Customize the paths for main module folders if needed:

@components -> /src/components
@routes -> /src/routes
@middleware -> /src/middleware
@utils -> /src/utils

Note: Any folder overrides will still be located within /src.

Ready To Go

Once setup is complete, run:

npm run dev

to start your service.

To add additional modules later, simply use:

npx vratix-cli add auth-basic

Usage

init

Use the init command to create a new project using our Node.js template or to add a .config/modules.json file to an existing project.

npx vratix init

This command installs the template, sets up package.json, and configures the project based on your choices.

Options
Usage: vratix init|i [options]

Initialize project

Options:
  -c, --cwd <cwd>  The working directory. Defaults to the current directory.
  -h, --help       Display help for the command

add

The add command allows you to add new API modules to your project. It checks if both package.json and .config/modules.json exist in the project directory. If these files are missing, use the init command first.

npx vratix add <module>

This command installs all relevant files for the specified module, manages dependencies, and adjusts import statements as needed.

Options
Usage: vratix add [options] [module...]

Add an API module to your project

Arguments:
  module           The name of the module you want to add

Options:
  -c, --cwd <cwd>  The working directory. Defaults to the current directory.
  -h, --help       Display help for the command

Keywords

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc