Communitygithub.com

AppFolio リファレンスアーキテクチャ

AppFolio 物件管理統合のためのプロダクション向けリファレンスアーキテクチャ。

AppFolio リファレンスアーキテクチャ とは?

このスキルは、AppFolio Stack API を使用した物件管理統合のためのプロダクション向けリファレンスアーキテクチャを提供します。複数物件ポートフォリオにおけるリアルタイム空室追跡、テナントライフサイクル管理、作業指示ルーティング、会計調整を設計目標としており、特にリース判断のためのデータ鮮度、財務精度のための冪等同期、テナント向けポータルの応答性を重視しています。Reactダッシュボード、Redisキャッシュ、Bullキュー、同期ワーカー、イベントハンドラーで構成されるアーキテクチャ図が含まれ、AppFolio API との安全な統合を段階的に構築するための実装手順、キャッシュ戦略、イベントパイプライン、データモデル、エラーハンドリングがTypeScriptコード例とともに詳細に説明されています。主にClaude Code、Cursor、CodexなどのAIエージェントプラットフォーム向けに設計されており、プロンプト「appfolio architecture」で起動します。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/saas-packs/appfolio-pack/skills/appfolio-reference-architecture

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

AppFolio リファレンスアーキテクチャ は何をしますか?

概要

AppFolio Stack API との物件管理統合のためのプロダクション向けアーキテクチャです。複数物件ポートフォリオにおけるリアルタイム空室追跡、テナントライフサイクル管理、作業指示ルーティング、会計調整を目的として設計されています。主要な設計目標は、リース判断のためのデータ鮮度、財務精度のための冪等同期、テナント向けポータルの応答性です。

前提条件

  • エンドポイント、認証、イベント(存在する場合)、レート制限、データ所在地、許可された下流の会計/CRM への影響について、プロバイダーが確認した契約が必要です。
  • ステージング環境とプロダクション環境は分離し、管理されたシークレット、合成フィクスチャ、耐久性のあるキュー/冪等性ストア、指名された調整責任者を用意してください。
  • ダッシュボードとキャッシュモデルを最小限の許可フィールドに制限するデータ分類を実施してください。テナントの連絡先、支払い、残高データには、別の暗号化ストアとアクセス制御が必要です。

手順

  1. 最初に、エンドポイント予算、最小限のキャッシュエントリ、および観測可能性を備えた、契約に基づくクライアントと安全読み取りサービスのレイヤーを構築します。書き込みやイベント処理は後回しにします。
  2. プロバイダーイベントは、契約と耐久性のある生本文、署名、永続化、リプレイ境界が証明された後にのみ有効にします。それ以外の場合は、境界のあるインクリメンタル調整を使用します。
  3. 作業指示、会計、テナント、リースのミューテーションの前に、冪等性/調整レコードを永続化し、明示的な許可を要求します。
  4. プロモーションの前に、合成データを使用したステージング環境でのアーキテクチャ検証、強制的なプロバイダー障害の注入、重複イベント/リトライのテスト、ロールバックリハーサルを実施します。

アーキテクチャ図

Dashboard (React) ──→ Property Service ──→ Redis Cache ──→ AppFolio Stack API
                           ↓                                 /properties
                      Queue (Bull) ──→ Sync Worker           /tenants
                           ↓                                 /leases
                      Event Handler ←── Provider events*      /work-orders
                           ↓                                 /bills
                      Accounting Sync ──→ QuickBooks/Xero

* プロバイダーイベントは、アクティブな契約がその配信とセキュリティセマンティクスを確認している場合にのみ使用します。それ以外の場合は、境界のある調整からのキューを使用します。

サービスのレイヤー

class PropertyService {
  constructor(private client: AppFolioClient, private cache: CacheLayer) {}

  async getPortfolioSummary(propertyIds: string[]): Promise<PortfolioSummary> {
    const properties = await Promise.all(
      propertyIds.map(id => this.cache.getOrFetch(`prop:${id}`, () => this.client.get(`/properties/${id}`)))
    );
    return { totalUnits: properties.reduce((sum, p) => sum + p.units.length, 0),
             vacancyRate: this.calcVacancy(properties), pendingWorkOrders: await this.getPendingOrders(propertyIds) };
  }

  async routeWorkOrder(order: WorkOrderRequest): Promise<string> {
    const property = await this.client.get(`/properties/${order.propertyId}`);
    const vendor = this.selectVendor(property.region, order.category);
    return this.client.post('/work-orders', { ...order, assigned_vendor: vendor });
  }
}

キャッシュ戦略

