{"id":22777535,"url":"https://github.com/mulecode/file-service-poc","last_synced_at":"2025-10-10T04:38:05.451Z","repository":{"id":234167608,"uuid":"787899881","full_name":"mulecode/file-service-poc","owner":"mulecode","description":"An example spring boot application to handle file uploads and processing","archived":false,"fork":false,"pushed_at":"2024-04-22T08:48:34.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-05T15:22:21.247Z","etag":null,"topics":["java","poc","service"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mulecode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T11:55:01.000Z","updated_at":"2024-04-22T08:48:38.000Z","dependencies_parsed_at":"2025-02-07T01:15:22.671Z","dependency_job_id":null,"html_url":"https://github.com/mulecode/file-service-poc","commit_stats":null,"previous_names":["mulecode/file-service-poc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulecode%2Ffile-service-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulecode%2Ffile-service-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulecode%2Ffile-service-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mulecode%2Ffile-service-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mulecode","download_url":"https://codeload.github.com/mulecode/file-service-poc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326600,"owners_count":20759436,"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":["java","poc","service"],"created_at":"2024-12-11T19:14:44.765Z","updated_at":"2025-10-10T04:38:05.373Z","avatar_url":"https://github.com/mulecode.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Service (POC)\n\nAn example spring boot application to handle file uploads and processing.\n\n---\n\n### Features\n\n#### 1. CSV Upload and Processing (User-Facing Feature)\n\nThis feature involves allowing users to upload a CSV file via a REST API endpoint and processing the data of the\nuploaded file and returning a mapped representation of the data in JSON format to the user.\nAt the moment, this feature restricts the file size to 1MB and only accepts CSV files in a specific format.\n\nThis feature also implements a validation mechanism to ensure the uploaded file is in the correct format and adheres to\nthe specified rules.\nIf the file does not meet the requirements, the system returns an error\n\n![](./docs/img/UC:Upload-and-Process-CSV-Data.svg)\n\n**Future Enchantments**\n\n- Allow ingesting of different CSV files formats with difference processing rules.\n- Implement an Asynchronous processing mechanism to handle large files and long processing times.\n\n#### 2. Geo-Location Request Blocking Requests (Security Feature)\n\nThis feature implements a security measure to block requests based on the IP location of the requester, according to\nconfigurable rule policies It allows engineers to configure specific rules and policies governing which geographic\nregions, data centre origins, etc., are allowed or denied access to the system.\nBy restricting access and returning unauthorised access error codes, it enhances the system's security posture.\n\nThis feature integrates with a partner API, IP-API, to retrieve detailed IP data for each request.\nThis data includes the country code and various other pertinent information about the requester,\nproviding comprehensive insights into the origin of the request.\n\n![](./docs/img/UC:Geo-Location-Based-Access-Control.svg)\n\n**Future Enchantments**\n\n- Implement a caching mechanism to store IP data and reduce the number of API calls.\n\n**Alternative considerations**\n\n- Delegate this feature to a dedicated security service or firewall solution so this microservice can focus on its core\n  functionality.\n\n#### 3. Storing Request Data and IP Information (Data Management Feature)\n\nThis feature relies on the IP information captured from each request and integrates with a relational\ndatabase to store both the request data and the associated IP information.\nBy storing this data in a structured format, the system maintains a comprehensive record of requests and their\ncorresponding IP details for future reference and analysis.\n\n![](./docs/img/UC:Store-Request-Data-and-IP-Information.svg)\n\n**Future Enchantments**\n\n- Implement asynchronous processing to handle large volumes of requests and reduce the impact on the main application.\n\n**Alternative considerations**\n\n- Delegate this feature to a dedicated data management service to optimise performance. By decoupling with queue\n  solution information can be sent asynchronously to the data management service to be processed. allowing this micro\n  service to focus on its core functionality.\n\n---\n\n### Running the project\n\nTo run the project locally, ensure to install the project to it can generate a JAR file\n\n```bash\nmake install\n```\n\nTHe command above will install the project via docker and generate a JAR file at the root file of this project\n\n```bash\nmake run\n```\n\nThe project will run via docker in a secured java environment and will be available on port 9090\n\nAlternatively, you can run the project via docker compose shipped with mysql; the command bellow uses Dockerfile to\nbuild the project before spinning up the containers\n\n```bash\nmake run_with_mysql\n```\n\n---\n\n### Testing the project running via health endpoint\n\n```bash\ncurl --location 'http://localhost:9090/app/actuator/health'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmulecode%2Ffile-service-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmulecode%2Ffile-service-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmulecode%2Ffile-service-poc/lists"}