由 eda 出售

Twenty is an open-source, developer-first CRM built on NestJS, React, and PostgreSQL. Define objects, workflows, and AI agents as code, then self-host or deploy to the cloud.
This block provides the full Twenty CRM monorepo source, including serverless function apps, the Twenty SDK, and supporting infrastructure for building and deploying custom CRM extensions. The primary buyer is a TypeScript/Node.js developer who wants to extend Twenty CRM with custom objects, serverless logic functions, webhook handlers, or third-party integrations (e.g., Fireflies, OpenAI, Slack, Discord).
packages/ - All workspace packages: twenty-server, twenty-front, twenty-sdk, twenty-ui, twenty-apps, twenty-emails, twenty-website, and more.github/ - CI/CD workflows, issue templates, GitHub Actions for deployment and caching.cursor/ - Cursor IDE skill definitions for syncable entity patterns.claude-pr/ - Claude PR automation configuration.vscode/ - Editor settingsnx.json - Nx monorepo task pipeline configurationpackage.json - Root workspace manifest with Yarn Berry workspacestsconfig.base.json - Shared TypeScript path aliases across all packagesjest.preset.js - Shared Jest configuration presetyarn.config.cjs - Yarn constraint rules.yarnrc.yml - Yarn Berry plugin and linker configurationCLAUDE.md - AI assistant context for the repositorynpm install @apollo/client @floating-ui/react @linaria/core @linaria/react \
@radix-ui/colors @sniptt/guards @tabler/icons-react \
@wyw-in-js/babel-preset @wyw-in-js/vite \
archiver date-fns date-fns-tz deep-equal file-type \
framer-motion fuse.js googleapis hex-rgb immer jotai \
libphonenumber-js lodash.camelcase lodash.chunk lodash.compact \
axios openai
npm install --save-dev typescript @types/node
No native modules, iOS pod install, Android linking, or Expo prebuild steps are required. This is a pure Node.js/TypeScript stack.
Drop the source: Place the contents of source/ at your project root or as a git submodule. If integrating selectively, copy only packages/twenty-sdk and the relevant app under packages/twenty-apps/community/.
Wire TypeScript paths: Extend source/tsconfig.base.json from your project's :
启动隔离沙箱并在服务器端直接运行 — 无需本地配置。
此版本的 Tetrees AI Review
This React web app completed archive review with strong static results. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
管道 avcp-2026-08-04.1 · SHA-256 8eaf24e7a72413a0…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
审查日期 2026年8月4日
将此产品直接导入你的 AI IDE、网页构建器或云端 IDE。
将 Tetrees 连接到兼容的 AI IDE,列出你拥有的产品并获取已验证 ZIP,同时不会开放卖家上传权限。
暂无评价。
Sign in to join the discussion
Loading discussion…
tsconfig.json{
"extends": "./source/tsconfig.base.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
}
}
Set up Yarn Berry workspaces (if using the full monorepo):
corepack enable
yarn install
Required environment variables for serverless functions:
DAYS_AGO=7 # activity-summary: lookback window
SLACK_HOOK_URL=https://... # activity-summary: optional Slack webhook
DISCORD_WEBHOOK_URL=https://... # activity-summary: optional Discord webhook
FB_GRAPH_TOKEN=... # activity-summary: optional WhatsApp
WHATSAPP_RECIPIENT_PHONE_NUMBER=... # activity-summary: optional WhatsApp
OPENAI_API_KEY=... # ai-meeting-transcript: required
TWENTY_API_URL=https://... # Fireflies integration: Twenty API base URL
TWENTY_API_KEY=... # Fireflies integration: Twenty API token
FIREFLIES_WEBHOOK_SECRET=... # Fireflies integration: signature verification
Build a specific app:
npx nx build twenty-server
npx nx run twenty-apps-community-fireflies:build
Deploy a serverless function using the Twenty CLI:
npx twenty deploy
export declare const main: () => Promise<{
daysAgo: number;
peopleCreationSummary: unknown;
opportunityCreationSummary: unknown;
taskCreationSummary: unknown;
discord: object;
whatsapp: object;
slack: object;
}>;
The entry point for the activity-summary serverless function. Fetches CRM activity for the past DAYS_AGO days, generates summaries for people, opportunities, and tasks, then optionally dispatches them to Slack, Discord, and/or WhatsApp based on configured environment variables.
// from packages/twenty-apps/community/fireflies/src/receive-fireflies-notes.ts
export declare const main: (payload: FirefliesWebhookPayload) => Promise<ProcessResult>;
export declare const config: ServerlessFunctionConfig;
Receives an inbound Fireflies webhook, validates the signature, fetches the full meeting transcript and summary, and writes structured notes back into Twenty CRM. Use config to register the function's metadata with the Twenty runtime.
export declare class FirefliesApiClient {
// from packages/twenty-apps/community/fireflies/src/fireflies-api-client.ts
}
Encapsulates all outbound calls to the Fireflies GraphQL API. Instantiate this directly when you need to fetch meeting summaries or transcripts independently of the webhook handler, for example in a scheduled polling scenario rather than a push-based integration.
export declare class WebhookHandler {
// from packages/twenty-apps/community/fireflies/src/webhook-handler.ts
}
Orchestrates inbound webhook processing: signature verification, payload parsing, and delegation to TwentyCrmService. Use this when embedding the Fireflies integration into your own Express or Fastify server rather than deploying as a Twenty serverless function.
export declare class MeetingFormatter {
// from packages/twenty-apps/community/fireflies/src/formatters.ts
}
Converts raw FirefliesMeetingData into rich-text and structured formats suitable for Twenty CRM fields. Use when you need to transform meeting data before writing to the API, or to customise how notes appear in the CRM.
Invoke the activity-summary function outside of the Twenty runtime to test your Slack integration before deploying.
import { main } from './source/packages/twenty-apps/community/activity-summary/serverlessFunctions/summarise-and-send/src/index';
process.env.DAYS_AGO = '7';
process.env.SLACK_HOOK_URL = 'https://hooks.slack.com/services/XXXXXX';
async function run() {
const result = await main();
console.log('Summary dispatched:', JSON.stringify(result, null, 2));
}
run().catch(console.error);
Embed the Fireflies integration into an existing Express API instead of deploying it as a standalone serverless function.
import express from 'express';
import {
WebhookHandler,
TwentyCrmService,
FirefliesApiClient,
createLogger,
getApiUrl,
isValidFirefliesPayload,
} from './source/packages/twenty-apps/community/fireflies/src/index';
const app = express();
app.use(express.json());
const logger = createLogger('fireflies-webhook');
const apiUrl = getApiUrl();
const crmService = new TwentyCrmService(apiUrl, process.env.TWENTY_API_KEY!);
const firefliesClient = new FirefliesApiClient(process.env.FIREFLIES_API_KEY!);
const handler = new WebhookHandler(crmService, firefliesClient, logger);
app.post('/webhooks/fireflies', async (req, res) => {
if (!isValidFirefliesPayload(req.body)) {
return res.status(400).json({ error: 'Invalid payload' });
}
const result = await handler.handle(req.body, req.headers);
res.json(result);
});
app.listen(3000, () => logger.info('Listening on :3000'));
Use the exported TypeScript types from the Fireflies package to build a strongly-typed wrapper in your own service layer.
import type {
FirefliesWebhookPayload,
FirefliesMeetingData,
FirefliesParticipant,
ProcessResult,
SummaryStrategy,
} from './source/packages/twenty-apps/community/fireflies/src/index';
function buildSummaryRequest(
payload: FirefliesWebhookPayload,
strategy: SummaryStrategy,
): { meeting: FirefliesMeetingData; participants: FirefliesParticipant[] } {
return {
meeting: payload.meetingData,
participants: payload.meetingData.participants ?? [],
};
}
async function processMeeting(
payload: FirefliesWebhookPayload,
): Promise<ProcessResult> {
const request = buildSummaryRequest(payload, 'full');
console.log('Processing', request.meeting.title, 'with', request.participants.length, 'participants');
// delegate to main() or WebhookHandler as needed
return { success: true, meetingId: payload.meetingId };
}
packages/ - Houses every workspace package; the primary source of all importable code, including twenty-server (NestJS API), twenty-front (React SPA), twenty-sdk, and community apps.packages/twenty-apps/community/activity-summary/ - Serverless function that aggregates CRM activity and pushes digests to Slack, Discord, and WhatsApp.packages/twenty-apps/community/ai-meeting-transcript/ - Serverless function that calls OpenAI to extract summaries, action items, and commitments from a raw meeting transcript, then writes results to Twenty CRM.packages/twenty-apps/community/fireflies/ - Full Fireflies.ai webhook integration: receives meeting callbacks, fetches transcripts, and stores structured notes in Twenty CRM.nx.json - Defines the Nx task pipeline (build, test, lint, e2e) and caching configuration for all packages.tsconfig.base.json - Root TypeScript configuration with all @twenty-* path aliases; must be extended by every package and by your own project.jest.preset.js - Shared Jest config (transform, moduleNameMapper) consumed by each package's jest.config.ts..github/workflows/ - GitHub Actions pipelines for CI testing, Docker image builds, deployment, and versioned releases..github/actions/ - Reusable composite actions for Yarn install, Nx affected-target detection, and cache save/restore..cursor/skills/ - Structured skill documents for Cursor IDE describing syncable entity patterns used throughout the backend.package.json - Root Yarn Berry workspace manifest; defines the workspaces glob and shared dev tooling.yarn.config.cjs - Yarn constraint rules enforcing consistent dependency versions across all packages..yarnrc.yml - Yarn Berry linker (node-modules) and plugin configuration.DAYS_AGO not set causes NaN date offset: Always set DAYS_AGO as a numeric string in your environment; the code casts it with Number() and silently produces an invalid date if missing.verifyWebhookSignature function expects the raw request body buffer, not the parsed JSON object; use express.raw({ type: 'application/json' }) before your route.twenty-sdk/application not resolved: The ServerlessFunctionConfig type is imported from twenty-sdk/application using a subpath export; ensure your tsconfig.base.json path aliases and Node exports map are both in sync with the SDK package.json..yarnrc.yml uses nodeLinker: node-modules; switching to PnP will break native-module resolution and require() calls in serverless bundles. Keep the linker as-is.ai-meeting-transcript hardcodes gpt-4o-mini; if your API key tier does not have access, replace the constant in index.ts before bundling.axios and openai: Both packages ship ESM-first in recent versions. If you bundle with esbuild or tsc in CommonJS mode, add "esModuleInterop": true and "allowSyntheticDefaultImports": true to your tsconfig.I have the Twenty CRM monorepo source at ./source/ and a USAGE.md guide.
The upstream npm package is `user@example.com` from https://github.com/twentyhq/twenty.
My project is a Node.js/TypeScript service (Express, TypeScript 5, ESM).
Please integrate the following into my project step by step:
1. Read USAGE.md and source/packages/twenty-apps/community/fireflies/src/index.ts
to understand all exported symbols.
2. Add the required dependencies from the "Required dependencies" section of USAGE.md.
3. Create src/integrations/fireflies.ts that imports WebhookHandler, TwentyCrmService,
FirefliesApiClient, createLogger, and the relevant types from
./source/packages/twenty-apps/community/fireflies/src/index.
4. Wire an Express POST /webhooks/fireflies route that validates the payload with
isValidFirefliesPayload and delegates to WebhookHandler.handle().
5. Read environment variables TWENTY_API_URL, TWENTY_API_KEY, FIREFLIES_API_KEY,
and FIREFLIES_WEBHOOK_SECRET from process.env and assert they are present at startup.
6. Extend my tsconfig.json to include the path aliases from
source/tsconfig.base.json so all @twenty-* imports resolve correctly.
7. Show me any required changes to my package.json or build config.
Do not invent any exports or types not present in the source files or USAGE.md.
Twenty is released under the AGPL-3.0 license. See source/LICENSE for the full text. Source and upstream package: twentyhq/twenty, npm package user@example.com.
This product’s unique contribution is clean room implementation of valuable code block into AVCP compatible standard.
完整安装指南与集成提示词将在购买后解锁。
Automation, Utilities & Developer Tools
免费