{"id":16924489,"url":"https://github.com/theodorejb/phasem","last_synced_at":"2026-01-03T15:30:18.034Z","repository":{"id":39517384,"uuid":"98377673","full_name":"theodorejb/phasem","owner":"theodorejb","description":"A PHP/Angular/Slim/Nginx/MySQL starter project","archived":true,"fork":false,"pushed_at":"2023-03-04T02:25:35.000Z","size":3182,"stargazers_count":3,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T09:56:21.880Z","etag":null,"topics":["angular","mysql","nginx","php","slim"],"latest_commit_sha":null,"homepage":null,"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/theodorejb.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":"2017-07-26T03:59:28.000Z","updated_at":"2023-08-17T00:44:50.000Z","dependencies_parsed_at":"2023-02-06T11:16:35.540Z","dependency_job_id":null,"html_url":"https://github.com/theodorejb/phasem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorejb%2Fphasem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorejb%2Fphasem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorejb%2Fphasem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorejb%2Fphasem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorejb","download_url":"https://codeload.github.com/theodorejb/phasem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239731664,"owners_count":19687873,"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":["angular","mysql","nginx","php","slim"],"created_at":"2024-10-13T20:05:18.591Z","updated_at":"2026-01-03T15:30:17.922Z","avatar_url":"https://github.com/theodorejb.png","language":"PHP","readme":"# Phasem - a PHP, Angular, Slim, Nginx, and MySQL starter project\n\nGet your app off the ground quickly with routing, authentication,\nand a RESTful API.\n\n## Getting started\n\n1. Download and unzip this project\n2. Install PHP 8.0+, Composer, Node.js, MySQL, and nginx.\n3. Start MySQL and enable MySQL extension in php.ini\n4. Include phasem.conf file in nginx.conf http block\n5. From nginx directory, run `start nginx` and `php-cgi -b 127.0.0.1:9000`\n6. Run `composer install`, `npm install`, and `npm run dev`\n7. Run PHP tests via `vendor\\bin\\phpunit`\n8. Run static analysis type checks via `vendor\\bin\\psalm`\n\n## Deploying to production\n\n1. Use deploy/server_setup.sh to configure a production Ubuntu VPS.\n2. Run `npm run build`, then `npm run deploy` and follow the prompts.\n\n## Features\n\n* Back-end REST API built with Slim Framework\n* Front-end built with Angular and TypeScript\n* TypeScript/Angular code is standardized via ESLint\n* User registration\n* Token-based authentication\n* Account settings page (change name, email, and password)\n* Two-factor authentication with recovery codes\n* Zero downtime deployment\n* Users are prompted to reload the page when a front-end update is available\n\n## Todo\n\n- [ ] Track invalid login attempts with IP and headers\n- [ ] Rate limiting for incorrect passwords\n- [ ] Use device cookies to mitigate brute force attacks\n- [ ] Show password strength when registering and changing password\n- [ ] Allow users to view active sessions with login date, last activity date, and IP address\n- [ ] Display account security events (login, 2FA completion, recovery code used, invalid login/2FA)\n- [ ] Reset password via email (don't leak valid emails)\n- [ ] Progressive web app manifest\n\n## DB backup\n\n```shell script\ndate=$(date +%Y_%m_%d)\nfile=\"phasemdb_$date\"\nmysqldump -u $USER -p phasem \u003e \"$file.sql\"\nzip \"$file\" \"$file.sql\"\necho \"Run scp $USER@example.com:~/$file.zip $file.zip from the destination machine.\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorejb%2Fphasem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorejb%2Fphasem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorejb%2Fphasem/lists"}