Communitygithub.com

jeremylongshore/tons-of-skills-marketplace

AppFolio 物件管理API統合のためのローカル開発環境をセットアップします。

tons-of-skills-marketplace とは?

このスキルは、AppFolio の物件管理APIとの統合を効率的に開発するためのローカル開発ループを提供します。モックモードでは合成データを用いて迅速なフィードバックを得られ、APIクォータを消費せずに反復開発が可能です。サンドボックスモードでは実APIに近い環境での事前検証を行えます。主な機能として、物件・テナント・リースのモックエンドポイント、単体テストワークフロー、レート制限や認証エラーなどのエラーハンドリングが含まれます。開発者はローカルサーバーをモックモードで起動し、テストを介してバリデーションや冪等性、PII保護の動作を確認した後、管理されたサンドボックスレーンで最終検証を行うという段階的なアプローチを推奨します。

対応✓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-local-dev-loop

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

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

ドキュメント

AppFolio ローカル開発ループ

概要

AppFolio 物件管理API統合のためのローカル開発ワークフローです。モックの物件、テナント、リースエンドポイントを使用して迅速なフィードバックループを提供し、ライブAPIクォータを消費せずに統合の構築とテストを行えます。迅速な反復開発にはモックモード、デプロイ前の検証用にはサンドボックスモードを切り替えて使用できます。

前提条件

  • 本番の住所、名前、支払い情報を含まない、合成の物件、テナント、リース、作業指示書フィクスチャを使用するモックのみのローカル環境。
  • 別途管理されるサンドボックス認証情報と、専用統合レーン用の承認済みセーフリードフィクスチャ。これはローカル開発サーバーからは読み込まれません。
  • リクエストの形状とステータスのみを記録するログポリシーと、サンドボックス割り当て、フィクスチャリセット、認証情報ローテーションのための明示的な所有者が必要です。

手順

  1. ローカルサーバーをモックモードでのみ起動し、決定論的なフィクスチャを使用して合成ルートに対して読み書き操作を実行します。
  2. サンドボックス接続確認の前に、単体テストでリクエストバリデーション、冪等性、編集、エラーハンドリングをテストします。
  3. サンドボックスレーンは、契約に基づく管理クライアントと1つの承認済みセーフリードフィクスチャを使用して別途実行します。ローカルプロキシをライブAPIトンネルに変換しないでください。
  4. フィクスチャ、認証情報、リクエスト予算、出力編集が未確認の場合は停止し、環境を修正してから続行します。

環境設定

cp .env.example .env
# ローカルではプロバイダ認証情報は空白のままにしてください。モックモードがデフォルトです。
# MOCK_MODE=true
npm install express axios dotenv tsx typescript @types/node
npm install -D vitest supertest @types/express

開発サーバー

// src/dev/server.ts
import express from "express";
const app = express();
app.use(express.json());
const MOCK = process.env.MOCK_MODE === "true";
if (!MOCK) throw new Error("ローカルサーバーはモックのみです。管理サンドボックス統合レーンを使用してください。");
const { mountMockRoutes } = require("./mocks");
mountMockRoutes(app);
app.listen(3001, () => console.log(`AppFolio 開発サーバー on :3001 [mock=${MOCK}]`));

モックモード

// src/dev/mocks.ts — 実際の物件管理レスポンス
import express from "express";

export function mountMockRoutes(app: express.Application) {
  app.get("/api/v1/properties", (_req, res) => res.json([
    { id: "prop_1", name: "サンセットアパートメント", address: { street: "123 Sunset Blvd", city: "Los Angeles", state: "CA" }, property_type: "residential", unit_count: 24 },
    { id: "prop_2", name: "ダウンタウンオフィス", address: { street: "456 Main St", city: "San Francisco", state: "CA" }, property_type: "commercial", unit_count: 8 },
  ]));
  app.get("/api/v1/tenants", (_req, res) => res.json([
    { id: "t1", first_name: "Jane", last_name: "Smith", email: "[email protected]", unit_id: "u1", lease_id: "l1" },
  ]));
  app.get("/api/v1/leases", (_req, res) => res.json([
    { id: "l1", unit_id: "u1", start_date: "2025-01-01", end_date: "2026-01-01", rent_amount: 2500, status: "active" },
  ]));
  app.post("/api/v1/work-orders", (req, res) => res.status(201).json({ id: "wo_1", ...req.body, status: "open" }));
}

テストワークフロー

npm run dev:mock &                    # バックグラウンドでモックサーバーを起動
npm run test                          # vitest で単体テスト
npm run test -- --watch               # ウォッチモードで迅速な反復
npm run test:sandbox                     # 管理された読み取り専用サンドボックスレーン

デバッグのヒント

  • DEBUG=express:* を設定してすべてのルートマッチングとミドルウェア実行をトレース
  • テストアサーションには未加工のテナントペイロードダンプではなく、フィクスチャ数とスキーマ形状を使用
  • ライブAPIに対してテストする際は、X-RateLimit-Remaining ヘッダーを確認
  • AppFolio サンドボックスは、自分が所有していないプロパティに対して 403 を返します – APIキーのスコープを確認
  • 開発中は、編集されたエンドポイント/ステータス/カウントのテレメトリーにのみインターセプターを使用

出力

  • 合成の物件管理フィクスチャを使用し、プロバイダ認証情報に依存しない、決定論的なモックのみのローカルサーバー
  • バリデーション、冪等性、PIIセーフな可観測性のための単体テスト証跡
  • 編集されたセーフリードステータスのみを含む、別の管理サンドボックス結果

例

作業指示書UIの変更を行う場合、合成モックフィクスチャを追加し、ローカルでリクエストスキーマと重複送信動作をテストします。リクエストボディやテナントレコードを出力せずに、返されたIDとステータスをアサートします。単体テストが合格したら、専用サンドボックスレーンを1つの承認済みセーフリードフィクスチャに対して実行します。モックモードが無効になっている場合、ローカルにサンドボックス認証情報が表示される場合、またはレスポンスに編集されていないテナントフィールドが含まれている場合は、実行を停止してローカル境界を復元します。

エラーハンドリング

問題原因修正方法
401 Unauthorized無効または期限切れのAPIキーAppFolio Stack ポータルで再生成
403 Forbiddenキーにエンドポイントのスコープがない追加の権限をリクエスト
404 Not Found間違ったプロパティIDまたはパスリソースがサンドボックスに存在することを確認
429 Too Many Requestsレート制限超過指数バックオフを追加、モックモードを使用
ECONNREFUSED :3001開発サーバーが起動していない最初に npm run dev:mock を実行

リソース

次のステップ

appfolio-debug-bundle を参照してください。

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

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

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

jeremylongshore/tons-of-skills-marketplace

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

関連スキル