{"id":24623753,"url":"https://github.com/ecopque/registration_and_login_project","last_synced_at":"2026-04-13T12:31:02.868Z","repository":{"id":273547827,"uuid":"920070070","full_name":"ecopque/registration_and_login_project","owner":"ecopque","description":"This project demonstrates the implementation of a simple user registration, login, and account removal system using Python 3.11 with a MySQL/MariaDB database. The system uses Object-Oriented Programming (OOP) principles and the MVC (Model-View-Controller) architecture. It utilizes the SQLAlchemy ORM to interact with the database...","archived":false,"fork":false,"pushed_at":"2025-02-01T18:06:41.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T13:21:58.082Z","etag":null,"topics":["hashlib","mariadb","mariadb-database","mvc-architecture","mysql","mysql-database","oop","orm","python3","sha-256","sha-256-hash","workbench"],"latest_commit_sha":null,"homepage":"https://linktr.ee/edsoncopque","language":"Python","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/ecopque.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,"zenodo":null}},"created_at":"2025-01-21T14:11:13.000Z","updated_at":"2025-02-01T18:29:01.000Z","dependencies_parsed_at":"2025-01-21T15:35:34.510Z","dependency_job_id":"f780a7b5-273d-4a0c-a2b7-5cb47e8347ca","html_url":"https://github.com/ecopque/registration_and_login_project","commit_stats":null,"previous_names":["ecopque/registration_and_login_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecopque/registration_and_login_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecopque%2Fregistration_and_login_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecopque%2Fregistration_and_login_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecopque%2Fregistration_and_login_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecopque%2Fregistration_and_login_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecopque","download_url":"https://codeload.github.com/ecopque/registration_and_login_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecopque%2Fregistration_and_login_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31752987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["hashlib","mariadb","mariadb-database","mvc-architecture","mysql","mysql-database","oop","orm","python3","sha-256","sha-256-hash","workbench"],"created_at":"2025-01-25T03:58:15.488Z","updated_at":"2026-04-13T12:31:02.849Z","avatar_url":"https://github.com/ecopque.png","language":"Python","readme":"# Registration and Login Project\n\nThis project demonstrates the implementation of a simple user registration, login, and account removal system using Python 3.11 with a MySQL/MariaDB database. The system uses Object-Oriented Programming (OOP) principles and the MVC (Model-View-Controller) architecture. It utilizes the SQLAlchemy ORM to interact with the database, ensuring modularity and code reuse.\n\n## Technologies Used\n- **Python 3.11**: The primary programming language.\n- **MySQL** / **MariaDB**: The relational database system used to store user data.\n- **SQLAlchemy**: An Object-Relational Mapper (ORM) for managing database interactions.\n- **PyMySQL**: A library used by SQLAlchemy to interact with MySQL/MariaDB databases.\n- **MVC Architecture**: The project follows the Model-View-Controller design pattern for better organization and separation of concerns.\n\n## Database Setup\n1. **MySQL/MariaDB**:\n   - Ensure MySQL/MariaDB is installed on your machine.\n   - Create the database with the following command:\n     ```sql\n     CREATE DATABASE registration_and_login;\n     ```\n\n2. **Install Dependencies**:\n   - Install the required libraries using pip:\n     ```bash\n     pip install sqlalchemy pymysql\n     ```\n\n## Project Structure\n1. **`model.py`**:\n   - Defines the database structure and ORM mappings using SQLAlchemy.\n   - Contains the `Person` class, representing user data in the database.\n\n2. **`controller.py`**:\n   - Contains the `RegisterController`, `LoginController`, and `RemoveController` classes responsible for handling user registration, login, and account removal.\n   - The controllers interact with the database through the SQLAlchemy session to perform CRUD operations.\n\n3. **`view.py`**:\n   - Acts as the user interface, providing a simple menu for the user to choose between registration, login, or account removal.\n   - Collects user inputs and passes them to the appropriate controller for processing.\n\n## Database Connection Configuration\nIn the `model.py` file, update the following connection parameters to match your database setup:\n\n```python\nUSER = 'root'          # Your MySQL/MariaDB username\nPASSWORD = '123456'    # Your MySQL/MariaDB password\nHOST = 'localhost'     # The host where MySQL/MariaDB is running\nPORT = '3306'          # The port MySQL/MariaDB is listening on\nDATABASE = 'registration_and_login'  # The name of the database\n```\n\n## Usage\n1. Running the Application\n\nTo run the application, execute view.py:\n```python\npython view.py\n```\n\nThis will present a menu where you can choose one of the following options:\n\n    1: Register a new user.\n    2: Login with an existing user.\n    3: Remove a user account.\n    4: Exit the application.\n\n2. Registration Flow\n\n    The user will be prompted to enter a name, email, and password.\n    The system checks the validity of the entered data (name, email, and password length validation).\n    If the data is valid, the user is added to the person table in the database with the password hashed.\n\n3. Login Flow\n\n    The user enters their email and password.\n    The system checks if the email and password match an existing user in the database. If successful, the user is logged in.\n\n4. Remove Account Flow\n\n    The user can remove their account by providing the email of the account they wish to delete.\n    The system checks if the email exists in the database and removes the user if found.\n\nKey Features\n\n    Data Validation: Ensures that user inputs are within acceptable limits (e.g., name, email, and password lengths).\n    Password Hashing: Passwords are hashed using SHA-256 before being stored in the database.\n    Modular Structure: The project is divided into separate files for better organization: model.py (database), controller.py (business logic), and view.py (user interface).\n    Session Management: SQLAlchemy is used to manage sessions and interact with the database.\n\n## Requirements\n\n    Python 3.11\n    MySQL or MariaDB\n    SQLAlchemy\n    PyMySQL","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecopque%2Fregistration_and_login_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecopque%2Fregistration_and_login_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecopque%2Fregistration_and_login_project/lists"}