{"id":48887523,"url":"https://github.com/markstanden/azure-functionapp--with-db-write-and-retry","last_synced_at":"2026-04-16T05:35:16.252Z","repository":{"id":269095879,"uuid":"906402301","full_name":"markstanden/azure-functionapp--with-db-write-and-retry","owner":"markstanden","description":"Azure FunctionApp with JSON serialization and SQL write with retry logic","archived":false,"fork":false,"pushed_at":"2025-01-13T16:59:42.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T17:52:51.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/markstanden.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":"2024-12-20T20:33:22.000Z","updated_at":"2025-01-13T16:59:41.000Z","dependencies_parsed_at":"2024-12-26T02:45:27.589Z","dependency_job_id":"ba3849f3-80ae-4228-9316-ff6f832fc96d","html_url":"https://github.com/markstanden/azure-functionapp--with-db-write-and-retry","commit_stats":null,"previous_names":["markstanden/azure-functionapp--with-db-write-and-retry"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markstanden/azure-functionapp--with-db-write-and-retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markstanden%2Fazure-functionapp--with-db-write-and-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markstanden%2Fazure-functionapp--with-db-write-and-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markstanden%2Fazure-functionapp--with-db-write-and-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markstanden%2Fazure-functionapp--with-db-write-and-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markstanden","download_url":"https://codeload.github.com/markstanden/azure-functionapp--with-db-write-and-retry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markstanden%2Fazure-functionapp--with-db-write-and-retry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":"2026-04-16T05:35:16.165Z","updated_at":"2026-04-16T05:35:16.233Z","avatar_url":"https://github.com/markstanden.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coding Challenge - Azure FunctionApp\n\n## Development Setup\n\n### Prerequisites\n- .NET 8.0\n- CSharpier (Global Tool): `dotnet tool install -g csharpier`\n\n### Git Hooks\nThis project uses Git hooks for automated code formatting. To set up:\n\n1. Ensure CSharpier is installed (see prerequisites)\n2. Configure Git to use the project hooks:\n   ```bash\n   git config core.hooksPath .hooks\n   ```\n\nThe pre-commit hook will automatically format C# files using CSharpier before each commit.\n\n### Code Style\n- Code formatting is handled automatically by CSharpier\n- Configuration can be found in `.csharpierrc`\n\n## CI/CD Pipeline\nThe project uses GitHub Actions workflows to enforce code quality:\n\n### Workflow Structure\n- **Code Quality**: Validates code formatting using CSharpier\n- **Compilation**: Ensures the solution builds successfully\n- **Code Coverage**: Runs tests and verifies 80% minimum test coverage\n\n### Key Features\n- Optimized with caching for faster builds\n- Automated checks on PRs to main branch\n- Workflows work independently\n- Manual triggers for development testing\n- Failed checks block PR merging\n\n## Architecture \u0026 Implementation Notes\n\n### Database Design\nI've created two tables for development:\n\n1. `markShipment`\n2. `markShipment_Lines`\n\nWithout access to the intended database schemas, I made some assumptions about structure. The `shipmentId` serves as the primary key for the markShipment table, allowing for straightforward duplicate entry testing.\n\n### Input Sanitation\nWhile not explicitly required, Input sanitation was implemented as a security measure.\n\n1. `shipmentId`: Allows alphanumerics and hyphens\n2. `sku`: Strictly alphanumeric\n3. Invalid characters are removed rather than causing validation failures\n\n### Retry Logic\nThe retry mechanism operates within the function rather than rescheduling messages in the queue:\n- Custom recursive retry implementation\n- Considered Polly but opted for a bespoke solution to demonstrate TDD and unit testing capabilities\n\n### Testing Strategy\nThe project uses xUnit for testing with Moq for isolation. Key aspects include:\n\n- Interface-based design for effective mocking\n- Comprehensive unit test coverage\n- TDD approach for core components (Retry, Sanitation)\n- Interfaces and wrappers for previously closed classes to enable mocking/testing\n\n### Webhook Integration\n- Success notifications sent to [webhook.site](https://webhook.site/#!/view/5b83a7db-90e0-4ae8-ab49-a5df2474665f/9514a315-20c0-42cb-9e2b-7be2c3355277/1)\n- Webhook URL configurable to avoid rate limiting and enable environment-specific endpoints","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkstanden%2Fazure-functionapp--with-db-write-and-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkstanden%2Fazure-functionapp--with-db-write-and-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkstanden%2Fazure-functionapp--with-db-write-and-retry/lists"}