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

@stackit/stackit-cli

v1.1.84

Published

creating a template

Downloads

2

Readme

Stackit-CLI

Contributors npm-package

About

The Stackit-CLI project is a Node.js command-line interface (CLI) tool for interacting with the Stackit templates.

The tool allows the creation, selection, and deployment of project backend and frontend with a standard configuration and the creation of cloud resources.

The project's main objective is to provide an easy and quick way to build internal projects for the Stackit group from the command line.

Built With

Frontend Technologies

Backend Technologies

Cloud Technologies

Next Redux Jest GoogleAnalytics

UI Frameworks

Tailwind MaterialUI Bootstrap

  • TypeScript
  • NestJs
  • NodeJS
  • Redis
  • Terraform
  • Amazon
  • Digital-Ocean
  • Azure

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

  1. Install

    npm i @stackit/stackit-cli -g

    This package supports Node 10 and above

  2. Create a new project Once it’s finished, you will be able to create a new project by typing in your console/shell

    stackit-cli
  3. A prompt will appear on your terminal. Here you can select the stack and technologies you wish to implement in your project

    Note: You do not need to install everything at the start of your project. You can install certain modules using flag commands after a project is created.

  4. Install Yarn packages

    cd newProject
    cd nextjs or cd nestjs
    yarn install
  5. Enter your APIs in /terraform/variables.tf

    variable "API_KEY" {
       type        = string
       default     = ""
       description = "ENTER YOUR DESCRIPTION"
     }
  6. Enter your API in .env

    API_KEY = 'ENTER YOUR API'

Options

There are additional modules to implement with the Flags/Options:

  • -h, --help Provide the options available to you.

  • -r, --redis Implement redis in the project in your NestJS as an example mode in addition to adding the redis service in docker.

  • -g, --google-analytics <key> Integrate Google Analytics automatically into your NextJS.

  • -na, --next-auth Next Auth login module implementation to your NextJS.

  • -v, --version Provides the current version of Stackit CLI.

Run Example

Example .ENV local project

The env variables will depend on each project, this is a basic example.

# .env
$ DB_TYPE=postgres
$ DB_HOST=localhost
$ DB_PORT=5432
$ DB_USERNAME=postgres
$ DB_PASSWORD=postgres
$ DB_NAME=<yourdbname>
$ POSTGRES_SYNC=true
$ JWT_SECRET=TOP_SECRET_EXAMPLE
$ [email protected]
$ PGADMIN_DEFAULT_PASSWORD=admin
$ PGADMIN_LISTEN_PORT=80

# Terraform .env
$ AWS_ACCESS_KEY=""
$ AWS_SECRET_KEY=""

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Naming Convention and Folder Structure

  • Configuration
    • [fileName].config.ts
  • Constants
    • [fileName].constants.ts
  • Enums
    • [fileName].enum.ts
  • Services
    • One on each folder (named as dash-case)
      • [fileName].service.ts
  • Types
    • [fileName].types.ts
  • Utils
    • [fileName].util.ts
  • [CamelCaseFolder]
    • [CamelCaseFile].tsx
  • app
    • actions
      • [myActionFolder]
        • [myActionFile].ts
        • [myActionFile].spec.ts
    • process
      • commands
        • [myCommandFolder]
          • [myCommandFile].command.ts
          • [myCommandFile].command.spec.ts
      • errors
        • [myCommand].errors.enum.ts
      • command.type.ts
      • create-command.stack.ts
    • services
      • [myServiceFolder]
        • myServiceInterface.service.ts (for interfaces)
        • myService.service.mock.ts (for mocks)
        • myService.service.ts (for the service)
    • store
      • app.slice.ts
      • [myExtraReducer].extraReducers.ts
        • [extraReducerAction].ts (follow the structure)
  • auth
    • Same that on app folder
  • icons
    • [myIcon].[imageFormat]
      • Note: If it's an image that will be used on many sites, just add it to the root path with a dash-case. Otherwise, add a folder with the name of the page where it'll be used (in the dash-case case as well) and add it.
  • [MyFolder]
    • [MyFile].tsx
  • Wrapper.tsx (required)
  • Hooks
    • [myHook].ts
  • ui
    • ui.slice.ts
  • store.ts
  • Globals css at the root path (using dash-case)
  • Add a folder with the page where the style will be used and the file inside (both of them with dash-case)
  • controllers
    • [controller].controller.ts
  • decorators
    • [decorator].decorator.ts
  • dto
    • [dto].dto.ts
  • guards
    • [guard].guard.ts
  • services
    • [service].service.ts
  • strategies
    • [strategy].strategy.ts
  • dto
    • [dto].dto.ts
  • exceptions
    • [exceptionTypeFolder]
      • [exceptionType].exception.ts
  • middlewares
    • [middleware].middleware.ts
  • pipes
    • [pipe].pipe.ts
  • providers
    • [provider].provider.ts
  • constants.ts
  • [configFile].config.ts
  • [enum].enum.ts

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request