{"id":28199003,"url":"https://github.com/cmin764/usphere","last_synced_at":"2026-04-10T15:33:58.966Z","repository":{"id":291237896,"uuid":"851489240","full_name":"cmin764/usphere","owner":"cmin764","description":"Modern User Management System","archived":false,"fork":false,"pushed_at":"2025-05-03T11:56:27.000Z","size":158,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T12:33:25.449Z","etag":null,"topics":["bootstrap","css","html","jquery","js","php","security","user","validation"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/cmin764.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":"2024-09-03T07:31:11.000Z","updated_at":"2025-05-03T11:56:15.000Z","dependencies_parsed_at":"2025-05-03T12:43:50.785Z","dependency_job_id":null,"html_url":"https://github.com/cmin764/usphere","commit_stats":null,"previous_names":["cmin764/bs-php-app","cmin764/usphere"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmin764%2Fusphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmin764%2Fusphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmin764%2Fusphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmin764%2Fusphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmin764","download_url":"https://codeload.github.com/cmin764/usphere/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582931,"owners_count":22095520,"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":["bootstrap","css","html","jquery","js","php","security","user","validation"],"created_at":"2025-05-16T18:14:31.660Z","updated_at":"2025-12-30T22:17:21.975Z","avatar_url":"https://github.com/cmin764.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uSphere - Modern User Management System\n\n## Description\n\nThis is a modern PHP application that demonstrates a simple user management system. The application features:\n\n- A clean, responsive interface built with Bootstrap\n- A dynamic table displaying user information (name, email, city, phone)\n- Real-time city-based filtering functionality\n- Form validation for new user entries\n- AJAX-powered form submissions\n- A custom PHP framework with MVC-like structure\n\nThe project serves as a practical example of PHP development best practices, including:\n- Object-oriented programming with a custom framework\n- Database operations with MySQL\n- Frontend-backend integration\n- Form handling and validation\n- Modern UI/UX implementation\n\n## Installation\n\n1. Install and configure MySQL (see MySQL Setup section below)\n2. Initialize the database and import all migrations by running the provided script:\n   ```sh\n   ./database/init-db.sh\n   ```\n   This script will create the database, user, and import all `.sql` migrations automatically.  \n   It works both inside Docker and when run manually from the project root.\n3. Copy [database](config/database) to [database.php](config/database.php) and configure your database connection settings in this file\n\n### MySQL Setup on macOS\n\n1. Install MySQL using Homebrew:\n   ```sh\n   brew install mysql\n   ```\n2. Start MySQL service:\n   ```sh\n   brew services start mysql\n   ```\n3. Verify MySQL is running:\n   ```sh\n   brew services list\n   ```\n\n### Database Initialization\n\nYou can initialize the database and import all migrations with a single command:\n```sh\n./database/init-db.sh\n```\nThis script will:\n- Create the database (if it doesn't exist)\n- Create the user and grant privileges (if needed)\n- Import all `.sql` migration files in order\n\n\u003e You no longer need to run manual SQL commands for setup—just use the script!\n\n## Running the Application\n\n### Local Development\n\nDirectly with PHP:\n```sh\nphp -S localhost:8080\n```\n\nOr through Docker Compose:\n```sh\ndocker-compose up\n```\n\nTo completely clean up Docker resources (containers, images, volumes, and orphaned containers):\n```sh\ndocker-compose down --rmi all --volumes --remove-orphans\n```\n\nRebuild the images with `docker-compose up --build` after bringing the services down.\n\n### Production Deployment\n\n1. Ensure initially that you have the ClearDB add-on (Heroku's MySQL) available and integrated (easy to do from the UI)\n2. Create a new app, let's say `usphere`\n3. Push code and release the `web` service (this will build and upload images)\n4. Ensure proper configuration via environment variables (to access the DB)\n\n```sh\n# Login and create your first app\nheroku login\nheroku create usphere\n\n# Tell Heroku to do a Docker-based deployment\nheroku container:login\nheroku stack:set container -a usphere\nheroku labs:enable --app=usphere runtime-new-layer-extract  # fixes Apache\nheroku container:push web --app usphere\nheroku container:release web --app usphere\n\n# Configure remote DB access via env vars credentials\nheroku config:set MYSQL_USER=b********d4c --app usphere\nheroku config:set MYSQL_PASSWORD=c7******5 --app usphere\nheroku config:set MYSQL_HOST=us-cluster-east-01.k8s.cleardb.net --app usphere\nheroku config:set MYSQL_DATABASE=heroku_1f6******4f5 --app usphere\n```\n\n\u003e Make sure to manually import the SQL dumps in the remote DB (not automated)\n\n## Development \u0026 Future Improvements\n\nFor current development tasks, please see [challenge](docs/challenge.md). For planned improvements and features, please see [todo](docs/todo.md).\n\nThank you! 🙏\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmin764%2Fusphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmin764%2Fusphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmin764%2Fusphere/lists"}