{"id":19218682,"url":"https://github.com/fadilxcoder/helifox","last_synced_at":"2026-04-12T09:11:43.970Z","repository":{"id":38190439,"uuid":"139237778","full_name":"fadilxcoder/helifox","owner":"fadilxcoder","description":"PHP Micro Framework v4","archived":false,"fork":false,"pushed_at":"2024-11-05T17:51:16.000Z","size":5899,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T19:23:25.803Z","etag":null,"topics":["docker","memcache","notes","phinx","php","project","selenium","symfony-component"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/fadilxcoder.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":"2018-06-30T09:47:20.000Z","updated_at":"2024-11-05T17:51:19.000Z","dependencies_parsed_at":"2024-11-05T18:18:12.189Z","dependency_job_id":"f51305d1-3b3b-4bda-a141-39b5ae252b35","html_url":"https://github.com/fadilxcoder/helifox","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fhelifox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fhelifox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fhelifox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fhelifox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadilxcoder","download_url":"https://codeload.github.com/fadilxcoder/helifox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292395,"owners_count":19778311,"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":["docker","memcache","notes","phinx","php","project","selenium","symfony-component"],"created_at":"2024-11-09T14:27:45.907Z","updated_at":"2025-11-14T09:03:08.946Z","avatar_url":"https://github.com/fadilxcoder.png","language":"Shell","readme":"# HFX PHP Framework / Phinx\n\n![Maintainer](https://img.shields.io/badge/maintainer-fadilxcoder-blue)\n\n\u003cimg src=\"https://raw.githubusercontent.com/MikeCodesDotNET/ColoredBadges/master/svg/dev/languages/php.svg\" alt=\"php\" style=\"max-width: 100%;\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/MikeCodesDotNET/ColoredBadges/master/svg/dev/frameworks/nodejs.svg\" alt=\"nodejs\" style=\"max-width: 100%;\"\u003e\n---\n\n## Notes\n\n- Define your **commands** in `config/commands.php` \u0026 create class in `src/Commands/..` for each command\n- To send data to twig : `src/Core/Twig.php` \u0026 `src/Core/Controller.php`\n- `src/Core/Database.php` - `findAll()` , `findOne()`, `update()` *For insert / delete / update*\n- All controller extends `src/Core/Controller.php` - Contain useful methods\n- All repository extends `src/Core/Repository.php` - Contain DB connection\n- Register variables / classes concerning DI in `src/Core/Container.php` - (Documentation : https://php-di.org/doc/)\n- `Client.php` / `ClientResolverInterface` - Application entry point from `public/index.php`\n- Define your **routes** in `src/Config/Router.php`\n- `templates` hold twigs layouts - (Documentation : https://twig.symfony.com/doc/3.x/api.html)\n- Define services needed in `src/Services/..`\n- SQL with PDO goes in `src/Repository/..`  \u0026 **NEVER use `__constructor` due to extend class**\n- Controller for twig rendering - `src/Controller/..` \u0026 **NEVER use `__constructor` due to extend class**\n- Error handlers - `src/Controller/Errors/`\n- `.env` - configuration / environmental variables\n- Uses node - webpack - compilation of assets\n- `public/dist` for compiled assets\n\n---\n\n## Phinx\n\n- Create a migration : `vendor/bin/phinx create UsersMigration`\n- Add SQL to created migration\n- Migrate data : `vendor/bin/phinx migrate`\n- Create newly created seeding : `vendor/bin/phinx seed:create UserSeeder`\n- Seed data : `vendor/bin/phinx seed:run`\n- `vendor/bin/phinx migrate -t 20220820174815 \u0026 vendor/bin/phinx seed:run -s UserSeeder` - Specific migration / seeder\n\n---\n\n### Routing notes\n\n- Documentation on packagist \u0026 https://github.com/nikic/FastRoute\n\n\u003e ` $routes-\u003eaddRoute('GET', '/content/{id:\\d+}/{slug: [a-z]+}[/{extra}]', [ContentController::class, 'show']);`\n- Action type : `GET / POST`\n- Url : `/content/{id:\\d+}/{slug:[a-z]+}[/{extra}]`\n- - `{id}` : The *id* must be a number **(\\d+)**\n- - `{slug}` : The *slug* must be an alphabet **([a-z]+)**\n- - `[/{extra}]` : The *extra* suffix is optional - square bracket\n- [ContentController::class, 'show']\n- - `ContentController::class` : Controller called \n- - `show` : Method called\n\n\u003e `// Matches /user/foo/bar as well`\n\u003e `$r-\u003eaddRoute('GET', '/user/{name:.+}', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// This route`\n\u003e `$r-\u003eaddRoute('GET', '/user/{id:\\d+}[/{name}]', 'handler');`\n\u003e `// Is equivalent to these two routes`\n\u003e `$r-\u003eaddRoute('GET', '/user/{id:\\d+}', 'handler');`\n\u003e `$r-\u003eaddRoute('GET', '/user/{id:\\d+}/{name}', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// Multiple nested optional parts are possible as well`\n\u003e `$r-\u003eaddRoute('GET', '/user[/{id:\\d+}[/{name}]]', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// This route is NOT valid, because optional parts can only occur at the end`\n\u003e `$r-\u003eaddRoute('GET', '/user[/{id:\\d+}]/{name}', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// Matches /user/42, but not /user/xyz`\n\u003e `$r-\u003eaddRoute('GET', '/user/{id:\\d+}', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// Matches /user/foobar, but not /user/foo/bar`\n\u003e `$r-\u003eaddRoute('GET', '/user/{name}', 'handler');`\n\n\u003cbr\u003e\n\n\u003e `// Matches /user/foo/bar as well`\n\u003e `$r-\u003eaddRoute('GET', '/user/{name:.+}', 'handler');`\n\n\u003cbr\u003e\n\n`'/[{extra}]'` : Allowing `\u003cURL\u003e/?fb_click=FB_ID\u0026utm=UTM_ID\u0026gtm=GTM_ID` \u0026 `\u003cURL\u003e/`\n\n---\n\n### Routing Regex\n\n- The rules : `'/content/{id:\\d+}/{slug:[a-z]+}[/{extra}]'`\n- Take the part : `{slug:[a-z]+}`\n- Part for regex manipulation : `[a-z]` **Allow only 'a' to 'z'**\n- Modify it : `[a-zA-Z0-9-_\u0026]` \n- - **Allow only** : \n- - `a` to `z`\n- - `A` to `Z`\n- - `0` to `9`\n- - `-` *dash*\n- - `_` *underscore*\n- - `\u0026` *ampersand*\n- Finally : `{slug:[a-zA-Z0-9-_\u0026]+}`\n\n---\n\n## Packages (require / require-dev) / URLs\n\n- https://packagist.org/packages/nikic/fast-route - `Routes`\n- https://packagist.org/packages/symfony/http-kernel\n- https://packagist.org/packages/symfony/http-foundation - `Request [GET, POST]`\n- https://packagist.org/packages/vlucas/phpdotenv - `.env`\n- https://packagist.org/packages/twig/twig - `Twig templating` (https://twig.symfony.com/doc/3.x/)\n- https://packagist.org/packages/php-di/php-di - `Dependency Injection`\n- https://packagist.org/packages/symfony/asset\n- https://packagist.org/packages/tracy/tracy - `Debugger`\n- https://packagist.org/packages/filp/whoops - `Debugger`\n- https://packagist.org/packages/fakerphp/faker // https://fakerphp.github.io/ - `Dummy data provider`\n- https://packagist.org/packages/mnapoli/silly - `CLI`\n- https://book.cakephp.org/phinx/0/en/contents.html - `Phinx Documentation`\n\n---\n\n## Development utilities\n\n- https://picocss.com/ `Minimal CSS Framework for semantic HTML`\n- https://picocss.com/examples/preview/ \u0026 https://github.com/picocss/examples `Pico examples`\n\n---\n\n## Usage\n\n- Configure `.env`\n- `composer install`\n- `composer update` when modifying specific **packages** - *PS. `packages/chrome/`, `\"version\": \"master\"` in `composer.json`*\n- DB tables :\n- - `vendor/bin/phinx migrate` - Migrate DB\n- - `vendor/bin/phinx seed:run` - Popupate DB\n- Command : `php bin/console database:users 1 / php bin/console database:users 155` - Fetching data from `users` with specified ID\n\n_deprecated in latest release_\n- Assets `npm install`\n- `npm rebuild node-sass` - Changing environment\n- Compiling assets \n- - `npm run js-build` : compile JS\n- - `npm run css-build` : compile CSS\n- - `npm run js-build-watch` : compile JS in *watch mode*\n\n---\n\n\n## Utils\n\n- PhpMyAdmin\n- - URL :  http://helifox.local:8000/\n- - HOST : `database`\n- - USERNMAE : `myuser`\n- - PASSWORD : `secret`\n- - DATABASE : `mydb`\n\n## Demo URL for testing\n\n- - http://helifox.local:8881/\n- - http://helifox.local:8881/?fb_click=FB_ID\u0026utm=UTM_ID\u0026gtm=GTM_ID\n- - http://helifox.local:8881/content/5/fx/?action=cancel\n- - http://helifox.local:8881/content/5/fx/player?action=cancel\n- - http://helifox.local:8881/content/5/this-is-a-demo-url-a555\u0026XX7\n- - http://helifox.local:8881/any-thing-url\n- - http://helifox.local:8881/user\n- - http://helifox.local:8881/users\n- - http://helifox.local:8881/?XDEBUG_SESSION_START=start (Xdebug)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fhelifox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadilxcoder%2Fhelifox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fhelifox/lists"}