{"id":15583216,"url":"https://github.com/tanhongit/php_realtime_chat_app","last_synced_at":"2025-07-01T04:05:21.853Z","repository":{"id":39864607,"uuid":"455417053","full_name":"tanhongit/PHP_Realtime_Chat_App","owner":"tanhongit","description":"Create a Chat Application using PHP MVC model with MySQL \u0026 JavaScript","archived":false,"fork":false,"pushed_at":"2023-01-02T09:38:53.000Z","size":3389,"stargazers_count":16,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T02:53:47.808Z","etag":null,"topics":["chat-application","chat-realtime","chatapp","mysql","php","php-chat-app","php-mvc","realtime","tanhongit","tanhongit-mvc"],"latest_commit_sha":null,"homepage":"","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/tanhongit.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}},"created_at":"2022-02-04T04:08:29.000Z","updated_at":"2025-03-26T22:51:28.000Z","dependencies_parsed_at":"2023-02-01T02:31:11.373Z","dependency_job_id":null,"html_url":"https://github.com/tanhongit/PHP_Realtime_Chat_App","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tanhongit/PHP_Realtime_Chat_App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2FPHP_Realtime_Chat_App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2FPHP_Realtime_Chat_App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2FPHP_Realtime_Chat_App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2FPHP_Realtime_Chat_App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanhongit","download_url":"https://codeload.github.com/tanhongit/PHP_Realtime_Chat_App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanhongit%2FPHP_Realtime_Chat_App/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262893638,"owners_count":23380710,"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":["chat-application","chat-realtime","chatapp","mysql","php","php-chat-app","php-mvc","realtime","tanhongit","tanhongit-mvc"],"created_at":"2024-10-02T20:05:46.112Z","updated_at":"2025-07-01T04:05:21.804Z","avatar_url":"https://github.com/tanhongit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to PHP Realtime Chat App MVC Model by TanHongIT\nCreate a Chat Application using PHP MVC model with MySQL \u0026 JavaScript.\n\n## This source structure is cloned from project: [`yl-mvc-structure`](https://github.com/TanHongIT/yl-mvc-structure)\n\n# 1. Configuration requirements\n\n    - Version PHP 7.2 and above\n    - OpenSSL PHP Extension\n\n# 2. Technology\n- Pure PHP language\n- Using MVC model\n- Javascript\n\n# 3. Setup assets folder\n\nThis Project is using webpack in order to compile Javascript modules and compile Sass/SCSS files to css. Run the following commands in the project's asset directory:\n\nRun:\n\n```shell\ncd public/frontend/assets\nnpm install\nnpm run build\n```\n\n# 4. Download Database\n\nThis is the path to the database file for you to download: [`/database/***.sql`](https://github.com/TanHongIT/PHP_Realtime_Chat_App/tree/main/database)\n\nCreate a new database on **PHPMyAdmin** at your server (or any other database connection tool), then import the .sql file that you just downloaded.\n\n# 5. Edit Connect Database\n\nYou need to change the connection information to the database after you have cloned my repository so that the website can work.\n\nPath: [`/config/database.php`](https://github.com/TanHongIT/PHP_Realtime_Chat_App/tree/main/config)\n\nThis is the path to the database file for you to download: [`/database/***.sql`](https://github.com/TanHongIT/PHP_Realtime_Chat_App/tree/main/database)\n\n```php\ndefine('DB_HOST', 'localhost');\ndefine('DB_USER', 'root');\ndefine('DB_PASS', 'root');\ndefine('DB_NAME', 'chatapp-php');\n```\n\nAnd then run to import database\n\n```shell\n mysql -u root -p chatapp-php \u003c YOUR-PATH/PHP_Realtime_Chat_App/database/chatapp-php.sql \n```\nPlease change **YOUR-PATH** to your project's path.\n\n# 6. Install and using ssl certificate\nUsing mkcert to create ssl certificate\n\n### For Ubuntu\n\n```shell\nsudo apt install libnss3-tools\n\nsudo wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 \u0026\u0026 \\\nsudo mv mkcert-v1.4.3-linux-amd64 mkcert \u0026\u0026 \\\nsudo chmod +x mkcert \u0026\u0026 \\\nsudo cp mkcert /usr/local/bin/\n```\n\nNow that the mkcert utility is installed, run the command below to generate and install your local CA:\n\n```shell\nmkcert -install\n```\n\n### Create ssl certificate for this project\n\nRun:\n\n```shell\ncd /var/www/certs\nmkcert local.php_realtime_chat_app.com\n```\n\nAnd then change **local.PHP_Realtime_Chat_App.com.conf** file (/apache2/sites-available/ to this)\n\n```\n\u003cVirtualHost *:80\u003e\n\tServerAdmin localserver@localhost\n\tServerName local.PHP_Realtime_Chat_App.com\n\tServerAlias www.PHP_Realtime_Chat_App.vdx.com\n\tDocumentRoot /var/www/PHP_Realtime_Chat_App\n\tErrorLog /var/www/logs/error-PHP_Realtime_Chat_App.log\n    CustomLog /var/www/logs/access-PHP_Realtime_Chat_App.log combined\n\u003c/VirtualHost\u003e\n\n\u003cVirtualHost *:443\u003e\n    ServerAdmin localserver@localhost\n    ServerName local.PHP_Realtime_Chat_App.com\n    ServerAlias www.local.PHP_Realtime_Chat_App.com\n    DocumentRoot /var/www/PHP_Realtime_Chat_App\n\n    ErrorLog /var/www/logs/error-PHP_Realtime_Chat_App.log\n    CustomLog /var/www/logs/access-PHP_Realtime_Chat_App.log combined\n\n    SSLEngine on\n\tSSLCertificateFile /var/www/certs/local.PHP_Realtime_Chat_App.com.pem\n\tSSLCertificateKeyFile /var/www/certs/local.PHP_Realtime_Chat_App.com-key.pem\n\n    \u003cDirectory /var/www/PHP_Realtime_Chat_App\u003e\n        Options Indexes FollowSymLinks\n        AllowOverride All\n        Require all granted\n    \u003c/Directory\u003e\n\u003c/VirtualHost\u003e\n```\n\n# 7. Demo\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"https://user-images.githubusercontent.com/35853002/177470807-57f9b578-efcb-4e2d-8510-8942bc06f297.png\" alt=\"license\"\u003e\n\u003c/p\u003e\n\nDemo account:\n\n```\nEmail: test4@exam.com.vn\nPass: 123456\n```\n\n\u003cp align=\"center\"\u003e\n     \u003cimg src=\"https://img.shields.io/packagist/l/doctrine/orm.svg\" data-origin=\"https://img.shields.io/packagist/l/doctrine/orm.svg\" alt=\"license\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanhongit%2Fphp_realtime_chat_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanhongit%2Fphp_realtime_chat_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanhongit%2Fphp_realtime_chat_app/lists"}