-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Pair is a compact PHP framework for server-rendered applications. It combines a classic MVC flow, an ActiveRecord-oriented ORM, API tooling, and lightweight frontend utilities without forcing a heavy build chain.
This wiki follows the current v3 codebase in /Users/viames/Sites/pair. The most useful way to read it is to distinguish between:
- class reference pages, which explain the main methods with examples and keep secondary methods concise
- workflow and integration pages, which focus on end-to-end patterns such as API modules, PWA features, or external service integrations
If you are new to Pair, begin with index.php, Application, Router, Controller, Model, and View.
For project bootstrap and environment setup, read Configuration file, htaccess, and Env.
Pair includes a lightweight PHPUnit suite for framework-level checks.
Typical local workflow:
composer installcomposer test
Notes:
- the suite focuses on isolated framework behavior, so many tests do not require a full Pair application bootstrap
-
vendor/is a local install artifact and should not be committed to the Pair repository - when you change observable framework behavior, update the relevant wiki page together with the code
Read index.php -> Application -> Router -> Controller -> View.
Read Controller -> Model -> View -> ActiveRecord -> Query -> Form.
Read API -> ApiController -> Request -> ApiResponse -> CrudController -> Idempotency.
Read User -> Session -> Acl -> Rule -> OAuth2Token.
Start from Integrations, then move to the specific service area you actually need:
- storage -> AmazonS3
- maps and geocoding -> GoogleMaps, GoogleMapsClient, GoogleGeocoder, GooglePlacesService, GoogleAddress
- mail delivery -> Mailer, SendMail, SmtpMailer
- payments -> StripeGateway
- messaging and notifications -> TelegramBotClient, WhatsAppCloudClient
- telephony and contact-center integrations -> AircallClient, AircallAPI
- Pair framework
- Core runtime and MVC -> Application, Router, Controller, Model, View
- Forms and HTML layer -> Form, FormControl, TemplateRenderer, Classes folder
- Data and ORM -> ActiveRecord, Query, Database, Collection, JoinClause, QueryGrammar
- API stack -> API, ApiController, Request, ApiResponse, CrudController, Middleware, RateLimiter
- Frontend and PWA -> PWA, PairUI.js, PairPush.js, PairPasskey.js, PwaConfig, PwaManifest
- Integrations -> Integrations, AmazonS3, GoogleMaps, GoogleMapsClient, GoogleGeocoder, GooglePlacesService, GoogleAddress, Mailer, SendMail, SmtpMailer, StripeGateway, TelegramBotClient, WhatsAppCloudClient, AircallClient, AircallAPI
- Security and operations -> User, Session, Acl, PasskeyAuth, Schedule, Log, ErrorLog
- Misc helpers -> Translator, Locale, Language, Country, DateRange, Markdown
API hardening and consistency: Middleware, ThrottleMiddleware, RateLimiter, Idempotency, QueryFilter, Resource.
Push, notifications, and passkeys: PushDispatcher, SubscriptionRepository, PushSubscription, WebPushSender, OneSignalNotification, PasskeyAuth, PasskeyController.
UI and visual helpers: SweetAlert, IziToast, ChartJs, ChartJsDataset, Markdown, AppTrait.
Plugins, templates, and maintenance: Plugin, PluginBase, Module, Template, Migration, InsightHub, OAuth2Client.
Service integrations: Integrations, AmazonS3, GoogleMaps, GoogleMapsClient, GoogleGeocoder, GooglePlacesService, GoogleAddress, Mailer, SendMail, SmtpMailer, StripeGateway, TelegramBotClient, WhatsAppCloudClient, AircallClient, AircallAPI.
- When a page is about a class, prefer it for method-by-method reference.
- When a page is about a feature area or hub such as API or Integrations, expect overview material, architecture notes, recipes, and cross-links rather than a full method inventory.
- When you need the exact runtime behavior, trust the class pages aligned with the current codebase under
/Users/viames/Sites/pair.