Synaplan
开源 AI 软件平台,面向企业:自托管 AI 代理,符合 GDPR 的聊天机器人小部件,RAG 知识库,WhatsApp 与 Outlook AI,MCP,多模型路由。支持 Docker、Kubernetes 或在 Germ 托管。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证DiagnoLeads - AI-powered B2B diagnostic lead platform (Next.js 15 fullstack)
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
2026-10-09: 旧 diagnoleads-v2 を DiagnoLeads に改名し、v1(FastAPI + React)をこのリポジトリに集約しました。 v1 は DiagnoLeads-v1-legacy(アーカイブ)として参照用に残しています。移植計画は #31。 AI-Powered B2B Diagnostic Platform for Holdings, Group Companies & Enterprise Organizations 🏢 Our Core Competence: Not just another multi-tenant SaaS. DiagnoLeads v2 is designed from the ground up to support holding companies, corporate groups, and M&A scenarios with hierarchical organization structures and cross-organizational insights.查看完整 README ↗
2026-10-09: 旧
diagnoleads-v2をDiagnoLeadsに改名し、v1(FastAPI + React)をこのリポジトリに集約しました。 v1 は DiagnoLeads-v1-legacy(アーカイブ)として参照用に残しています。移植計画は #31。
AI-Powered B2B Diagnostic Platform for Holdings, Group Companies & Enterprise Organizations
🏢 Our Core Competence: Not just another multi-tenant SaaS. DiagnoLeads v2 is designed from the ground up to support holding companies, corporate groups, and M&A scenarios with hierarchical organization structures and cross-organizational insights.
| Standard Multi-Tenant SaaS | DiagnoLeads v2 |
|---|---|
| ✅ Organization-level data isolation | ✅ Organization-level data isolation |
| ❌ Flat organization structure only | ✅ Hierarchical organizations (parent-subsidiary) |
| ❌ No cross-org collaboration | ✅ Group-wide reporting & analytics |
| ❌ Manual handling of M&A | ✅ Built-in M&A support with data migration |
| ❌ Single-org reports only | ✅ Consolidated group dashboards |
Perfect for:
👉 Read our Multi-Tenant Strategy for detailed architecture
/ は /ja へ転送。英語は /en/…)| ページ | URL | 備考 |
|---|---|---|
| AX マイグレーション LP | /ja/ax-migration | |
| Access 版 LP | /ja/ax-migration/access | |
| コラム一覧 | /ja/ax-migration/column | 記事は /ja/ax-migration/column/<slug>(lib/features/ax-site/columns/) |
| AX 移行診断 | /ja/ax-diagnosis | 社員の紹介リンクは ?agency=<コード> 付き(管理画面の「顧客探し」で出す) |
| 診断結果メールの確認 | /ja/ax-diagnosis/email/confirm | メールのボタンから開く。結果メールは本番ではオフ(#154) |
| 配信停止 | /ja/email/unsubscribe | メールのリンクから開く |
| 診断ビルダーで作った診断 | /ja/d/<slug> | 公開中の診断だけ表示 |
| 旧来の汎用診断 | /ja/diagnostic・/ja/diagnostic/<slug> | AX 移行診断へ転送(#71) |
| ブログ・FAQ | /ja/blog・/ja/faq | 閉じている(404。#413)。CMS(Payload)で作り直し中(Epic #339) |
| 画面 | URL | 備考 |
|---|---|---|
| ログイン | /ja/login | 新規登録は招待リンク(/ja/invite/<token>、48時間有効)からだけ。招待は組織の owner・admin が「設定 → メンバー」で出す |
| ダッシュボード | /ja/dashboard | |
| リード | /ja/leads | 詳細は /ja/leads/<leadId>(ヒアリング・引き継ぎ) |
| 顧客探し(AX) | /ja/prospects | 社員の記録・紹介リンク・営業への引き継ぎ |
| 分析 | /ja/analytics | |
| 設定 | /ja/settings | 組織・メンバー・紹介リンク(agency-links)・AX プレイブック・Webhook・QR キャンペーン・埋め込み |
| CMS(Payload) | /admin | 本番では停止中で、ダッシュボードへ転送(Epic #339) |
| 項目 | 場所 | 備考 |
|---|---|---|
| 死活確認 | /api/health | {"status":"ok"} を返す(DB は見ない) |
| 死活監視 | GitHub Actions「Uptime」(.github/workflows/uptime.yml) | 10分ごとに本番を確かめ、落ちたら uptime ラベルの Issue を立てる(#364) |
| 性能の計測 | GitHub Actions「Lighthouse」(.github/workflows/lighthouse.yml) | 毎日1回、本番の公開5ページをモバイル・デスクトップで3回ずつ測り、中央値を実行の Summary に出す。今は測るだけ(目標と判定は決定 2026-10-24-performance-targets、#569・#612) |
| エラー通知 | lib/ops/alert.ts | サーバーエラーと、公開フォームでボットを断った回数が多いときに OPS_ALERT_EMAIL へメール(#227・#351) |
| 招待のメール確認 | /[locale]/invite/[token] | 停止中。INVITE_REQUIRE_VERIFIED_EMAIL=true で、招待の承認に確認済みのメールアドレスが要るようになる。自社ドメインの送信元ができてからオンにする(#128) |
| ホスティング | Vercel(プロジェクト diagnoleads-v2) | 環境変数は Vercel で管理。閲覧には権限が必要 |
| データベース | Supabase(PostgreSQL) | 本番へのマイグレーションの適用はオーナーが行う |
| 本番 DB の戻し手順 | docs/runbooks/database-restore.md | |
| 個人情報保護方針 | https://sas-com.com/privacy/ | AX の診断と LP からリンク |
# Install dependencies
bun install
# Start Docker services
docker-compose up -d
# Run development server
bun run dev
Visit http://localhost:3000
For production deployment instructions, see docs/deployment-guide.md.
# Using Vercel CLI
vercel --prod
# Development
bun run dev # Start dev server with Turbopack
bun run build # Build for production
bun start # Start production server
# Code Quality
bun run lint # Run Biome linter
bun run format # Format code with Biome
bun run typecheck # TypeScript type checking
# Testing
bun test # Run unit tests (Vitest)
bun run test:e2e # Run E2E tests (Playwright)
# Database
bun run db:generate # Generate Drizzle migrations
bun run db:push # Push schema to database
bun run db:studio # Open Drizzle Studio GUI
# Backup (Production): see docs/runbooks/database-restore.md
bash scripts/prod-dump.sh # Dump production as the read-only role
| Service | URL | Credentials |
|---|---|---|
| Next.js App | http://localhost:3000 | - |
| PgAdmin | http://localhost:5050 | [email protected] / admin |
| Mailhog | http://localhost:8025 | - |
| Drizzle Studio | http://localhost:4983 | Run npm run db:studio |
ディレクトリの構成・層と依存の向き・機能を1つ足すときに触る場所は、docs/ARCHITECTURE.md にまとめています。import の向きは bun run arch:check(CI の Lint & Type Check)で確かめています。
DiagnoLeads v2 supports multiple languages with comprehensive i18n infrastructure.
ja)en)diagnoleads-v2/
├── locales/ # Translation files
│ ├── ja/ # Japanese translations
│ │ ├── common.json # Common UI strings
│ │ └── errors.json # Error messages
│ └── en/ # English translations
│ ├── common.json
│ └── errors.json
├── lib/
│ ├── i18n/ # i18n configuration
│ │ ├── config.ts # next-intl config
│ │ ├── middleware.ts # Locale detection
│ │ └── request.ts # Server-side i18n
│ └── messages/ # Message utilities
│ ├── error-mapper.ts # Error code → i18n key mapping
│ └── validation.ts # Zod validation i18n
└── app/[locale]/ # Locale-based routing
All error messages are centrally managed in locales/*/errors.json:
// Example: Using localized error messages
import { useTranslations } from 'next-intl';
import { getLocalizedErrorMessage } from '@/lib/messages/error-mapper';
function MyComponent() {
const tErrors = useTranslations('errors');
try {
// API call
} catch (error) {
const errorResponse = await mapFetchErrorToErrorResponse(error);
const message = getLocalizedErrorMessage(errorResponse, tErrors);
toast.error(message);
}
}
Zod validation errors are automatically localized:
import { useTranslations } from 'next-intl';
import { createZodErrorMap } from '@/lib/messages/validation';
import { z } from 'zod';
function MyForm() {
const tErrors = useTranslations('errors');
const tFields = useTranslations('leads');
// Set Zod error map for i18n
z.setErrorMap(createZodErrorMap(tErrors, tFields));
const schema = z.object({
email: z.string().email(),
name: z.string().min(2).max(100),
});
// Errors will be automatically localized
}
import { useTranslations } from 'next-intl';
function MyComponent() {
const t = useTranslations('leads');
return <h1>{t('title')}</h1>; // "リード管理" (ja) or "Lead Management" (en)
}
const t = useTranslations('errors');
// {field} will be replaced with actual field name
const message = t('validation.required', { field: 'Email' });
// "Emailは必須です" (ja) or "Email is required" (en)
function Dashboard() {
const t = useTranslations('dashboard');
const tStatus = useTranslations('status');
return (
<>
<h1>{t('title')}</h1>
<span>{tStatus('new')}</span> {/* Status labels */}
</>
);
}
import { getToastMessageKey } from '@/lib/messages/error-mapper';
const tToast = useTranslations('errors');
const key = getToastMessageKey('create', 'lead', false);
toast.success(tToast(key)); // "リードを作成しました" (ja)
getLocalizedErrorMessage() for consistent error display// ✅ Good - locale-aware date formatting
import { useLocale } from 'next-intl';
import { format } from 'date-fns';
import { ja, enUS } from 'date-fns/locale';
const locale = useLocale();
const dateLocale = locale === 'ja' ? ja : enUS;
format(date, 'PPP', { locale: dateLocale });
// ❌ Bad - hardcoded Japanese
format(date, 'yyyy年MM月dd日');
Language preferences are stored in cookies and automatically applied:
// Language switching is handled by LanguageSwitcher component
import { LanguageSwitcher } from '@/components/i18n/language-switcher';
<LanguageSwitcher /> // Displays language dropdown
Copy .env.example to .env.local and configure:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/diagnoleads_dev"
BETTER_AUTH_SECRET="your-secret-key-here"
BETTER_AUTH_URL="http://localhost:3000"
NODE_ENV="development"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
For detailed setup instructions, see docs/v2-setup/:
QUICK_START.md - Quick 15-minute setup guideSETUP_GUIDE.md - Comprehensive setup documentationsetup.sh - Automated setup scriptThis project uses Conventional Commits with automatic validation:
# Commit format
<type>(<scope>): <description>
# Examples
feat(auth): add user authentication
fix(db): resolve connection pooling issue
docs(readme): update setup instructions
Available scopes: auth, leads, assessments, analytics, ai, db, api, ui, embed, integrations, email, jobs, i18n, seo, ci, deps, config, docs, test
/[locale]/help); see docs/USER_GUIDE.md for how to open and edit itProprietary - DiagnoLeads Team