This project fulfills the requirements outlined in the challenge document.
The api has been deployed using render free tier. More info: Render: Cloud Application Hosting for Developers
Find the project demo here: https://posting-senteces.onrender.com/
A Makefile has been provided for easy setup:
make all
A .env
is required to se up all the required variables. If in render, set it
manually in the UI.
Use the next command at build stage in Render: (make file not working fine in the platoform)
cd src/packages/deepl-api && npm install && cd .. && cd .. && cd .. && cd src/packages/firestore && npm install && cd .. && cd .. && cd .. && cd src/packages/logger && npm install && cd .. && cd .. && cd .. && npm install
This command will install the necessary packages and dependencies.
To start the API, use the following command:
npm run start
This will run the API using Node.js.
- The project has been designed with modularity in mind, allowing for easy reuse of code if the project is split into microservices in the future. The Node.js versions 18 and 20 are supported.
- The input data file has been modified to include a specific field called "category" for better organization and to enable the use of indexes for pagination in Firebase.
- While using a tool like Lerna for dependency management is an option, it can complicate the deployment process on platforms like Render.com. Therefore, a Linux executable has been provided for installing the dependencies.
- Data sanitization has been omitted due to time constraints.
- Please note that the above instructions assume you are running the commands on a Linux or macOS system. If you are on Windows, consider using Git Bash or a similar shell environment to execute the commands.
Angel E