Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
Factrail is a public accountability graph: sourced facts linked to the people and organizations behind them, the long-run drivers they set in motion, and the welfare indicators that measure the human
DataTypeScript · ShellGitHub @sode0417OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Factrail is a public accountability graph: sourced facts linked to the people and organizations behind them, the long-run drivers they set in motion, and the welfare indicators that measure the human impact.
Taken from the repository README
Loading the full README.
Read the full README ↗個人活動のすべての「記録(Fact)」を一元管理するログ基盤
Factrailは、GitHub、Slack、Googleなど外部サービスで発生するイベントを収集・正規化し、時系列のログ(Trail)として保存するインフラ層です。特定のアプリケーションに依存せず、F2AやObsidian、AIクライアントなど、複数のクライアントから再利用可能な形でデータを提供します。
ioredis 経由。Bull Queue は 2026-03-22 に廃止済み)https://factrail-api.sode-ai.com(内部 :3001)https://factrail.sode-ai.com(内部 :3000)scripts/deploy.sh → launchdRailway / Vercel は 2026-03-15 に廃止し、Mac mini へ全面移行しました。
.node-version で 24.22.1 に固定。CI・Mac mini とも同じ系列を使う)git clone https://github.com/yourusername/factrail.git
cd factrail
pnpm workspace のため、リポジトリルートで一括インストールします
(apps/api / apps/web で個別に実行する必要はありません)。
pnpm install
# API: apps/api/.env
cp apps/api/.env.example apps/api/.env
# .envファイルを編集し、必要な値を設定
# Web: apps/web/.env.local
# 必要に応じて設定
主な環境変数:
DATABASE_URL=postgresql://factrail:PASSWORD@localhost:5432/factrail?schema=factrail
ENCRYPTION_KEY=... # 32文字のランダム文字列
REDIS_URL=redis://localhost:6379
詳細はセットアップ手順書を参照
cd apps/api
# Prisma Client生成
npx prisma generate
# データベース確認
npx prisma studio
# Redisをローカルで起動(Dockerを使用)
docker run -d -p 6379:6379 redis:alpine
# APIサーバー起動
cd apps/api
pnpm run start:dev
# Webサーバー起動(別ターミナル)
cd apps/web
pnpm run dev
アクセス:
本番は Mac mini 上で稼働し、GitHub Actions の self-hosted runner が自動デプロイします。
main へ push
└→ .github/workflows/deploy.yml(paths フィルタなし・無条件発火)
└→ self-hosted runner: mac-mini-factrail(launchd 常駐)
└→ scripts/deploy.sh
├─ git pull origin main --ff-only
├─ pnpm install --frozen-lockfile(ルートで workspace 一括)
└─ deploy.json をループ
├─ ビルド(pnpm run build)
├─ launchctl kickstart -kp でサービス再起動
└─ 4 段ヘルスチェック(PID / クラッシュループ / 系統 / HTTP)
プロセスの起動・停止は launchd に委譲しています(自前で kill / nohup しない)。
runner のジョブ終了処理 Cleaning up orphan processes に起動プロセスが殺されるのを避けるためです。
# 手動デプロイ(Mac mini 上)
./scripts/deploy.sh # 全サービス
./scripts/deploy.sh api # API のみ
# GitHub から手動トリガー
gh workflow run deploy.yml -f service=web
# ビルド不要でサービス再起動だけ
launchctl kickstart -k gui/$(id -u)/com.sode.factrail-api
⚠️ Mac mini の作業ツリーは main に置いておくこと。
deploy.shがgit pull --ff-onlyするため、feature ブランチのままだとデプロイが落ちます。
ログは ~/Library/Logs/factrail-{api,web}{,.error}.log。
com.sode.log-rotate が毎日 04:30 に 50 MiB 超を gzip 5 世代でローテートします。
このプロジェクトはClaudeCodeによる自動開発をサポートしています。
Issueを作成
claude:autoラベルが自動付与されるClaudeが自動応答
対話で調整
Claudeをアサイン
レビュー・マージ
# ClaudeCodeをインストール(グローバルインストールは npm を使う)
npm install -g @anthropic-ai/claude-code
# プロジェクトディレクトリで実行
claude-code
factrail/
├── apps/
│ ├── api/ # NestJS Backend
│ │ ├── src/
│ │ │ ├── facts/ # Factsモジュール
│ │ │ ├── integrations/ # 外部連携管理
│ │ │ ├── settings/ # 設定管理
│ │ │ ├── webhooks/ # Webhook受信
│ │ │ ├── common/ # 共通ユーティリティ
│ │ │ └── main.ts
│ │ ├── prisma/
│ │ │ └── schema.prisma
│ │ └── package.json
│ └── web/ # Next.js Frontend
│ ├── app/
│ └── package.json
├── docs/ # ドキュメント
├── .claude/ # ClaudeCode設定
│ ├── context.md # プロジェクトコンテキスト
│ ├── instructions.md # 開発ガイドライン
│ └── settings.local.json # ローカル設定(gitignore)
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ └── development.yml # 開発タスクテンプレート
│ ├── workflows/
│ │ ├── deploy.yml # main push → self-hosted runner でデプロイ
│ │ ├── ci-api.yml / ci-web.yml
│ │ ├── test-api.yml / test-web.yml
│ │ ├── security.yml # pnpm audit / Snyk / Trivy
│ │ ├── claude.yml # Claude自動応答
│ │ ├── claude-code-review.yml
│ │ └── ... # auto-fix, ci-summary, ci-failure-issue 等
│ ├── dependabot.yml # 依存の自動更新(土曜 06:00 JST)
│ └── pull_request_template.md
└── README.md
# ユニットテスト(リポジトリルートから)
pnpm --filter api test
# E2Eテスト(Playwright / apps/web)
pnpm --filter web test:e2e
# カバレッジ
pnpm --filter api test:cov
このプロジェクトでは、複数のセキュリティツールを使用して依存関係とコードの脆弱性を自動的にスキャンしています。
以下のタイミングでセキュリティスキャンが自動実行されます:
# 依存の脆弱性チェック(CI の pnpm-audit ジョブと同じ)
pnpm audit --prod --audit-level high
# Snykを実行(事前にSnyk CLIのインストールと認証が必要)
cd apps/api
npx snyk test --severity-threshold=high
# Trivyを実行(事前にTrivyのインストールが必要)
trivy fs --severity HIGH,CRITICAL .
SNYK_TOKEN を設定{
id: string // UUID
externalId: string // 外部サービスのID
source: string // "github", "slack", etc.
sourceUrl?: string // イベントのURL
occurredAt: DateTime // 発生日時
title: string // 短いタイトル
summary?: string // 要約
content?: string // 詳細
raw: Json // 生データ
type: string // イベントタイプ
metadata?: Json // 追加メタデータ
slackMessageId?: string
f2aEventId?: string
createdAt: DateTime
processedAt?: DateTime
}
{
id: string
provider: string // "github", "slack", "google"
accountId: string
accountName?: string
accessToken: string // 暗号化済み
refreshToken?: string // 暗号化済み
expiresAt?: DateTime
scope: string[]
status: string // "active", "inactive"
lastSyncAt?: DateTime
createdAt: DateTime
updatedAt: DateTime
}
重要: トークンは必ず暗号化して保存すること(ユビキタス言語参照)
MIT
プロジェクトに関する質問や提案は、GitHubのIssueで受け付けています。
Built with ❤️ using ClaudeCode