{"id":23820109,"url":"https://github.com/claudiaslibrary/chat_room","last_synced_at":"2026-06-29T10:32:01.337Z","repository":{"id":263413785,"uuid":"890323653","full_name":"ClaudiasLibrary/chat_room","owner":"ClaudiasLibrary","description":"This is a simple real-time chat application built with Flask, Flask-SocketIO, and SQLite. It allows users to register, log in, and join a chat room where they can send and receive messages in real-time.","archived":false,"fork":false,"pushed_at":"2024-12-14T13:44:34.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T22:42:47.299Z","etag":null,"topics":["chat","chatroom","html","localhost","python","user-authentication"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/ClaudiasLibrary.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":"2024-11-18T11:29:10.000Z","updated_at":"2024-12-30T22:03:13.000Z","dependencies_parsed_at":"2024-11-19T04:31:29.423Z","dependency_job_id":null,"html_url":"https://github.com/ClaudiasLibrary/chat_room","commit_stats":null,"previous_names":["claudiaslibrary/chat_room"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ClaudiasLibrary/chat_room","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiasLibrary%2Fchat_room","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiasLibrary%2Fchat_room/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiasLibrary%2Fchat_room/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiasLibrary%2Fchat_room/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClaudiasLibrary","download_url":"https://codeload.github.com/ClaudiasLibrary/chat_room/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudiasLibrary%2Fchat_room/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34923763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":["chat","chatroom","html","localhost","python","user-authentication"],"created_at":"2025-01-02T07:19:48.674Z","updated_at":"2026-06-29T10:32:01.322Z","avatar_url":"https://github.com/ClaudiasLibrary.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat Application with Flask and SocketIO\n\nThis is a simple real-time chat application built with Flask, Flask-SocketIO, and SQLite. It allows users to register, log in, and join a chat room where they can send and receive messages in real-time.\n\n## Features\n\n- **User Registration**: Users can register by creating a unique username and password. Passwords are hashed using `bcrypt` for security.\n- **User Login**: Users can log in using their credentials. The application compares the hashed password stored in the database with the entered password.\n- **Real-Time Chat**: Users can chat with each other in real-time using `SocketIO`. Messages are broadcast to all connected clients.\n- **Session Management**: User sessions are managed using Flask’s built-in session system to keep track of logged-in users.\n\n## Technologies Used\n\n- **Flask**: Web framework for building the application.\n- **Flask-SocketIO**: Real-time communication library for Flask that enables WebSocket support.\n- **SQLite**: Lightweight database for storing user credentials.\n- **bcrypt**: Password hashing library used to securely store user passwords.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.x\n- `pip` (Python package installer)\n\n### Run the Application\n\nAfter installing the dependencies, you can start the application by running:\n\n```bash\npython app.py\n```\n\nBy default, the application will be accessible at `http://localhost:5000/`.\n\n## Database\n\nThe application uses SQLite to store user data. The database file `chatroom.db` will be created automatically when the application runs for the first time. If the database does not exist, the application will create it with the following schema:\n\n- **users** table:\n  - `id`: Integer, Primary Key, Auto Increment\n  - `username`: Text, Unique (used for user login)\n  - `password`: Text (hashed password)\n\n## Routes\n\n- `/` (GET): Displays the registration and login form.\n- `/register` (POST): Registers a new user. It accepts `username` and `password` from the form, hashes the password, and stores it in the database.\n- `/login` (POST): Logs in an existing user. It accepts `username` and `password`, verifies the password using bcrypt, and redirects to the chat room if the login is successful.\n- `/chat` (GET): Displays the chat room where logged-in users can send and receive messages.\n\n## Real-Time Chat with SocketIO\n\n- **`send_message`**: Emitted from the client when a user sends a message. This event broadcasts the message to all connected clients.\n- **`receive_message`**: Received by all connected clients to display incoming messages.\n\n## Security Considerations\n\n- **Password Hashing**: User passwords are hashed using `bcrypt` before being stored in the database, making it difficult for attackers to retrieve original passwords even if the database is compromised.\n- **Session Management**: Flask’s built-in session management ensures that users are properly authenticated and only logged-in users can access the chat room.\n\n## License\n\nThis project is licensed under the MIT License\n\n## Contributing\n\n1. Fork the repository.\n2. Create your feature branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature-name`).\n5. Create a new Pull Request.\n\n## Acknowledgments\n\n- **Flask**: For building the web application.\n- **Flask-SocketIO**: For enabling real-time communication in the chat application.\n- **bcrypt**: For securely hashing passwords.\n- **SQLite**: For lightweight database storage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudiaslibrary%2Fchat_room","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaudiaslibrary%2Fchat_room","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudiaslibrary%2Fchat_room/lists"}