## Software Requirements Specification (SRS) for React Electron App ### Introduction The React Electron App is a cross-platform application designed to compare two CSV files containing invoices and identify discrepancies in the amounts. The application facilitates user onboarding, including registration and activation, and ensures license validation through a unique fingerprint and cryptographic signature. ### Functional Requirements: 1. **User Onboarding:** - Provide a registration form for users to complete during the initial launch. - Generate a unique fingerprint for the user's system. - Create a message for signing using the fingerprint and generate a cryptographic signature. - Store the fingerprint and signature securely in local storage. - Continuously validate the stored signature and fingerprint for license activation. 2. **Main App Functionality:** - Allow users to upload two CSV files, File A and File B, containing invoice data. - Prompt users to specify the column name representing the invoice number for both CSV files. edit: do not prompt, the column names are fixed: In sheet A - "BILLAMOUNT" and in Sheet B - "Approved Amount" - Only match entries where the payment status is "Success" and a "UTR" number exists. Both are in separate columns. - Identify matching entries based on the provided invoice numbers. - Detect discrepancies in invoice amounts between the two files. - Display non-matching rows and their details in a tabular format. - With each non-matching rows displayed, display the deductions on the amount. - Calculate the total deduction by summing the differences between corresponding invoice amounts. 3. **Payment Status Verification:** - The application should include functionality to verify the payment status of invoices. - If an invoice lacks a UTR number, it indicates that the payment is still in progress and should be flagged accordingly. - Ensure that the application distinguishes between invoices with and without UTR numbers to accurately determine payment status. 4. **Government Sheet Validation:** - Implement validation checks for invoices listed in the government sheet. - Verify that the paid amount matches the sum of the approved amount and additional amount. - Ensure consistency in comparing the pharmacy amount with the sum of the approved and additional amounts. **Non-Functional Requirements:** 1. **Performance:** - The application should perform efficiently even with large CSV files. - Response times for file uploads, processing, and result display should be minimal. 2. **Security:** - Ensure secure storage of user fingerprint and signature to prevent tampering or unauthorized access. - Utilize industry-standard encryption algorithms for cryptographic operations. 3. **Cross-Platform Compatibility:** - The application should be compatible with Windows, macOS, and Linux operating systems. 4. **User Experience:** - Design an intuitive and user-friendly interface for seamless navigation and interaction. - Provide clear instructions and guidance for users during onboarding and file processing. **Risks and Risk Prevention:** 1. **Risk: Unauthorized Access to License Information** - Prevention: Implement robust encryption mechanisms to secure user fingerprint and signature stored in local storage. 2. **Risk: Performance Degradation with Large CSV Files** - Prevention: Optimize file processing algorithms and implement asynchronous processing to handle large datasets efficiently. 3. **Risk: Dependency on External Libraries** - Prevention: Regularly monitor and update dependencies to mitigate vulnerabilities and ensure compatibility with the latest standards. 4. **Risk: Data Loss** - Prevention: Implement data backup mechanisms and provide users with warnings before executing irreversible actions to prevent accidental data loss. 5. **Risk: Network Connectivity Issues** - Prevention: Provide clear instructions for users to ensure they have an active internet connection during the initial registration and activation process. Implement error handling and retry mechanisms for network-related issues. 6. **Risk: Inaccurate Matching of Invoice Entries** - Prevention: Thoroughly test and validate the matching algorithms to ensure accuracy and reliability in identifying corresponding invoice entries. ### System Requirements - **Platform Compatibility:** Windows, macOS, Linux - **Hardware Requirements:** Standard for running Electron applications - **Internet Connection:** Required for initial registration, activation, and license validation ### Assumptions and Constraints - **Internet Connectivity:** The user must have an active internet connection during the initial registration and activation process. - **Cryptographic Security:** The integrity and security of the cryptographic operations (e.g., signature generation, validation) rely on industry-standard algorithms and practices. ### Future Enhancements - **Enhanced User Interface:** Implement a more intuitive and visually appealing interface for improved user experience. - **Advanced Matching Algorithms:** Integrate advanced algorithms for matching entries with enhanced accuracy and performance. - **Automatic Updates:** Implement a feature for automatic application updates when the user is connected to the internet, subject to user confirmation. ### Conclusion The React Electron App provides a user-friendly interface for comparing CSV files containing invoices, ensuring accuracy and efficiency in detecting discrepancies. With robust user onboarding and license validation mechanisms, the application maintains security and integrity throughout usage. # Fixes needed: ### Update software via new releases on Github 1. The software should automatically update whenever new release is available on github releases. 2. We need to keep our codebase private. ### Copy fixes 1. When user haven't uploaded the file, the upload box should show "Upload" instead of "Uploaded Successfully". 2. When user have uploaded correcrt file, change the text to "Uploaded successfully." 3. When user have uploaded wrong excel sheet, keep the text same as step 1, that is "Upload" # Next features ### Payment option: When the user tries using a paid feature (Invoice Checker and check payment deductions), then the pop should have following changes: 1. Instead of the number displayed in the next line, number should be inline and where the number was displayed earlier, show a button "Activate". 2. when user clicks, activate, the user should be take to Activate Software flow. 3. Once the software is activated, the user can use the app without any restrictions. ### Activation Flow: Once user is at the activation flow, start with this. 1. Generate unique fingerprint for the device. 2. Show user a dialog box with steps: a. Share the activation request file/code our team. b. Share this file as it is with our team for activation. Call our team here +91 81079 02653. c. Upload the file "Activation Key" sent by our team below and activate the software. d. Button "Authenticate" - when user click this, start authentication process. e. Button "View UPI QR code" - when user clicks this, user should see a QR code - to be given by us. 3. Step a should have a button, that says "Download Activation Request file". 4. Step b should have a upload file box. 5. After user uploads the file, . 6. After successfully authenticated, show them a message: "Congratulations! Activated successfully." 7. On this message, the user should see a button "Start using App". Once users clicks the button, user should be allowed to start using app and taken to main page. 8. If the authentication key is invalid, show them: "Authentication Failed. Ensure the key is correct. Take help from our team: +91 81079 02653". When not authenticated, the user should not be able to use software. ### Activate button on main page 1. Instead of this "" message, user should be able to see the button "Unlock Paid features", when user click this button, they should be taken to Activation flow. ### Main app flow: #### Invoice Checker: 1. Ask user to upload two files, the title and description should be displayed: 2. File A: Invoice Sheet 3. File B: Payment Tracker 2. After user uploads the file successfully, show them all the invoices that exist in File A and also in File B with status "Success". 3. The metrics should be following: 4. Total Invoices: x/number of invoices in File A, where x is total invoices matched 5. Total Claim Amount: 6. Total Received: 4. Allow user to export (all data in Invoice Sheet) in sheet and add checkmark column, wherever the status is SUCCESS. 5. https://www.loom.com/share/329bea3c64c34294947d0f4a1add6473?sid=acc0aa32-eed0-4cca-a6f9-7e6612f99f1f #### Check Short Payment (prev. Check deductions): 1. If user directly arrives on this tab, ask user to upload one sheet.: a. File B: Payment Tracker 2. After user uploads the file successfully, show them all the invoices whose "Pharmacy Claim Amount" and "Approved Amount" doesn't match. 3. The metrics should be following: 4. Total Invoices: number of invoices in File A that exist in File B also. 5. Invoices with deductions: number of invoices whose File A's "BILLAMOUNT" and File B's "Approved Amount" doesn't match. 6. Total Deductions: total of all deductions ("BILLAMOUNT" - "Approved Amount") on all invoices whose File A's "BILLAMOUNT" and File B's "Approved Amount" doesn't match. 4. When showing the individual invoices in table add one more column: "Deduction", that should be populated with respective invoices deduction ("BILLAMOUNT" - "Approved Amount"). This column's position should be just next to invoice number when displayed. 5. Allow user to export in sheet and check again. 5. If user clicks on tab "Invoice Checker", use the same sheet for new "Invoice Checker" tab without asking user for uploading new sheet. 6. If user clicks on tab "Check rejected bills", the software cannot use same sheet. Do not clear the already uploaded sheet, instead ask user to upload a new sheet that is "Payment Invoice Tracker". 7. https://www.loom.com/share/485d0be3a430484ea7994a86de71cf32 #### Check rejected bills: Same flow that exists right now.