Skip to main content

base-be

This plugin contains the base for an nest project setup. This base plugin establishes the foundation and is designed to integrate more plugins.

Overview

The base module provides the core setup necessary for a minimal NestJS application. It includes a basic controller and service as examples, and sets the stage for integrating additional modules via an automated process.

Features

  • Core NestJS setup with primary modules.
  • Example controller and service to demonstrate functionality.

Project Structure

base-be/
|--src/
| |-- index.ts -> (plugin installation scripts)
|--template -> (nestjs project)
| |--src/
| | ├── README.md
| | ├── package-lock.json
| | ├── package.json
| | ├── schema.gql
| | ├── src
| | │ ├── app.controller.spec.ts
| | │ ├── app.controller.ts
| | │ ├── app.module.ts
| | │ ├── app.resolver.ts
| | │ ├── app.service.ts
| | │ ├── common
| | │ │ ├── dto
| | │ │ │ ├── api-response.ts
| | │ │ │ └── graphql-response.ts
| | │ │ ├── enums
| | │ │ │ └── auth-type.enum.ts
| | │ │ ├── filters
| | │ │ │ └── http-exception.filter.ts
| | │ │ ├── interceptor
| | │ │ │ └── transform.interceptor.ts
| | │ │ ├── logger
| | │ │ │ └── logger.service.ts
| | │ │ └── redoc
| | │ │ └── redoc.middleware.ts
| | │ ├── config
| | │ │ ├── env-config.module.ts
| | │ │ └── env.config.ts
| | │ └── main.ts
| | ├── tsconfig.build.json
| | └── tsconfig.json

Installation steps

  1. This will be added when you initiate a project

Post Installation steps

  1. yarn install or npm install
  2. Create a .env.development file with all the variables present in the .env.example file or run cp .env.example .env.
  3. Start the development server: npm run start:dev
  4. Access GraphQL at: http://localhost:3000/graphql
  5. Access Swagger at: http://localhost:3000/api

Structure

  • src/: Source directory containing application code.
    • app.controller.ts: A basic controller with a single route.
    • app.service.ts: A service to handle application logic.
    • app.module.ts: The root module orchestrating the application.
  • test/: Directory for unit and end-to-end tests.
  • node_modules/: Directory for installed NPM dependencies.
  • package.json: Configuration file for NPM packages and scripts.
  • README.md: Documentation for the base module.