Coder Social home page Coder Social logo

angelmadames / dgii-rnc-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 487 KB

An open-source, community-driven API for the DGII National Taxpayer Registry (RNC) in the Dominican Republic.

License: MIT License

Dockerfile 1.46% TypeScript 98.54%
api dgii dominican-republic national registry rnc server taxes

dgii-rnc-api's Introduction

DGII RNC โ€• API

๐Ÿงช Tests

Contents

Overview

An Open-source Community-driven API for the National Taxpayer Registry (RNC) of the Dominican Republic.

Created using Nest.

Commands

The DGII RNC API uses two commands:

  • download-rnc-file: downloads the DGII RNC zip file that will be processed by the API.

    To run the download-rnc-file command, you can use:

    npm run download-rnc-file
    # which executes the shell command: `ts-node ./src/cli.ts download-rnc-file`
  • process-rnc-file: ingests the unzipped RNC file (txt format by sending jobs to the queue. If the API server is running, it will begin processing the jobs right away.

    To run the process-rnc-file command, you can use:

    npm run process-rnc-file
    # which executes the shell command: `ts-node ./src/cli.ts process-rnc-file`

Database

The supported relational database for this project is PostgreSQL >= 16.x.

Migrations

To run the database migrations, first build the project, and then run:

npm run migration:run

Installation

npm ci

Running the API

npm run start # development mode
npm run dev # watch mode
npm run production # production mode

How to contribute

Read the contribution guidelines.

License

The DGII RNC API is MIT licensed.

dgii-rnc-api's People

Contributors

angelmadames avatar mancebo29 avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dgii-rnc-api's Issues

Implement release-it

Summary

  • We don't do manual stuff over here, with release-it with can generate automatic versioning and releases, as well as changelogs!

Remove unused or unnecessary code

Summary

  • A good code base needs to be free of unnecessary or unused code. We have to get rid of everything not in use, to avoid confusion and keep simplicity as a core value.

Add pagination to RNC endpoint

Summary

The root endpoint for the RNC module returns all DB records without pagination.

Expected behavior

The root endpoint for the RNC module returns DB records with pagination.

Implement Renovate

Summary

  • Gotta keep those dependencies secure and up to date! ๐Ÿ”’

Use appropiate entity/schema types for RNC table

Summary

  • All columns in the RNC entity schema use string as type. By using TypeScript and TypeORM, we are not taking advantage of the default validations and benefits proper data types would be for parsing and processing correctly the RNC file.

Suggested changes

  • creationDate -> Date
  • paymentSystem -> Enum
  • status -> Enum

Enable local development environment with Docker + Compose

Summary

  • Ensuring a working setup locally is essential for a welcoming open-source community. This issue tracks the effort of enabling Docker and Docker Compose for such purpose, also documenting how to use it in the README.md file.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @nestjs/cli to v10.4.4
  • fix(deps): update dependency nest-commander to v3.15.0
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

asdf
.tool-versions
  • node 20.15.0
docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • node 20-alpine
  • node 20-alpine
github-actions
.github/workflows/tests.yml
  • actions/checkout v4
  • actions/setup-node v4
  • postgres 16-alpine
npm
package.json
  • @inquirer/prompts ^5.1.2
  • @nestjs/bull ^10.1.1
  • @nestjs/common ^10.3.10
  • @nestjs/config ^3.2.3
  • @nestjs/core ^10.3.10
  • @nestjs/mapped-types *
  • @nestjs/platform-express ^10.3.10
  • @nestjs/typeorm ^10.0.2
  • axios ^1.7.2
  • bull ^4.15.1
  • chalk ^5.3.0
  • dotenv ^16.4.5
  • nest-commander ^3.14.0
  • pg ^8.12.0
  • rxjs ^7.8.1
  • typeorm ^0.3.20
  • @biomejs/biome ^1.8.3
  • @nestjs/cli ^10.4.2
  • @nestjs/schematics ^10.1.2
  • @nestjs/testing ^10.3.10
  • @types/express ^4.17.21
  • @types/jest ^29.5.12
  • @types/node ^20.14.10
  • @types/supertest ^6.0.2
  • jest ^29.7.0
  • source-map-support ^0.5.21
  • supertest ^7.0.0
  • ts-jest ^29.2.2
  • ts-loader ^9.5.1
  • ts-node ^10.9.2
  • tsconfig-paths ^4.2.0
  • typescript ^5.5.3

  • Check this box to trigger a request for Renovate to run again on this repository

RNC download file command should overwrite existing files

Current behavior

  • The current RNC download command does not update the unzipped file if it already exists.

Expected behavior

  • The current RNC download command should overwrite the existing file if the user agrees to do so.
  • If the user uses a command flag (ie. --overwrite) the command should overwrite the file without interactivity inputs.

Add basic Unit tests

Summary

  • We need some basic unit tests for our controller, commands, and utilities!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.