{"id":24200244,"url":"https://github.com/zyron-tech/dummy-backend","last_synced_at":"2026-02-12T02:39:52.220Z","repository":{"id":255735380,"uuid":"852490311","full_name":"Zyron-Tech/dummy-backend","owner":"Zyron-Tech","description":"A PHP backend with email OTP authentication using PHPMailer and PostgreSQL. It provides APIs for user registration, login, and OTP verification, designed for seamless integration with frontend applications.","archived":false,"fork":false,"pushed_at":"2024-09-11T14:54:39.000Z","size":915,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T15:54:51.555Z","etag":null,"topics":["backend-api","email-otp","email-otp-validation","email-sender","otp-verification","php","user-authentication"],"latest_commit_sha":null,"homepage":"https://dummy-backend-gyc3.onrender.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zyron-Tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-04T22:35:39.000Z","updated_at":"2024-09-11T14:57:28.000Z","dependencies_parsed_at":"2025-01-13T20:41:49.368Z","dependency_job_id":"0e888f9b-4ea7-4fde-92ea-437b1f0250eb","html_url":"https://github.com/Zyron-Tech/dummy-backend","commit_stats":null,"previous_names":["zyron-tech/dummy-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Zyron-Tech/dummy-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zyron-Tech%2Fdummy-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zyron-Tech%2Fdummy-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zyron-Tech%2Fdummy-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zyron-Tech%2Fdummy-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zyron-Tech","download_url":"https://codeload.github.com/Zyron-Tech/dummy-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zyron-Tech%2Fdummy-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273847129,"owners_count":25178634,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"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":["backend-api","email-otp","email-otp-validation","email-sender","otp-verification","php","user-authentication"],"created_at":"2025-01-13T20:41:41.496Z","updated_at":"2026-02-12T02:39:47.190Z","avatar_url":"https://github.com/Zyron-Tech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Backend with Email OTP Authentication\n\nThis backend system is built with PHP, using PHPMailer for sending OTPs via email during user registration and login processes. The backend connects to a PostgreSQL database to manage users and authentication.\n\n## How to Integrate with Frontend\n\n### Overview\n\nThe backend provides RESTful API endpoints for sign-up, login, and OTP verification. To connect the frontend (e.g., a React, Vue, or plain HTML/JavaScript application) to the backend, you will use HTTP requests (e.g., `fetch` or `axios`) to interact with these endpoints.\n\n### API Endpoints\n\n1. **Sign Up Endpoint**: Registers a new user and sends an OTP to their email.\n   - **URL**: `/public/signup.php`\n   - **Method**: `POST`\n   - **Parameters**: `username`, `password`, `email`\n\n2. **Login Endpoint**: Logs in the user with email and password.\n   - **URL**: `/public/login.php`\n   - **Method**: `POST`\n   - **Parameters**: `email`, `password`\n\n3. **Verify OTP Endpoint**: Verifies the OTP sent to the user’s email during sign-up.\n   - **URL**: `/public/verify-otp.php`\n   - **Method**: `POST`\n   - **Parameters**: `email`, `otp`\n\n4. **Delete Account Endpoint**: Users can easily delete their account if it is no longer needed\n   - **URL**: `/public/delete_account.php`\n   - **Method**: `POST`\n   - **Parameters**: `email`,`password` \n\n### Example Frontend Integration\n\nHere's a basic HTML/JavaScript example showing how to interact with the backend API endpoints using the `fetch` API:\n\n#### Sample Sign-Up Form\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eUser Sign-Up\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cform id=\"signupForm\"\u003e\n        \u003cinput type=\"text\" name=\"username\" placeholder=\"Username\" required\u003e\n        \u003cinput type=\"password\" name=\"password\" placeholder=\"Password\" required\u003e\n        \u003cinput type=\"email\" name=\"email\" placeholder=\"Email\" required\u003e\n        \u003cbutton type=\"submit\"\u003eSign Up\u003c/button\u003e\n    \u003c/form\u003e\n\n    \u003cscript\u003e\n        document.getElementById('signupForm').addEventListener('submit', async (e) =\u003e {\n            e.preventDefault();\n            const formData = new FormData(e.target);\n\n            try {\n                const response = await fetch('https://dummy-backend-gyc3.onrender.com/public/signup.php', {\n                    method: 'POST',\n                    body: formData\n                });\n                const result = await response.json();\n                alert(result.message);\n            } catch (error) {\n                console.error('Error during sign-up:', error);\n                alert('An error occurred. Please try again.');\n            }\n        });\n    \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### Sample Verify Otp Code\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eVerify OTP\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cform id=\"verifyOtpForm\"\u003e\n        \u003cinput type=\"email\" name=\"email\" placeholder=\"Email\" required\u003e\n        \u003cinput type=\"text\" name=\"otp\" placeholder=\"Enter OTP\" required\u003e\n        \u003cbutton type=\"submit\"\u003eVerify OTP\u003c/button\u003e\n    \u003c/form\u003e\n\n    \u003cscript\u003e\n        document.getElementById('verifyOtpForm').addEventListener('submit', async (e) =\u003e {\n            e.preventDefault();\n            const formData = new FormData(e.target);\n\n            try {\n                const response = await fetch('https://dummy-backend-gyc3.onrender.com/public/verify-otp.php', {\n                    method: 'POST',\n                    body: formData\n                });\n                const result = await response.json();\n                alert(result.message);\n            } catch (error) {\n                console.error('Error during OTP verification:', error);\n                alert('An error occurred. Please try again.');\n            }\n        });\n    \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyron-tech%2Fdummy-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyron-tech%2Fdummy-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyron-tech%2Fdummy-backend/lists"}