{"id":23044867,"url":"https://github.com/cmsrs/ingenious","last_synced_at":"2026-01-30T14:16:25.341Z","repository":{"id":211126542,"uuid":"725679964","full_name":"cmsrs/ingenious","owner":"cmsrs","description":"laravel task","archived":false,"fork":false,"pushed_at":"2023-12-06T18:27:31.000Z","size":2936,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T15:52:08.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/cmsrs.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":"2023-11-30T16:43:15.000Z","updated_at":"2023-11-30T18:14:59.000Z","dependencies_parsed_at":"2023-12-06T16:44:44.553Z","dependency_job_id":"9fd7ae9b-20bc-4a8f-9115-e4c2fe008ec1","html_url":"https://github.com/cmsrs/ingenious","commit_stats":null,"previous_names":["cmsrs/ingenious"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmsrs/ingenious","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Fingenious","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Fingenious/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Fingenious/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Fingenious/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmsrs","download_url":"https://codeload.github.com/cmsrs/ingenious/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmsrs%2Fingenious/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-12-15T21:17:02.397Z","updated_at":"2026-01-30T14:16:25.326Z","avatar_url":"https://github.com/cmsrs.png","language":"Dockerfile","readme":"# Recruitment Task 🧑‍💻👩‍💻\n\n### Invoice module with approve and reject system as a part of a bigger enterprise system. Approval module exists and you should use it. It is Backend task, no Frontend is needed.\n---\nPlease create your own repository and make it public or invite us to check it.\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n- Invoice contains:\n  - Invoice number\n  - Invoice date\n  - Due date\n  - Company\n    - Name \n    - Street Address\n    - City\n    - Zip code\n    - Phone\n  - Billed company\n    - Name \n    - Street Address\n    - City\n    - Zip code\n    - Phone\n    - Email address\n  - Products\n    - Name\n    - Quantity\n    - Unit Price\t\n    - Total\n  - Total price\n\u003c/td\u003e\n\u003ctd\u003e\nImage just for visualization\n\u003cimg src=\"https://templates.invoicehome.com/invoice-template-us-classic-white-750px.png\" style=\"width: auto\"; height:100%\" /\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### TO DO:\nSimple Invoice module which is approving or rejecting single invoice using information from existing approval module which tells if the given resource is approvable / rejectable. Only 3 endpoints are required:\n```\n  - Show Invoice data, like in the list above\n  - Approve Invoice\n  - Reject Invoice\n```\n* In this task you must save only invoices so don’t write repositories for every model/ entity.\n\n* You should be able to approve or reject each invoice just once (if invoice is approved you cannot reject it and vice versa.\n\n* You can assume that product quantity is integer and only currency is USD.\n\n* Proper seeder is located in Invoice module and it’s named DatabaseSeeder\n\n* In .env.example proper connection to database is established.\n\n* Using proper DDD structure is mandatory (with elements like entity, value object, repository, mapper / proxy, DTO).\nUnit tests in plus.\n\n* Docker is in docker catalog and you need only do \n  ```\n  ./start.sh\n  ``` \n  to make everything work\n\n  docker container is in docker folder. To connect with it just:\n  ```\n  docker compose exec workspace bash\n  ``` \n\n### My solution:\n\n1.\n```\nphp artisan migrate\n```\n\n2.\nrun test\n```\n./vendor/bin/phpunit ./tests/Feature/Modules/Invoices/Infrastructure/Database/Models/InvoiceTest.php\n```\n\n3.\nmy changes (commit name: My solution):\n```\ngit show  980a08352837198e72b9ca9808cbb5d4890afb23\n```\n\n4.\nexample endpoints:\n```\nhttp://localhost:8000/api/show/2b9fbae0-8709-48f3-ad95-d5d29d7839af\n```\n\n```\nhttp://localhost:8000/api/reject/2b9fbae0-8709-48f3-ad95-d5d29d7839af\n```\n\n```\nhttp://localhost:8000/api/approve/2b9fbae0-8709-48f3-ad95-d5d29d7839af\n```\n\nTODO:\n- it is not written in DDD\n- usage of eloquent models in Controllers (todo RS: use service - easy)\n- Controllers are heavy: code is not encapsulated in Service/Command/etc (todo RS: use service - easy)\n- Invoice module invokes ApprovalFacade directly instead of usage of adapter pattern (RS: fix, see commit: \"fix: Invoice module invokes ApprovalFacade directly instead of usage of adapter pattern\")\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsrs%2Fingenious","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmsrs%2Fingenious","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmsrs%2Fingenious/lists"}