const CACHE_CONFIG = {
  properties: { ttl: 300, prefix: 'prop' },     // 5分 — 頻繁には変更されない
  tenants:    { ttl: 120, prefix: 'tenant' },    // 2分 — 中程度の変動
  leases:     { ttl: 60,  prefix: 'lease' },     // 1分 — 財務精度
  workOrders: { ttl: 30,  prefix: 'wo' },        // 30秒 — リアルタイム追跡
  vacancies:  { ttl: 15,  prefix: 'vacancy' },   // 15秒 — リーススピードが重要
};
// Webhook駆動の無効化: AppFolioイベントは一致するキャッシュキーを即座にフラッシュ

イベントパイプライン

class PropertyEventPipeline {
  private queue = new Bull('appfolio-events', { redis: process.env.REDIS_URL });

  async onWebhook(event: AppFolioEvent): Promise<void> {
    await this.queue.add(event.type, event, { attempts: 3, backoff: { type: 'exponential', delay: 2000 } });
  }

  async processLeaseEvent(event: LeaseEvent): Promise<void> {
    if (event.type === 'lease.signed') await this.updateVacancy(event.propertyId);
    if (event.type === 'lease.terminated') await this.triggerMoveOutWorkflow(event);
  }

  async processWorkOrderEvent(event: WorkOrderEvent): Promise<void> {
    if (event.status === 'completed') await this.reconcileVendorInvoice(event);
  }
}

データモデル

interface Property { id: string; name: string; address: Address; units: Unit[]; region: string; }
interface TenantRef { id: string; leaseId: string; contactCiphertextRef: string; }
interface Lease    { id: string; propertyId: string; unitId: string; tenantId: string; startDate: string; endDate: string; monthlyRent: number; status: 'active' | 'pending' | 'terminated'; }
interface WorkOrder { id: string; propertyId: string; unitId: string; category: 'plumbing' | 'electrical' | 'hvac' | 'general'; status: string; assignedVendor: string; }

スケーリングに関する考慮事項

  • 同期ワーカーを物件リージョンごとに分割して、リージョン間のAPIレート制限を回避します。
  • ダッシュボードクエリには読み取りレプリカを使用します。書き込みパスはイベントパイプラインを通ります。
  • テナントへの通知(家賃リマインダー、メンテナンス更新)はキューを介してバッチ処理し、メールのレート制限を回避します。
  • 空室データは積極的にキャッシュします。リース担当者はこのエンドポイントを他のどのエンドポイントよりも10倍多くヒットします。
  • 作業指示ルーティングを物件ポートフォリオごとにシャーディングして、管理グループごとの独立したスケーリングを可能にします。

エラーハンドリング

コンポーネント障害モード回復方法
プロパティ同期AppFolio 429 レート制限指数バックオフ(ジッター付き)、物件別サーキットブレーカー
リースWebhook重複イベント配信リースID + イベントタイムスタンプによる冪等性キー
作業指示ルーティングベンダーAPIタイムアウトキューリトライ、フォールバックとして手動割り当て
会計同期残高不一致人間によるレビューフラグ付き調整キュー
テナントポータルキャッシュミスストームstale-while-revalidate パターン、APIレイヤーのサーキットブレーカー

出力

  • サービス、キャッシュ、キュー、データ、調整責任が明示的に分離された、契約に基づく段階的なアーキテクチャ。
  • 最小化されたダッシュボード参照、およびテナントの連絡先、支払い、残高データの暗号化/制御された境界。
  • ステージングでの障害、重複/リプレイ、レート、ロールバック、調整のエビデンスによってサポートされたデプロイ決定。

例

空室ダッシュボードのロールアウトでは、合成のプロパティIDとユニットID、1つの境界のある安全な読み取り、データの経過時間を公開するキャッシュから始めます。重複イベントまたは調整レコード、429、および下流の会計タイムアウトを注入して、キューと冪等性ストアが重複効果を防止することを証明します。結果が完全で許可されたままであり、ロールバック/調整責任者がそのパスを実証できる場合にのみプロモーションします。イベントサポート、データ分類、耐久性のある状態、または書き込み結果が未検証の場合は、対応するパスを無効にしたままにし、オペレーター主導の調整を使用します。

リソース

次のステップ

appfolio-deploy-integration を参照してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Runs the full release workflow for the current project. Commits any uncommitted changes, pushes to remote, creates and merges a PR if on a feature branch, determines the next semver version from conventional commits, creates an annotated git tag and GitHub release with generated notes, cleans up merged branches, and returns to a clean main. Use when the user says promote, ship, release, commit and push, tag and release, or get back to main.

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Build property management dashboard with AppFolio API data. Trigger: "appfolio property dashboard".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio patterns".

関連スキル