{"id":22697544,"url":"https://github.com/tomaskraus/my-rossum-app","last_synced_at":"2025-03-29T18:26:47.490Z","repository":{"id":36992156,"uuid":"494089896","full_name":"tomaskraus/my-rossum-app","owner":"tomaskraus","description":"A simple app that uses the Rossum API","archived":false,"fork":false,"pushed_at":"2022-07-07T14:34:11.000Z","size":398,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-04T19:24:30.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomaskraus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-19T13:45:52.000Z","updated_at":"2022-05-28T14:29:09.000Z","dependencies_parsed_at":"2022-07-09T04:00:17.971Z","dependency_job_id":null,"html_url":"https://github.com/tomaskraus/my-rossum-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaskraus%2Fmy-rossum-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaskraus%2Fmy-rossum-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaskraus%2Fmy-rossum-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaskraus%2Fmy-rossum-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaskraus","download_url":"https://codeload.github.com/tomaskraus/my-rossum-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246225431,"owners_count":20743558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T05:14:19.756Z","updated_at":"2025-03-29T18:26:47.471Z","avatar_url":"https://github.com/tomaskraus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# my-rossum-app\nA simple app that uses the Rossum API\n\n## Purpose\n\nPart of Node.js developer hiring process is a requirement to create a simple web app that uses the Rossum API. \n\nThe task description can be found [here](https://docs.google.com/document/d/1qIeffRqRqgc4kvGC0XvwfA-t_qtGAGXsxxGAjFMv7oU)\n\n__Note__: I simplified the app, so that it responses with a transformed XML. The app also doesn't send that transformed XML elsewhere.\n\n## My approach\n\n- keep it simple, yet organized\n- use linter, formatter \u0026 follow naming conventions\n- use github-flow, pull-requests \u0026 link with issues\n- involve a bit of functional programming\n\n## My solution\n\n### API\n\n#### endpoint:\n\n/export/{queue_id}/annotations/{annotation_id}\n\nwhere:\n- queue_id is a quue identifier\n- annotation_id is an annotation identifier\n\n#### method:\n\nGET\n\n#### response body:\nsuccess:\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\u003cInvoiceRegisters\u003e\u003cInvoices\u003e\u003cPayable\u003e\u003cInvoiceNumber\u003e143453775\u003c/InvoiceNumber\u003e\u003cInvoiceDate\u003e2019-03-01T00:00:00\u003c/InvoiceDate\u003e\u003cDueDate\u003e2019-03-31T00:00:00\u003c/DueDate\u003e\u003cTotalAmount\u003e12978.81\u003c/TotalAmount\u003e\u003cNotes/\u003e ...\n```\nfailure:\n```json\n{\n    \"success\": false,\n    \"message\": \"failure description\"\n}\n```\n\n__Note__: there will be only \"succes\" field in the production app release:\n\n```json\n{\n    \"success\": true,\n}\n```\n\n#### response status codes:\n\nThose are my-rossum-app driven response status codes:\n\n- 200: Inputs are ok and my-rossum-app works well.\\\n However, a rossum-service can return a non-success code, for whatever reason. If so, in the response body json, the \"success\" fields is set to \"false\", and the \"message\" json field contains a brief description of the failure.\n- 401: user is not authenticated to view the content\n\n### Application first-time setup\n\nread the `env.template` file for further instructions.\n\n### Run\n\n```bash\nnpm start\n```\n\n### Test\n\nRun unit tests:\n```bash\n    npm test\n```\n\nTo run functional tests, do the following:\n\n1. Ensure the app is running.\n\n2. Run functional tests:\n    ```bash\n    npm run functional-test\n    ```\n\n\n## References\n\n- https://githubflow.github.io/\n- https://blog.logrocket.com/organizing-express-js-project-structure-better-productivity/\n- https://stackoverflow.com/questions/4024271/rest-api-best-practices-where-to-put-parameters\n- https://blog.appsignal.com/2021/09/01/best-practices-for-logging-in-nodejs.html\n- https://stackoverflow.com/questions/38821947/how-does-a-node-js-server-compare-with-nginx-or-apache-servers\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaskraus%2Fmy-rossum-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaskraus%2Fmy-rossum-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaskraus%2Fmy-rossum-app/lists"}