{"id":25773126,"url":"https://github.com/ransuum/java-task-facie","last_synced_at":"2026-06-06T21:31:40.071Z","repository":{"id":277875975,"uuid":"933772554","full_name":"ransuum/java-task-facie","owner":"ransuum","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-16T20:27:46.000Z","size":422,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T04:47:04.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"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/ransuum.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-16T16:55:13.000Z","updated_at":"2025-02-16T20:27:49.000Z","dependencies_parsed_at":"2025-02-16T18:44:10.647Z","dependency_job_id":null,"html_url":"https://github.com/ransuum/java-task-facie","commit_stats":null,"previous_names":["ransuum/java-task-facie"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ransuum/java-task-facie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ransuum%2Fjava-task-facie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ransuum%2Fjava-task-facie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ransuum%2Fjava-task-facie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ransuum%2Fjava-task-facie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ransuum","download_url":"https://codeload.github.com/ransuum/java-task-facie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ransuum%2Fjava-task-facie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285689538,"owners_count":27215143,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-27T04:33:32.542Z","updated_at":"2025-11-21T21:03:22.613Z","avatar_url":"https://github.com/ransuum.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trade Enrichment Service\n\n---\n\n## How to Run the Project\n### Prerequisites\n- Java 17+\n- Maven 3.6+\n- Redis (for caching product names)\n- Docker (optional, for containerized deployment)\n\n### Running Locally\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd \u003cproject-directory\u003e\n   ```\n2. Start Redis:\n   ```bash\n   docker run -p 6379:6379 redis\n   ```\n3. Build the project:\n   ```bash\n   mvn clean install\n   ```\n4. Run the application:\n   ```bash\n   mvn spring-boot:run\n   ```\n\nThe application should now be running at `http://localhost:8080/api/v1`.\n\n---\n\n## API Usage\n\n### 1. Enrich Trades via Plain Text CSV Upload\n**Endpoint:**\n```\nPOST /api/v1/enrich\n```\n**Headers:**\n```\nContent-Type: text/plain\n```\n**Body:**\nA raw CSV file stream with trades data.\n\n**Example Request:**\n```bash\ncurl -X POST \"http://localhost:8080/api/v1/enrich\" \\\n     -H \"Content-Type: text/plain\" \\\n     --data-binary @trades.csv\n```\n\n**Response:**\n- A CSV file containing enriched trade data.\n\n### 2. Enrich Trades via Multipart File Upload\n**Endpoint:**\n```\nPOST /api/v1/enrich\n```\n**Headers:**\n```\nContent-Type: multipart/form-data\n```\n**Body:**\nA file upload containing a CSV file.\n\n**Example Request:**\n```bash\ncurl -X POST \"http://localhost:8080/api/v1/enrich\" \\\n     -H \"Content-Type: multipart/form-data\" \\\n     -F \"file=@trades.csv\"\n```\n**Postman:**\n\n![img.png](img.png)\n\n\n**Response:**\n- A CSV file containing enriched trade data.\n- ![img_1.png](img_1.png)\n\n---\n\n---\n\n## Configuration\n### `application.properties`\nModify the `application.properties` file in `src/main/resources/` to configure application settings, such as:\n```properties\nspring.application.name=java-task-facie\n\nspring.data.redis.host=localhost\nspring.data.redis.port=6379\nspring.cache.type=redis\nspring.cache.redis.time-to-live=600000 // Maybe more\n\nspring.servlet.multipart.max-file-size=50MB  //Maybe more than 50\nspring.servlet.multipart.max-request-size=50MB //Maybe more than 50\n\nlogging.level.com.facie.java_task_facie=INFO\n```\n\n---\n\n## Running with Docker\nYou can build and run the application using Docker:\n```bash\ndocker build -t trade-enrichment .\ndocker run -p 8080:8080 trade-enrichment\n```\n\n---\n\n## Logs \u0026 Monitoring\nThe application logs processing details using SLF4J. Logs are printed to the console and can be viewed in the terminal where the application is running.\n\n---\n\n### Conclusion\n- Translate the `productId` into `productName`. - **DONE**\n- Perform data validation:  - **DONE**\n    - Ensure that the `date` is a *valid* date in `yyyyMMdd` format, otherwise discard the row and log an error.\n    - If the product name is not available, the service should log the missing mapping and set the product Name as: `Missing Product Name`.\n- Be able to handle:  - **DONE**\n    - very large sets of trades\n        - ( it is better if you could optimize the code to handle **millions** of trades).\n    - a large set of products  - **DONE**\n        - ( it is better if you could optimize the code to handle - 10k to 100k).\n- Return the enriched trade data.  - **DONE**\n- Optional Enhancements: Async Processing  - **DONE**\n\n### TESTS\n![img_2.png](img_2.png)\n![img_3.png](img_3.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fransuum%2Fjava-task-facie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fransuum%2Fjava-task-facie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fransuum%2Fjava-task-facie/lists"}