{"id":26896995,"url":"https://github.com/asemtayeh/debt-web-application","last_synced_at":"2026-04-29T21:33:17.505Z","repository":{"id":284978510,"uuid":"956678455","full_name":"AsemTayeh/Debt-Web-Application","owner":"AsemTayeh","description":"The Debt Manager Web Application enables users to efficiently create, track, view, pay, and delete their debt records. It incorporates robust security features such as password hashing, SQL injection prevention, and comprehensive authentication and authorization mechanisms. Built using the MVC pattern, ensuring separation of concerns.","archived":false,"fork":false,"pushed_at":"2025-03-28T18:21:30.000Z","size":2251,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T18:31:23.424Z","etag":null,"topics":["backend","expressjs","middleware","mysql"],"latest_commit_sha":null,"homepage":"","language":"EJS","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/AsemTayeh.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-03-28T17:03:40.000Z","updated_at":"2025-03-28T18:28:09.000Z","dependencies_parsed_at":"2025-03-28T18:42:58.537Z","dependency_job_id":null,"html_url":"https://github.com/AsemTayeh/Debt-Web-Application","commit_stats":null,"previous_names":["asemtayeh/debt-web-application"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsemTayeh%2FDebt-Web-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsemTayeh%2FDebt-Web-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsemTayeh%2FDebt-Web-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsemTayeh%2FDebt-Web-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsemTayeh","download_url":"https://codeload.github.com/AsemTayeh/Debt-Web-Application/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586107,"owners_count":20801026,"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":["backend","expressjs","middleware","mysql"],"created_at":"2025-04-01T04:32:57.980Z","updated_at":"2026-04-29T21:33:17.476Z","avatar_url":"https://github.com/AsemTayeh.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Debt Manager Web application\nA secure and user-friendly debt management web application built with Express.js and Node.js utilizing the MVC pattern. This app allows users to track debts, manage payments, and monitor their financial records while ensuring data security through data encryption using BCrypt as well as, authentication and authorization mechanisms and SQL injection prevention.\n\nTech stack:\n\n- NodeJS\n- ExpressJS\n- MySQL\n- Embedded JavaScript\n- HTML \u0026 CSS\n- Bootstrap\n\n## Features:\n### UI/UX:\nOptimizing user interactions with a clean, intuitive interface designed for effortless navigation. The application ensures users receive instant, clear feedback through flash messages after every action, keeping them informed about successes or errors. A modern, visually appealing design with soothing colors enhances the overall experience, making debt management seamless and stress-free. Additionally, built-in safeguards like password confirmation matching and the option to view passwords while entering them help prevent user errors and improve accessibility.\n\nImage One - Example showing registeration page:\n\n![alt text](RMImages/image.png)\n\nImage Two - Example showing flash message feedback after an unsuccessful registration:\n\n![alt text](RMImages/image-1.png)\n\nImage Three - Example showing user entering passwords that do not match:\n\n![alt text](RMImages/image-2.png)\n\nImage Four - Example showing the home page for a new user:\n\n![alt text](RMImages/image-3.png)\n\nImage Five - Example showing the homepage for a returning user:\n\n![alt text](RMImages/image-4.png)\n\n### Create debt records:\nUsers can create their debt records using the button \"Add new debt record\" that is displayed in the homepage.\n\nImage six - Example of Add Debt Record button:\n\n![alt text](RMImages/image-5.png)\n\nImage Seven - Example showing debt creation page:\n\n![alt text](RMImages/image-6.png)\n\nUpon a successful action the user is greeted with a flash message to verify their action.\n\nImage Eight - Example of flash message after record creation:\n\n![alt text](RMImages/image-7.png)\n\n### View debt records:\nAfter creating a debt record, notes exceeding 35 characters are automatically truncated with \"...\" for a cleaner display. To view the full note, users can simply click the \"View\" button, which seamlessly redirects them to the detailed view page for a complete and clear presentation.\n\nImage Nine - Example of view page:\n\n![alt text](RMImages/image-8.png)\n\n### Update debt record: \nUsers can update any given debt record, after updating a debt record, a flash message is displayed to confirm whether the update was successful or if an error occurred. This ensures users receive immediate feedback, keeping the experience smooth and intuitive while managing their debts.\n\nImage Ten - Example showing Update page:\n\n![alt text](RMImages/image-9.png)\n\n### Pay off debt record:\nUsers can pay off any given debt record, paid off debt records are then removed from the total debts displayed on the home page and are marked as paid on the home page with the pay button subsequently removed:\n\nImage Eleven - Example showing a paid off record:\n\n![alt text](RMImages/image-10.png)\n\n### Delete debt record:\nUsers can delete any given debt record simply by pressing the \"Delete\" button on any given debt record\n\nImage Twelve - Example showing pop-up to confirm deletion of a record:\n\n![alt text](RMImages/image-11.png)\n\n### Security:\nThis application prioritizes security at every level. It implements robust authentication using session management, with a secret key securely stored in an environment variable. Authorization mechanisms ensure users can only access their own information and debt records, preventing unauthorized access to sensitive data. To safeguard against SQL injection vulnerabilities, we utilize the mysql2 library, which offers strong protection against such attacks. User passwords are never stored in plain text—only securely hashed passwords are stored, leveraging the BCrypt hashing algorithm. Furthermore, every user transaction is authenticated and authorized to ensure that actions are legitimate and comply with access controls.\n## How to install:\n\n1- Clone the repo using ```git clone```\n\n2- Install NodeJS if not installed: https://nodejs.org/en/download\n\n3- Install all dependencies using ```npm install```\n\n4- Install mySQL server if not installed: https://www.mysql.com/downloads/ \n\n5- Create the two following Databases:\n\nFirst:\n```sql\ncreate table users (\nID INT AUTO_INCREMENT PRIMARY KEY,\nusername varchar(25) NOT NULL UNIQUE,\nhashed_password varchar(255) NOT NULL\n);\n```\nSecond:\n```sql\ncreate table debtrecords (\nID INT AUTO_INCREMENT PRIMARY KEY,\namount decimal(8,2) NOT NULL,\nnote varchar(255),\nispaid bool DEFAULT false,\nuserID INT,\nCONSTRAINT FK_USER FOREIGN KEY (userID) REFERENCES users(ID) ON DELETE SET NULL\n);\n```\n6- Fill ```.env``` using the example\n\n7- Run the program using ```node index.js```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasemtayeh%2Fdebt-web-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasemtayeh%2Fdebt-web-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasemtayeh%2Fdebt-web-application/lists"}