{"id":28238968,"url":"https://github.com/medamineharbaoui/remitly_technical_test","last_synced_at":"2025-06-11T02:31:57.915Z","repository":{"id":290042474,"uuid":"973207845","full_name":"medamineharbaoui/Remitly_Technical_Test","owner":"medamineharbaoui","description":"A RESTful API for managing SWIFT codes of financial institutions, built with Spring Boot, Hibernate, and MySQL for the backend, and Next.js for a user-friendly frontend. The application parses SWIFT codes from CSV files, stores them in a database, and provides endpoints for retrieval. Fully containerized with Docker for easy setup and deployment.","archived":false,"fork":false,"pushed_at":"2025-04-27T10:15:47.000Z","size":242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T02:11:26.792Z","etag":null,"topics":["docker","docker-compose","dockerfile","hibernate-orm","junit","mockito","mysql","nextjs","restful-api","spring-boot","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/medamineharbaoui.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,"zenodo":null}},"created_at":"2025-04-26T13:53:16.000Z","updated_at":"2025-04-27T10:15:50.000Z","dependencies_parsed_at":"2025-04-26T14:35:51.861Z","dependency_job_id":"201fc19e-60d7-4e5c-acf0-990fa2993c64","html_url":"https://github.com/medamineharbaoui/Remitly_Technical_Test","commit_stats":null,"previous_names":["medamineharbaoui/remitly_technical_test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medamineharbaoui%2FRemitly_Technical_Test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medamineharbaoui%2FRemitly_Technical_Test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medamineharbaoui%2FRemitly_Technical_Test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medamineharbaoui%2FRemitly_Technical_Test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/medamineharbaoui","download_url":"https://codeload.github.com/medamineharbaoui/Remitly_Technical_Test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medamineharbaoui%2FRemitly_Technical_Test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259186387,"owners_count":22818550,"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":["docker","docker-compose","dockerfile","hibernate-orm","junit","mockito","mysql","nextjs","restful-api","spring-boot","unit-testing"],"created_at":"2025-05-19T02:11:21.246Z","updated_at":"2025-06-11T02:31:57.898Z","avatar_url":"https://github.com/medamineharbaoui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWIFT Code API\n\n## Overview\n\nThis application provides a RESTful API to manage SWIFT codes for financial institutions. The SWIFT codes can represent both branches and headquarters of a bank. The SWIFT codes are parsed from a provided CSV file, stored in a database, and exposed through API endpoints for efficient retrieval.\n\nThe project consists of two parts:\n1. **Backend**: A Spring Boot application with Hibernate and MySQL to handle the parsing, storing, and retrieval of SWIFT codes.\n2. **Frontend**: A Next.js application to provide a user-friendly interface for interacting with the API.\n\nBoth parts are containerized using Docker, with separate Dockerfiles for the backend and frontend, and a root-level `docker-compose.yml` file to bring everything together.\n\n## Key Features\n- **Parse SWIFT Code Data**: Efficient parsing of SWIFT codes from the provided CSV file.\n- **Store Data**: Store parsed SWIFT codes in a MySQL database using Hibernate.\n- **REST API**: Expose the SWIFT code data through RESTful endpoints.\n- **Containerized**: Both the backend and frontend are containerized using Docker for easy setup and deployment.\n\n## Project Structure\n\n- **swift-api (Backend)**: \n  - Built with Spring Boot, Hibernate, and MySQL.\n  - Handles parsing, storing, and serving SWIFT code data.\n  \n- **frontend (Frontend)**: \n  - Built with Next.js.\n  - Provides a user interface for interacting with the backend API.\n\n## Getting Started\n\n### Prerequisites\n\n1. **Docker**: If Docker is not installed, follow [this guide](https://www.docker.com/get-started) to install it.\n\n### Setup Instructions\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/medamineharbaoui/Remitly_Technical_Test\n   cd Remitly_Technical_Test\n   ```\n\n2. **Build and Run the Application**:\n   First make sure that the PORTS *3306* , *8080* and *3000* are available.\n   Use Docker to build and run the application and database containers:\n   ```bash\n   docker-compose up --build\n   ```\n   This may take a few minutes. You will know the setup is complete when you see the message:\n   ```\n   SWIFT codes imported from CSV.\n   ```\n\n3. **Access the Application**:\n   - **Frontend**: Open your browser and go to `http://localhost:3000` to access the homepage. Click \"Explore SwiftCodes App\" to navigate to the dashboard (`/dashboard`).\n   - **Backend**: The RESTful API is accessible at `http://localhost:8080`.\n\n### Importing \u0026 Parsing SWIFT Codes\n- **Frontend**: Upload CSV files directly through the frontend dashboard.\n- **Backend**: The backend provides an endpoint `/v1/swift-codes/import` to upload and **parse CSV files**.\n\n## API Endpoints\n\n1. **Retrieve SWIFT Code Details**\n   - **GET**: `/v1/swift-codes/{swift-code}`\n   - **Response Structure (Headquarters)**:\n     ```json\n     {\n       \"address\": \"string\",\n       \"bankName\": \"string\",\n       \"countryISO2\": \"string\",\n       \"countryName\": \"string\",\n       \"isHeadquarter\": true,\n       \"swiftCode\": \"string\",\n       \"branches\": [\n         {\n           \"address\": \"string\",\n           \"bankName\": \"string\",\n           \"countryISO2\": \"string\",\n           \"isHeadquarter\": false,\n           \"swiftCode\": \"string\"\n         }\n       ]\n     }\n     ```\n   - **Response Structure (Branch)**:\n     ```json\n     {\n       \"address\": \"string\",\n       \"bankName\": \"string\",\n       \"countryISO2\": \"string\",\n       \"countryName\": \"string\",\n       \"isHeadquarter\": false,\n       \"swiftCode\": \"string\"\n     }\n     ```\n\n2. **Retrieve SWIFT Codes by Country**\n   - **GET**: `/v1/swift-codes/country/{countryISO2code}`\n   - **Response Structure**:\n     ```json\n     {\n       \"countryISO2\": \"string\",\n       \"countryName\": \"string\",\n       \"swiftCodes\": [\n         {\n           \"address\": \"string\",\n           \"bankName\": \"string\",\n           \"countryISO2\": \"string\",\n           \"isHeadquarter\": true,\n           \"swiftCode\": \"string\"\n         }\n       ]\n     }\n     ```\n\n3. **Add a New SWIFT Code**\n   - **POST**: `/v1/swift-codes`\n   - **Request Structure**:\n     ```json\n     {\n       \"address\": \"string\",\n       \"bankName\": \"string\",\n       \"countryISO2\": \"string\",\n       \"countryName\": \"string\",\n       \"isHeadquarter\": true,\n       \"swiftCode\": \"string\"\n     }\n     ```\n   - **Response Structure**:\n     ```json\n     {\n       \"message\": \"SWIFT code added successfully\"\n     }\n     ```\n\n4. **Delete a SWIFT Code**\n   - **DELETE**: `/v1/swift-codes/{swift-code}`\n   - **Response Structure**:\n     ```json\n     {\n       \"message\": \"SWIFT code deleted successfully\"\n     }\n     ```\n\n## Testing\n\n### Run Tests\nTo ensure the application is functioning as expected, you can run the tests with the following command:\n```bash\nmvn test\n```\n\n### Manual Testing\nYou can test the API manually using Postman or any other HTTP client.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedamineharbaoui%2Fremitly_technical_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedamineharbaoui%2Fremitly_technical_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedamineharbaoui%2Fremitly_technical_test/lists"}