Challenge Overview
Welcome to the “CRM - Correspondence Backend API Challenge”. We are currently building an internal web application for a client. This application will be divided into frontend and backend. This one of a series of challenges to build both applications.
CONTEXT
PROJECT CONTEXT
The client has requested to build a full stack application that involves both the backend REST API (Nest.JS) and a frontend application (Angular 9). This application will allow users to build a correspondence to clients based on Letter and Forms templates.
CHALLENGE CONTEXT
The goal of this challenge is to build the correspondence backend API from the design specifications.
CHALLENGE DETAILS
Technology and Framework
- NestJs
- Typescript
- NodeJs 12.x
- MongoDB
- AWS S3
Requirements
- Build the correspondence backend REST API from the provided documentation
- Must use the starter-template provided in the forum
- Swagger file and business logic documentation will be provided in the forum
- Design files and Angular Angular Prototype will also be provided for reference only
- For connection with MongoDB, the TypeORM library must be used (don’t use mongoose)
- Document API will need to be mocked. JSON files with response will be provided
- All GET calls to the document API to fetch data should be cached. Cache timeout should be configurable. Default value is 6h
- Filtering by market segment, audience, subject and state should be done by the correspondence backend API
- Download endpoint must generate a single PDF from all the documents in the correspondence
- Will need to call the POST endpoint for document proof to get the updated documents, use all the files attached to the correspondence and generate the single PDF file
- A library like this https://www.npmjs.com/package/easy-pdf-merge can be used
- Attachments must be uploaded to AWS S3
- A unique filename should be create to store the file in S3 (UUID and Timestamp). Original file name should be kept in database
- For the same conversation ID, original file name must be unique
- Unit test is in scope - database and external systems calls must be mocked
- Reference https://docs.nestjs.com/fundamentals/testing
Final Submission Guidelines
- Backend code based on the started pack