# radigio-proposal

> Microservice for proposal

Latest version **1.0.0** (published 2023-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install radigio-proposal
pnpm add radigio-proposal
yarn add radigio-proposal
bun add radigio-proposal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-10-09 |
| First published | 2023-10-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 33 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marketron |
| Maintainers | rajendraprasadknode |
| Keywords | proposal, radigio |

## Links

- npm: https://www.npmjs.com/package/radigio-proposal
- Repository: https://github.com/Marketron/radigio-proposal
- Homepage: https://github.com/Marketron/radigio-proposal#readme
- Issues: https://github.com/Marketron/radigio-proposal/issues
- npm.io page: https://npm.io/package/radigio-proposal

## Dependencies (33)

- [pg](https://npm.io/package/pg.md) ^8.7.1
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [path](https://npm.io/package/path.md) ^0.12.7
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [busboy](https://npm.io/package/busboy.md) ^0.2.14
- [dotenv](https://npm.io/package/dotenv.md) ^6.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [express](https://npm.io/package/express.md) ^4.16.3
- [@hapi/joi](https://npm.io/package/@hapi/joi.md) ^15.0.3
- [sequelize](https://npm.io/package/sequelize.md) ^6.6.5
- [image-size](https://npm.io/package/image-size.md) ^0.8.3
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0
- [@sentry/node](https://npm.io/package/@sentry/node.md) 5.11.1
- [sequelize-cli](https://npm.io/package/sequelize-cli.md) ^6.2.0
- [@marketron/cache](https://npm.io/package/@marketron/cache.md) 1.1.2
- [@marketron/logger](https://npm.io/package/@marketron/logger.md) 1.1.3
- [@marketron/rabbit](https://npm.io/package/@marketron/rabbit.md) 1.9.1
- [express-validator](https://npm.io/package/express-validator.md) ^5.3.1
- [busboy-body-parser](https://npm.io/package/busboy-body-parser.md) ^0.3.2
- [swagger-ui-express](https://npm.io/package/swagger-ui-express.md) ^4.0.7
- [@marketron/tradedesk](https://npm.io/package/@marketron/tradedesk.md) 1.0.1
- [@marketron/dispatcher](https://npm.io/package/@marketron/dispatcher.md) 1.0.0
- [@marketron/middleware](https://npm.io/package/@marketron/middleware.md) 2.0.3
- [@marketron/http-client](https://npm.io/package/@marketron/http-client.md) 1.0.0
- [@marketron/file-storage](https://npm.io/package/@marketron/file-storage.md) 1.0.0
- [@marketron/response-util](https://npm.io/package/@marketron/response-util.md) 1.0.0
- [@marketron/joi-custom-lib](https://npm.io/package/@marketron/joi-custom-lib.md) 1.1.27
- [@marketron/media-schedule](https://npm.io/package/@marketron/media-schedule.md) 1.0.0
- [@marketron/metadata-client](https://npm.io/package/@marketron/metadata-client.md) 1.1.2
- [@marketron/feature-flag-client](https://npm.io/package/@marketron/feature-flag-client.md) 1.0.3
- [@marketron/meta-common-validations](https://npm.io/package/@marketron/meta-common-validations.md) 1.0.11

## Recent versions

- 1.0.0 (latest) — 2023-10-09

## README

# radigio-proposal

This is the repository for proposal management.

![Master workflow](https://github.com/Marketron/radigio-proposal/workflows/Master%20workflow/badge.svg)

## Table of contents

- [Prerequisite](#prerequisite)
- [Setup Instructions](#setup-instructions)
- [Environment Variables](#environment-variables)
- [Test](#test)
- [Coverage](#coverage)
- [Linting](#linting)
- [Sonarqube](#sonarqube)
- [Pull Request](#pull-request)
- [Swagger Docs](#swagger-docs)
- [Dependency Services](#dependency-services)

## Prerequisite

- Install [Node.js](https://nodejs.org/en/) (10.15.0)
- Install [Postgres](https://www.postgresql.org/) (10.7)
- Install yarn (`npm i yarn -g`)
- Install typescript (`npm i typescript -g`)

## Setup Instructions

- Clone mentioned projects in your workspace
  _ radigio-proposal (`git clone https://github.com/Marketron/radigio-proposal`)
  _ radigio-common-utilities (`git clone https://github.com/Marketron/radigio-common-utilities`)
- `cd radigio-common-utilities`
- `git checkout develop`
- `cd radigio-proposal`
- `git checkout develop`
- Run `yarn` - to install the packages
- Change environment variables. Please take a look at [Environment Variables](#environment-variables)
- Run `yarn start`

## Environment Variables

- `cd radigio-proposal`
- Copy env file `cp .env-example .env`
- Modify SQL_USERNAME, SQL_PASSWORD, SQL_HOST and SQL_PORT as per your localhost/remote server.
- Make sure METADATA_BASE_URI and ORDER_BASE_URI is pointing to correct services (local or dev servers)
  example: http://localhost:3006/metadata/api, http://localhost:3005/order/api
- AWS_S3_KEY and AWS_S3_SECRET should be added
- Give sonar details if you like to run sonar locally
- Create proposal db as per env file. (example: if SQL_DATABASE=radigio_proposal then create radigio_proposal_dev DB for dev env and radigio_proposal_test DB for test env in your local postgres)

## Test

- To execute tests, run `yarn test`

## Coverage

- To see test coverage report, run `yarn coverage`

## Linting

- To see lint issues, run `yarn lint`

## Sonarqube

- Before running sonarqube we have to run `yarn coverage` for code coverage and test cases report
  _ Go to file coverage/lcov.info, remove current directory path from all SF tag
  _ If you are outside the MSP network, please connect to VPN to generate the sonar report. \* Run `yarn sonar`

## Pull Request

- `git clone https://github.com/Marketron/radigio-proposal.git`
- `git checkout develop`
- `git branch -b <feature/branch_name>`
  - for feature: feature/jira_story_number_feature_name (`git branch -b feature/DIG_350_proposal_creation`)
  - for bugfix: bugfix/jira_issue_number_issue_desc (`git branch -b bugfix/DIG_351_validation_error_on_save`)
- Commit and push your changes to feature or bugfix branch.
- Create a pull request in github and add a reviewer.

# Swagger Docs

After running `yarn start`, swagger docs are accessible from browser using mentioned link.
`http://localhost:<HTTP_PORT>/api-docs/`

# Dependency Services

'radigio-metadata' and 'radigio-order' services should run along with proposal to get the meta data and create order respectively.

## Packages

Run `npm login` to get access to @marketron packages.

---
_Source: https://npm.io/package/radigio-proposal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
