{"id":18263132,"url":"https://github.com/viames/pair","last_synced_at":"2026-04-02T17:53:52.425Z","repository":{"id":46733293,"uuid":"82173868","full_name":"viames/pair","owner":"viames","description":"a lightweight PHP framework as the air","archived":false,"fork":false,"pushed_at":"2026-03-24T08:06:20.000Z","size":1778,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-25T09:26:36.192Z","etag":null,"topics":["framework","mvc","orm","passkey","php","pwa","server-rendered","web-push"],"latest_commit_sha":null,"homepage":"https://viames.github.io/pair","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/viames.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2017-02-16T11:32:06.000Z","updated_at":"2026-03-24T08:06:24.000Z","dependencies_parsed_at":"2023-11-16T11:38:50.190Z","dependency_job_id":"bf742053-e1af-429a-b33e-998bb8d56493","html_url":"https://github.com/viames/pair","commit_stats":{"total_commits":333,"total_committers":4,"mean_commits":83.25,"dds":0.04504504504504503,"last_synced_commit":"65ccf35903a780a9514ceb814f2c19fe21ff5515"},"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"purl":"pkg:github/viames/pair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viames%2Fpair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viames%2Fpair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viames%2Fpair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viames%2Fpair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viames","download_url":"https://codeload.github.com/viames/pair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viames%2Fpair/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["framework","mvc","orm","passkey","php","pwa","server-rendered","web-push"],"created_at":"2024-11-05T11:09:56.450Z","updated_at":"2026-04-02T17:53:52.404Z","avatar_url":"https://github.com/viames.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/viames/Pair/wiki/files/pair-logo.png\" width=\"240\"\u003e\n\n[Website](https://viames.github.io/pair/) | [Wiki](https://github.com/viames/pair/wiki) | [Issues](https://github.com/viames/pair/issues)\n\n[![Total Downloads](https://poser.pugx.org/viames/pair/downloads)](https://packagist.org/packages/viames/pair)\n[![Latest Stable Version](https://poser.pugx.org/viames/pair/v/stable)](https://packagist.org/packages/viames/pair)\n[![GitHub Release](https://img.shields.io/github/v/release/viames/pair)](https://github.com/viames/pair/releases)\n[![License](https://poser.pugx.org/viames/pair/license)](https://packagist.org/packages/viames/pair)\n[![PHP Version Require](https://poser.pugx.org/viames/pair/require/php)](https://packagist.org/packages/viames/pair)\n\nPair is a lightweight PHP framework for server-rendered web applications.\nIt focuses on fast setup, clear MVC routing, practical ORM features, and optional integrations (Aircall, S3, SES, Sentry, Telegram, Push, Passkey) without heavy tooling.\n\n## What's New\n\nPair v3 is currently in alpha and includes breaking changes compared to previous major versions.\n\n## Quick Start\n\n### 1) Install with Composer\n\n```sh\ncomposer require viames/pair\n```\n\n### 2) Bootstrap the application\n\n```php\n\u003c?php\n\nuse Pair\\Core\\Application;\n\nrequire 'vendor/autoload.php';\n\n$app = Application::getInstance();\n$app-\u003erun();\n```\n\n### 3) Next Steps\n\n- [Wiki](https://github.com/viames/pair/wiki)\n- [Routing](https://github.com/viames/pair/wiki/Router)\n- [Configuration (.env)](https://github.com/viames/pair/wiki/Configuration-file)\n- [Boilerplate project](https://github.com/viames/pair_boilerplate)\n\n## Why Pair\n\n- Small and fast for small/medium projects.\n- MVC structure with SEO-friendly routing.\n- ActiveRecord-style ORM with automatic type casting.\n- Plugin-oriented architecture (modules/templates).\n- Good defaults for timezone, logging, and framework utilities.\n- Optional third-party integrations when needed.\n\n## Core Features\n\n### ActiveRecord\n\nPair maps classes to DB tables and supports automatic casts (`int`, `bool`, `DateTime`, `float`, `csv`), relation helpers, and caching-oriented query helpers.\n\nDocs: [ActiveRecord](https://github.com/viames/pair/wiki/ActiveRecord)\n\n### Routing Basics\n\nDefault route format (after base path):\n\n`/\u003cmodule\u003e/\u003caction\u003e/\u003cparams...\u003e`\n\nExample: `example.com/user/login`\n\n- module: `/modules/user`\n- controller: `/modules/user/controller.php` (extends `Pair/Core/Controller.php`)\n- action: `loginAction()` when present\n- auto-loaded by convention: `model.php`, `viewLogin.php` (`UserViewLogin`), and `/modules/user/layouts/login.php`\n\nDocs: [Router](https://github.com/viames/pair/wiki/Router)\n\n### Log Bar and Debugging\n\nBuilt-in log bar for loaded objects, memory usage, timings, SQL traces, backtraces, and custom debug messages.\n\n## Frontend Helpers\n\n### PairUI\n\nDependency-free helper for progressive enhancement in server-rendered apps (`assets/PairUI.js`).\n\nMain directives:\n- `data-text`, `data-html`, `data-show`, `data-if`\n- `data-class`, `data-attr`, `data-prop`, `data-style`\n- `data-model`, `data-on`, `data-each`\n\nDocs: [PairUI.js](https://github.com/viames/pair/wiki/PairUI.js)\n\n### PWA Helpers (No Build Step)\n\nAvailable assets:\n- `PairPWA.js`\n- `PairSW.js`\n- `PairRouter.js`\n- `PairSkeleton.js`\n- `PairDevice.js`\n- `PairPasskey.js`\n\nMinimal frontend setup:\n\n```html\n\u003cscript src=\"/assets/PairUI.js\" defer\u003e\u003c/script\u003e\n\u003cscript src=\"/assets/PairPWA.js\" defer\u003e\u003c/script\u003e\n\u003cscript src=\"/assets/PairRouter.js\" defer\u003e\u003c/script\u003e\n\u003cscript src=\"/assets/PairSkeleton.js\" defer\u003e\u003c/script\u003e\n\u003cscript src=\"/assets/PairDevice.js\" defer\u003e\u003c/script\u003e\n\u003cscript src=\"/assets/PairPasskey.js\" defer\u003e\u003c/script\u003e\n```\n\nImportant notes:\n- Keep progressive enhancement.\n- Service workers require HTTPS (except localhost).\n- Use a single SW URL if you also enable Push.\n\n## Passkey Quick Start\n\nBackend:\n\n```php\nclass ApiController extends \\Pair\\Api\\PasskeyController {}\n```\n\nThis enables:\n- `POST /api/passkey/login/options`\n- `POST /api/passkey/login/verify`\n- `POST /api/passkey/register/options` (requires `sid`)\n- `POST /api/passkey/register/verify` (requires `sid`)\n- `GET /api/passkey/list` (requires `sid`)\n- `DELETE /api/passkey/revoke/{id}` (requires `sid`)\n\n## Third-Party Integrations\n\nPair includes optional support for services such as:\n- [Aircall](https://developer.aircall.io/)\n- [Amazon S3](https://aws.amazon.com/s3/)\n- [Amazon SES](https://aws.amazon.com/ses/)\n- [ELK Stack](https://www.elastic.co/what-is/elk-stack)\n- [InsightHub](https://insighthub.smartbear.com/)\n- [Sentry](https://sentry.io/)\n- [Telegram Bot API](https://core.telegram.org/bots/api)\n- [OneSignal](https://onesignal.com/)\n- [Stripe](https://stripe.com/docs)\n\nConfiguration reference: [Configuration (.env)](https://github.com/viames/pair/wiki/Configuration-file)\n\n## Upgrading\n\nIf you are upgrading between major versions:\n\n```sh\ncomposer run upgrade-to-v2\ncomposer run upgrade-to-v3\n```\n\nTo test unreleased code from `main`:\n\n```sh\ncomposer require viames/pair dev-main\n```\n\n## Documentation\n\nMain docs live in the [Wiki](https://github.com/viames/pair/wiki).\n\nUseful pages:\n- [Application](https://github.com/viames/pair/wiki/Application)\n- [Controller](https://github.com/viames/pair/wiki/Controller)\n- [View](https://github.com/viames/pair/wiki/View)\n- [Form](https://github.com/viames/pair/wiki/Form)\n- [Collection](https://github.com/viames/pair/wiki/Collection)\n- [Push notifications](https://github.com/viames/pair/wiki/Push-notifications)\n- [index.php](https://github.com/viames/pair/wiki/index)\n- [.htaccess](https://github.com/viames/pair/wiki/htaccess)\n- [classes](https://github.com/viames/pair/wiki/Classes-folder)\n\n## Requirements\n\n| Software | Recommended | Minimum | Configuration |\n| --- | :---: | :---: | --- |\n| Apache | 2.4+ | 2.4 | `modules:` mod_rewrite |\n| MySQL | 8.0+ | 8.0 | `character_set:` utf8mb4 \u003cbr\u003e `collation:` utf8mb4_unicode_ci \u003cbr\u003e `storage_engine:` InnoDB |\n| PHP | 8.4+ | 8.3 | Composer-required extensions: `curl`, `intl`, `json`, `mbstring`, `PDO` |\n\nRuntime notes:\n- `pdo_mysql` is required when using the default MySQL driver (`Pair\\\\Orm\\\\Database`).\n- `fileinfo` is strongly recommended for reliable MIME detection in uploads.\n- `openssl` is required only for Passkey/WebAuthn features.\n- `pcre` and `Reflection` are part of standard PHP 8+ builds.\n\n## Example Project\n\nStart from [pair_boilerplate](https://github.com/viames/pair_boilerplate) to bootstrap a new app quickly.\n\n## Support\n\n- Issues: [github.com/viames/pair/issues](https://github.com/viames/pair/issues)\n- Wiki: [github.com/viames/pair/wiki](https://github.com/viames/pair/wiki)\n- Source: [github.com/viames/pair/tree/master/src](https://github.com/viames/pair/tree/master/src)\n- Homepage: [viames.github.io/pair](https://viames.github.io/pair/)\n\n## Changelog\n\nVersion history is available in GitHub Releases: [github.com/viames/pair/releases](https://github.com/viames/pair/releases)\n\n## Security\n\nIf you discover a security issue, please open a GitHub issue with a clear description and steps to reproduce.\n\n## Contributing\n\nFeedback, code contributions, and documentation improvements are welcome via pull request.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviames%2Fpair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviames%2Fpair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviames%2Fpair/lists"}