{"id":26126055,"url":"https://github.com/monnus/serverlessinvoicescanner","last_synced_at":"2026-04-21T11:02:48.034Z","repository":{"id":276704255,"uuid":"929819325","full_name":"Monnus/ServerlessInvoiceScanner","owner":"Monnus","description":"Return extracted data from any invoice","archived":false,"fork":false,"pushed_at":"2025-02-25T16:34:41.000Z","size":415,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T17:36:14.909Z","etag":null,"topics":["api","aws-lambda","dynamodb","s3-bucket","textract"],"latest_commit_sha":null,"homepage":"https://main.d3mvx09cobtz73.amplifyapp.com/","language":"JavaScript","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/Monnus.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-09T13:36:33.000Z","updated_at":"2025-02-25T16:34:44.000Z","dependencies_parsed_at":"2025-03-10T17:46:52.367Z","dependency_job_id":null,"html_url":"https://github.com/Monnus/ServerlessInvoiceScanner","commit_stats":null,"previous_names":["monnus/serverlessinvoicescanner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Monnus/ServerlessInvoiceScanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnus%2FServerlessInvoiceScanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnus%2FServerlessInvoiceScanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnus%2FServerlessInvoiceScanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnus%2FServerlessInvoiceScanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monnus","download_url":"https://codeload.github.com/Monnus/ServerlessInvoiceScanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnus%2FServerlessInvoiceScanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32088913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","aws-lambda","dynamodb","s3-bucket","textract"],"created_at":"2025-03-10T17:27:41.089Z","updated_at":"2026-04-21T11:02:48.001Z","avatar_url":"https://github.com/Monnus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Invoice Scanner\nA Serverless Invoice Scanner built using AWS cloud services and a React front-end, designed to analyze uploaded invoices and extract key data using Amazon Textract. The extracted data is stored in DynamoDB and can be viewed via a front-end React app connected to an API Gateway.\n\n## Project Architecture\nFrontend: ReactJS\nAllows users to upload invoices and view extracted data.\nBackend: AWS Lambda, API Gateway, DynamoDB, S3, and Textract\nFully serverless architecture for scalability and ease of management.\u003cbr/\u003e\nAWS Services Used\u003cbr/\u003e\nAmazon S3\u003cbr/\u003e\n\nUsed to store uploaded invoices in a dedicated bucket (public-invoice-scanner-bucketc3330-dev).\nAWS Lambda\n\n** Two Lambda functions were implemented: ** \nTextract Lambda Function (Back-end Processing):\nTriggered by an S3 event.\nUses Amazon Textract to analyze invoices and extract key-value pairs and table data.\nSaves the extracted data to DynamoDB.\nDeletes previous entries from DynamoDB before adding the latest result to ensure only the most recent entry is available.\nDynamoDB Fetch Lambda Function (API Response):\nProvides the most recent invoice data stored in DynamoDB via an API Gateway GET request.\nIncludes optimized data formatting for better front-end display.\nAmazon DynamoDB\n\nStores extracted invoice data (e.g., key-value pairs and tables).\nEach record includes metadata such as upload date and the extracted information.\nAmazon Textract\n\nPerforms OCR (Optical Character Recognition) on invoices to extract structured data, including tables and key-value pairs.\nAPI Gateway\n\nConnects the front-end React application to the DynamoDB Fetch Lambda function.\nConfigured with CORS support for secure cross-origin requests.\nFeatures\nInvoice Upload:\n\nUsers can upload PDF invoices via the front-end.\nFiles are stored in the S3 bucket and trigger the Textract Lambda function.\nData Extraction:\n\nTextract extracts key information from the invoice, such as Invoice Number, Issue Date, Due Date, and detailed table data.\nData Storage:\n\nThe extracted information is stored in DynamoDB with the most recent entry available for the user.\nData Retrieval:\n\nThe React front-end fetches and displays the extracted data using the API Gateway and DynamoDB Fetch Lambda function.\nReact Front-end\nBuilt with ReactJS for an intuitive and user-friendly interface.\nUsers can:\nUpload an invoice to S3.\nView the extracted data in a well-formatted JSON summary.\nClear the view with a button click for a fresh experience.\nKey Components:\nFileUpload Component:\nAllows users to upload files to S3.\nDisplays a progress indicator during the upload process.\nViewData Component:\nFetches the latest extracted invoice data from the API Gateway.\nDisplays data in a clean and readable format, with a Clear Data button.\nHow It Works\nUpload:\nThe user uploads an invoice (PDF) through the front-end.\nTrigger:\nThe upload triggers the Textract Lambda function.\nTextract extracts key data from the invoice.\nStore:\nThe extracted data is stored in DynamoDB.\nPrevious entries are cleared to keep only the most recent data.\nFetch and Display:\nThe front-end fetches the most recent entry from DynamoDB and displays it to the user.\nExample Data Display\njson\nCopy\nEdit\n\n![Image of Project Architecture ](images/Serverless-invoice-scanner Diagram.drawio.png)\n\n\n```\n{\n  \"Invoice ID\": \"public/invoice.pdf\",\n  \"Upload Date\": \"2025-02-07T17:57:08.789Z\",\n  \"Key-Value Pairs\": {\n    \"Invoice #\": \"1001\",\n    \"Issued\": \"11/9/2024\",\n    \"Due\": \"12/9/2024\",\n    \"Subtotal\": \"$4,000.00\",\n    \"Tax\": \"$0.00\",\n    \"Balance Due\": \"$4,000.00\"\n  },\n  \"Table Data\": [\n    [\"Item Description\", \"Price\", \"Quantity\", \"Tax\", \"Total\"],\n    [\"Consulting Services\", \"$150.00\", \"10\", \"$0.00\", \"$1,500.00\"],\n    [\"Software Development\", \"$100.00\", \"20\", \"$0.00\", \"$2,000.00\"]\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonnus%2Fserverlessinvoicescanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonnus%2Fserverlessinvoicescanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonnus%2Fserverlessinvoicescanner/lists"}