@useatlas/create 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -18
- package/index.ts +191 -31
- package/package.json +1 -1
- package/templates/docker/.env.example +3 -3
- package/templates/docker/Dockerfile.sidecar +28 -0
- package/templates/docker/bin/__tests__/plugin-cli.test.ts +9 -9
- package/templates/docker/bin/atlas.ts +108 -44
- package/templates/docker/data/demo-semantic/catalog.yml +51 -27
- package/templates/docker/data/demo-semantic/entities/accounts.yml +95 -103
- package/templates/docker/data/demo-semantic/entities/companies.yml +88 -152
- package/templates/docker/data/demo-semantic/entities/people.yml +82 -95
- package/templates/docker/data/demo-semantic/glossary.yml +104 -8
- package/templates/docker/data/demo-semantic/metrics/accounts.yml +62 -23
- package/templates/docker/data/demo-semantic/metrics/companies.yml +52 -78
- package/templates/docker/docker-compose.yml +1 -1
- package/templates/docker/docs/deploy.md +2 -39
- package/templates/docker/package.json +17 -1
- package/templates/docker/semantic/catalog.yml +62 -3
- package/templates/docker/semantic/entities/accounts.yml +162 -0
- package/templates/docker/semantic/entities/companies.yml +143 -0
- package/templates/docker/semantic/entities/people.yml +132 -0
- package/templates/docker/semantic/glossary.yml +116 -4
- package/templates/docker/semantic/metrics/accounts.yml +77 -0
- package/templates/docker/semantic/metrics/companies.yml +63 -0
- package/templates/docker/sidecar/Dockerfile +5 -6
- package/templates/docker/sidecar/railway.json +1 -2
- package/templates/docker/src/api/__tests__/admin.test.ts +7 -7
- package/templates/docker/src/api/__tests__/health-plugin.test.ts +7 -0
- package/templates/docker/src/api/__tests__/health.test.ts +30 -8
- package/templates/docker/src/api/routes/admin.ts +549 -8
- package/templates/docker/src/api/routes/chat.ts +5 -20
- package/templates/docker/src/api/routes/health.ts +39 -27
- package/templates/docker/src/api/routes/openapi.ts +1329 -74
- package/templates/docker/src/api/routes/query.ts +2 -1
- package/templates/docker/src/api/server.ts +27 -0
- package/templates/docker/src/app/api/[...route]/route.ts +2 -2
- package/templates/docker/src/app/globals.css +13 -12
- package/templates/docker/src/app/layout.tsx +9 -2
- package/templates/docker/src/components/ui/alert-dialog.tsx +196 -0
- package/templates/docker/src/components/ui/badge.tsx +48 -0
- package/templates/docker/src/components/ui/button.tsx +64 -0
- package/templates/docker/src/components/ui/card.tsx +92 -0
- package/templates/docker/src/components/ui/collapsible.tsx +33 -0
- package/templates/docker/src/components/ui/command.tsx +184 -0
- package/templates/docker/src/components/ui/dialog.tsx +158 -0
- package/templates/docker/src/components/ui/dropdown-menu.tsx +257 -0
- package/templates/docker/src/components/ui/input.tsx +21 -0
- package/templates/docker/src/components/ui/scroll-area.tsx +58 -0
- package/templates/docker/src/components/ui/select.tsx +190 -0
- package/templates/docker/src/components/ui/separator.tsx +28 -0
- package/templates/docker/src/components/ui/sheet.tsx +143 -0
- package/templates/docker/src/components/ui/sidebar.tsx +726 -0
- package/templates/docker/src/components/ui/skeleton.tsx +13 -0
- package/templates/docker/src/components/ui/table.tsx +116 -0
- package/templates/docker/src/components/ui/tabs.tsx +91 -0
- package/templates/docker/src/components/ui/toggle-group.tsx +83 -0
- package/templates/docker/src/components/ui/toggle.tsx +47 -0
- package/templates/docker/src/components/ui/tooltip.tsx +57 -0
- package/templates/docker/src/hooks/use-mobile.ts +19 -0
- package/templates/docker/src/lib/__tests__/agent-cache.test.ts +2 -0
- package/templates/docker/src/lib/__tests__/agent-dialect.test.ts +17 -0
- package/templates/docker/src/lib/__tests__/agent-health-annotations.test.ts +2 -0
- package/templates/docker/src/lib/__tests__/agent-integration.test.ts +2 -0
- package/templates/docker/src/lib/__tests__/config.test.ts +69 -19
- package/templates/docker/src/lib/__tests__/plugin-aware-validation.test.ts +321 -0
- package/templates/docker/src/lib/__tests__/providers.test.ts +32 -1
- package/templates/docker/src/lib/__tests__/startup-actions.test.ts +9 -0
- package/templates/docker/src/lib/__tests__/startup-first-run.test.ts +429 -0
- package/templates/docker/src/lib/__tests__/startup.test.ts +5 -0
- package/templates/docker/src/lib/agent-query.ts +5 -23
- package/templates/docker/src/lib/agent.ts +32 -112
- package/templates/docker/src/lib/auth/__tests__/migrate.test.ts +5 -3
- package/templates/docker/src/lib/auth/middleware.ts +30 -4
- package/templates/docker/src/lib/auth/migrate.ts +97 -0
- package/templates/docker/src/lib/auth/server.ts +12 -1
- package/templates/docker/src/lib/config.ts +37 -39
- package/templates/docker/src/lib/db/__tests__/connection.test.ts +89 -14
- package/templates/docker/src/lib/db/__tests__/registry-health.test.ts +1 -18
- package/templates/docker/src/lib/db/__tests__/registry-pool-limits.test.ts +0 -19
- package/templates/docker/src/lib/db/__tests__/registry.test.ts +11 -208
- package/templates/docker/src/lib/db/connection.ts +87 -265
- package/templates/docker/src/lib/db/internal.ts +6 -1
- package/templates/docker/src/lib/plugins/__tests__/hooks-integration.test.ts +3 -1
- package/templates/docker/src/lib/plugins/__tests__/hooks.test.ts +2 -2
- package/templates/docker/src/lib/plugins/__tests__/migrate.test.ts +355 -1
- package/templates/docker/src/lib/plugins/__tests__/registry.test.ts +32 -5
- package/templates/docker/src/lib/plugins/__tests__/wiring.test.ts +228 -14
- package/templates/docker/src/lib/plugins/index.ts +4 -1
- package/templates/docker/src/lib/plugins/migrate.ts +103 -0
- package/templates/docker/src/lib/plugins/registry.ts +12 -6
- package/templates/docker/src/lib/plugins/wiring.ts +113 -4
- package/templates/docker/src/lib/providers.ts +6 -1
- package/templates/docker/src/lib/security.ts +24 -0
- package/templates/docker/src/lib/semantic.ts +2 -0
- package/templates/docker/src/lib/sidecar-types.ts +12 -1
- package/templates/docker/src/lib/startup.ts +71 -101
- package/templates/docker/src/lib/tools/__tests__/custom-validation.test.ts +2 -0
- package/templates/docker/src/lib/tools/__tests__/explore-nsjail.test.ts +32 -18
- package/templates/docker/src/lib/tools/__tests__/explore-plugin.test.ts +14 -14
- package/templates/docker/src/lib/tools/__tests__/explore-sidecar.test.ts +5 -3
- package/templates/docker/src/lib/tools/__tests__/python-nsjail.test.ts +515 -0
- package/templates/docker/src/lib/tools/__tests__/python-sandbox.test.ts +397 -0
- package/templates/docker/src/lib/tools/__tests__/python-sidecar.test.ts +365 -0
- package/templates/docker/src/lib/tools/__tests__/python.test.ts +331 -0
- package/templates/docker/src/lib/tools/__tests__/registry-actions.test.ts +1 -13
- package/templates/docker/src/lib/tools/__tests__/registry.test.ts +38 -31
- package/templates/docker/src/lib/tools/__tests__/sql-audit.test.ts +2 -0
- package/templates/docker/src/lib/tools/__tests__/sql-connection-whitelist.test.ts +2 -0
- package/templates/docker/src/lib/tools/__tests__/sql-ratelimit.test.ts +2 -0
- package/templates/docker/src/lib/tools/__tests__/sql.test.ts +5 -308
- package/templates/docker/src/lib/tools/explore-nsjail.ts +17 -12
- package/templates/docker/src/lib/tools/explore-sidecar.ts +25 -0
- package/templates/docker/src/lib/tools/explore.ts +28 -32
- package/templates/docker/src/lib/tools/python-nsjail.ts +396 -0
- package/templates/docker/src/lib/tools/python-sandbox.ts +476 -0
- package/templates/docker/src/lib/tools/python-sidecar.ts +150 -0
- package/templates/docker/src/lib/tools/python.ts +367 -0
- package/templates/docker/src/lib/tools/registry.ts +49 -22
- package/templates/docker/src/lib/tools/sql.ts +88 -88
- package/templates/docker/src/types/vercel-sandbox.d.ts +7 -0
- package/templates/docker/src/ui/components/admin/admin-layout.tsx +77 -8
- package/templates/docker/src/ui/components/admin/admin-sidebar.tsx +25 -17
- package/templates/docker/src/ui/components/admin/change-password-dialog.tsx +128 -0
- package/templates/docker/src/ui/components/admin/entity-detail.tsx +3 -3
- package/templates/docker/src/ui/components/admin/semantic-file-tree.tsx +159 -0
- package/templates/docker/src/ui/components/atlas-chat.tsx +64 -12
- package/templates/docker/src/ui/components/chart/result-chart.tsx +25 -15
- package/templates/docker/src/ui/components/chat/markdown.tsx +88 -42
- package/templates/docker/src/ui/components/chat/python-result-card.tsx +244 -0
- package/templates/docker/src/ui/components/chat/sql-block.tsx +39 -15
- package/templates/docker/src/ui/components/chat/sql-result-card.tsx +6 -1
- package/templates/docker/src/ui/components/chat/tool-part.tsx +12 -3
- package/templates/docker/src/ui/components/chat/typing-indicator.tsx +5 -2
- package/templates/docker/src/ui/components/conversations/conversation-item.tsx +25 -20
- package/templates/docker/src/ui/context.tsx +1 -1
- package/templates/docker/src/ui/hooks/use-conversations.ts +3 -3
- package/templates/docker/src/ui/hooks/use-dark-mode.ts +17 -10
- package/templates/docker/tsconfig.json +2 -2
- package/templates/nextjs-standalone/.env.example +1 -1
- package/templates/nextjs-standalone/bin/__tests__/plugin-cli.test.ts +9 -9
- package/templates/nextjs-standalone/bin/atlas.ts +108 -44
- package/templates/nextjs-standalone/data/demo-semantic/catalog.yml +51 -27
- package/templates/nextjs-standalone/data/demo-semantic/entities/accounts.yml +95 -103
- package/templates/nextjs-standalone/data/demo-semantic/entities/companies.yml +88 -152
- package/templates/nextjs-standalone/data/demo-semantic/entities/people.yml +82 -95
- package/templates/nextjs-standalone/data/demo-semantic/glossary.yml +104 -8
- package/templates/nextjs-standalone/data/demo-semantic/metrics/accounts.yml +62 -23
- package/templates/nextjs-standalone/data/demo-semantic/metrics/companies.yml +52 -78
- package/templates/nextjs-standalone/docs/deploy.md +2 -39
- package/templates/nextjs-standalone/package.json +11 -2
- package/templates/nextjs-standalone/scripts/migrate-auth.ts +25 -0
- package/templates/nextjs-standalone/scripts/seed-demo.ts +94 -0
- package/templates/nextjs-standalone/semantic/catalog.yml +62 -3
- package/templates/nextjs-standalone/semantic/entities/accounts.yml +162 -0
- package/templates/nextjs-standalone/semantic/entities/companies.yml +143 -0
- package/templates/nextjs-standalone/semantic/entities/people.yml +132 -0
- package/templates/nextjs-standalone/semantic/glossary.yml +116 -4
- package/templates/nextjs-standalone/semantic/metrics/accounts.yml +77 -0
- package/templates/nextjs-standalone/semantic/metrics/companies.yml +63 -0
- package/templates/nextjs-standalone/src/api/__tests__/admin.test.ts +7 -7
- package/templates/nextjs-standalone/src/api/__tests__/health-plugin.test.ts +7 -0
- package/templates/nextjs-standalone/src/api/__tests__/health.test.ts +30 -8
- package/templates/nextjs-standalone/src/api/routes/admin.ts +549 -8
- package/templates/nextjs-standalone/src/api/routes/chat.ts +5 -20
- package/templates/nextjs-standalone/src/api/routes/health.ts +39 -27
- package/templates/nextjs-standalone/src/api/routes/openapi.ts +1329 -74
- package/templates/nextjs-standalone/src/api/routes/query.ts +2 -1
- package/templates/nextjs-standalone/src/api/server.ts +27 -0
- package/templates/nextjs-standalone/src/app/api/[...route]/route.ts +2 -2
- package/templates/nextjs-standalone/src/app/globals.css +13 -12
- package/templates/nextjs-standalone/src/app/layout.tsx +9 -2
- package/templates/nextjs-standalone/src/components/ui/alert-dialog.tsx +196 -0
- package/templates/nextjs-standalone/src/components/ui/badge.tsx +48 -0
- package/templates/nextjs-standalone/src/components/ui/button.tsx +64 -0
- package/templates/nextjs-standalone/src/components/ui/card.tsx +92 -0
- package/templates/nextjs-standalone/src/components/ui/collapsible.tsx +33 -0
- package/templates/nextjs-standalone/src/components/ui/command.tsx +184 -0
- package/templates/nextjs-standalone/src/components/ui/dialog.tsx +158 -0
- package/templates/nextjs-standalone/src/components/ui/dropdown-menu.tsx +257 -0
- package/templates/nextjs-standalone/src/components/ui/input.tsx +21 -0
- package/templates/nextjs-standalone/src/components/ui/scroll-area.tsx +58 -0
- package/templates/nextjs-standalone/src/components/ui/select.tsx +190 -0
- package/templates/nextjs-standalone/src/components/ui/separator.tsx +28 -0
- package/templates/nextjs-standalone/src/components/ui/sheet.tsx +143 -0
- package/templates/nextjs-standalone/src/components/ui/sidebar.tsx +726 -0
- package/templates/nextjs-standalone/src/components/ui/skeleton.tsx +13 -0
- package/templates/nextjs-standalone/src/components/ui/table.tsx +116 -0
- package/templates/nextjs-standalone/src/components/ui/tabs.tsx +91 -0
- package/templates/nextjs-standalone/src/components/ui/toggle-group.tsx +83 -0
- package/templates/nextjs-standalone/src/components/ui/toggle.tsx +47 -0
- package/templates/nextjs-standalone/src/components/ui/tooltip.tsx +57 -0
- package/templates/nextjs-standalone/src/hooks/use-mobile.ts +19 -0
- package/templates/nextjs-standalone/src/lib/__tests__/agent-cache.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/__tests__/agent-dialect.test.ts +17 -0
- package/templates/nextjs-standalone/src/lib/__tests__/agent-health-annotations.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/__tests__/agent-integration.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/__tests__/config.test.ts +69 -19
- package/templates/nextjs-standalone/src/lib/__tests__/plugin-aware-validation.test.ts +321 -0
- package/templates/nextjs-standalone/src/lib/__tests__/providers.test.ts +32 -1
- package/templates/nextjs-standalone/src/lib/__tests__/startup-actions.test.ts +9 -0
- package/templates/nextjs-standalone/src/lib/__tests__/startup-first-run.test.ts +429 -0
- package/templates/nextjs-standalone/src/lib/__tests__/startup.test.ts +5 -0
- package/templates/nextjs-standalone/src/lib/agent-query.ts +5 -23
- package/templates/nextjs-standalone/src/lib/agent.ts +32 -112
- package/templates/nextjs-standalone/src/lib/auth/__tests__/migrate.test.ts +5 -3
- package/templates/nextjs-standalone/src/lib/auth/middleware.ts +30 -4
- package/templates/nextjs-standalone/src/lib/auth/migrate.ts +97 -0
- package/templates/nextjs-standalone/src/lib/auth/server.ts +12 -1
- package/templates/nextjs-standalone/src/lib/config.ts +37 -39
- package/templates/nextjs-standalone/src/lib/db/__tests__/connection.test.ts +89 -14
- package/templates/nextjs-standalone/src/lib/db/__tests__/registry-health.test.ts +1 -18
- package/templates/nextjs-standalone/src/lib/db/__tests__/registry-pool-limits.test.ts +0 -19
- package/templates/nextjs-standalone/src/lib/db/__tests__/registry.test.ts +11 -208
- package/templates/nextjs-standalone/src/lib/db/connection.ts +87 -265
- package/templates/nextjs-standalone/src/lib/db/internal.ts +6 -1
- package/templates/nextjs-standalone/src/lib/plugins/__tests__/hooks-integration.test.ts +3 -1
- package/templates/nextjs-standalone/src/lib/plugins/__tests__/hooks.test.ts +2 -2
- package/templates/nextjs-standalone/src/lib/plugins/__tests__/migrate.test.ts +355 -1
- package/templates/nextjs-standalone/src/lib/plugins/__tests__/registry.test.ts +32 -5
- package/templates/nextjs-standalone/src/lib/plugins/__tests__/wiring.test.ts +228 -14
- package/templates/nextjs-standalone/src/lib/plugins/index.ts +4 -1
- package/templates/nextjs-standalone/src/lib/plugins/migrate.ts +103 -0
- package/templates/nextjs-standalone/src/lib/plugins/registry.ts +12 -6
- package/templates/nextjs-standalone/src/lib/plugins/wiring.ts +113 -4
- package/templates/nextjs-standalone/src/lib/providers.ts +6 -1
- package/templates/nextjs-standalone/src/lib/security.ts +24 -0
- package/templates/nextjs-standalone/src/lib/semantic.ts +2 -0
- package/templates/nextjs-standalone/src/lib/sidecar-types.ts +12 -1
- package/templates/nextjs-standalone/src/lib/startup.ts +71 -101
- package/templates/nextjs-standalone/src/lib/tools/__tests__/custom-validation.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/explore-nsjail.test.ts +32 -18
- package/templates/nextjs-standalone/src/lib/tools/__tests__/explore-plugin.test.ts +14 -14
- package/templates/nextjs-standalone/src/lib/tools/__tests__/explore-sidecar.test.ts +5 -3
- package/templates/nextjs-standalone/src/lib/tools/__tests__/python-nsjail.test.ts +515 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/python-sandbox.test.ts +397 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/python-sidecar.test.ts +365 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/python.test.ts +331 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/registry-actions.test.ts +1 -13
- package/templates/nextjs-standalone/src/lib/tools/__tests__/registry.test.ts +38 -31
- package/templates/nextjs-standalone/src/lib/tools/__tests__/sql-audit.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/sql-connection-whitelist.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/sql-ratelimit.test.ts +2 -0
- package/templates/nextjs-standalone/src/lib/tools/__tests__/sql.test.ts +5 -308
- package/templates/nextjs-standalone/src/lib/tools/explore-nsjail.ts +17 -12
- package/templates/nextjs-standalone/src/lib/tools/explore-sidecar.ts +25 -0
- package/templates/nextjs-standalone/src/lib/tools/explore.ts +28 -32
- package/templates/nextjs-standalone/src/lib/tools/python-nsjail.ts +396 -0
- package/templates/nextjs-standalone/src/lib/tools/python-sandbox.ts +476 -0
- package/templates/nextjs-standalone/src/lib/tools/python-sidecar.ts +150 -0
- package/templates/nextjs-standalone/src/lib/tools/python.ts +367 -0
- package/templates/nextjs-standalone/src/lib/tools/registry.ts +49 -22
- package/templates/nextjs-standalone/src/lib/tools/sql.ts +88 -88
- package/templates/nextjs-standalone/src/ui/components/admin/admin-layout.tsx +77 -8
- package/templates/nextjs-standalone/src/ui/components/admin/admin-sidebar.tsx +25 -17
- package/templates/nextjs-standalone/src/ui/components/admin/change-password-dialog.tsx +128 -0
- package/templates/nextjs-standalone/src/ui/components/admin/entity-detail.tsx +3 -3
- package/templates/nextjs-standalone/src/ui/components/admin/semantic-file-tree.tsx +159 -0
- package/templates/nextjs-standalone/src/ui/components/atlas-chat.tsx +64 -12
- package/templates/nextjs-standalone/src/ui/components/chart/result-chart.tsx +25 -15
- package/templates/nextjs-standalone/src/ui/components/chat/markdown.tsx +88 -42
- package/templates/nextjs-standalone/src/ui/components/chat/python-result-card.tsx +244 -0
- package/templates/nextjs-standalone/src/ui/components/chat/sql-block.tsx +39 -15
- package/templates/nextjs-standalone/src/ui/components/chat/sql-result-card.tsx +6 -1
- package/templates/nextjs-standalone/src/ui/components/chat/tool-part.tsx +12 -3
- package/templates/nextjs-standalone/src/ui/components/chat/typing-indicator.tsx +5 -2
- package/templates/nextjs-standalone/src/ui/components/conversations/conversation-item.tsx +25 -20
- package/templates/nextjs-standalone/src/ui/context.tsx +1 -1
- package/templates/nextjs-standalone/src/ui/hooks/use-conversations.ts +3 -3
- package/templates/nextjs-standalone/src/ui/hooks/use-dark-mode.ts +17 -10
- package/templates/nextjs-standalone/tsconfig.json +0 -1
- package/templates/nextjs-standalone/vercel.json +4 -1
- package/templates/docker/render.yaml +0 -34
- package/templates/docker/semantic/entities/.gitkeep +0 -0
- package/templates/docker/semantic/metrics/.gitkeep +0 -0
- package/templates/docker/src/lib/db/__tests__/duckdb.test.ts +0 -141
- package/templates/docker/src/lib/db/__tests__/salesforce.test.ts +0 -339
- package/templates/docker/src/lib/db/__tests__/snowflake.test.ts +0 -217
- package/templates/docker/src/lib/db/duckdb.ts +0 -122
- package/templates/docker/src/lib/db/salesforce.ts +0 -342
- package/templates/docker/src/lib/tools/__tests__/salesforce-tool.test.ts +0 -154
- package/templates/docker/src/lib/tools/__tests__/soql-validation.test.ts +0 -303
- package/templates/docker/src/lib/tools/__tests__/sql-duckdb.test.ts +0 -233
- package/templates/docker/src/lib/tools/salesforce.ts +0 -138
- package/templates/docker/src/lib/tools/soql-validation.ts +0 -172
- package/templates/nextjs-standalone/semantic/entities/.gitkeep +0 -0
- package/templates/nextjs-standalone/semantic/metrics/.gitkeep +0 -0
- package/templates/nextjs-standalone/src/lib/db/__tests__/duckdb.test.ts +0 -141
- package/templates/nextjs-standalone/src/lib/db/__tests__/salesforce.test.ts +0 -339
- package/templates/nextjs-standalone/src/lib/db/__tests__/snowflake.test.ts +0 -217
- package/templates/nextjs-standalone/src/lib/db/duckdb.ts +0 -122
- package/templates/nextjs-standalone/src/lib/db/salesforce.ts +0 -342
- package/templates/nextjs-standalone/src/lib/tools/__tests__/salesforce-tool.test.ts +0 -154
- package/templates/nextjs-standalone/src/lib/tools/__tests__/soql-validation.test.ts +0 -303
- package/templates/nextjs-standalone/src/lib/tools/__tests__/sql-duckdb.test.ts +0 -233
- package/templates/nextjs-standalone/src/lib/tools/salesforce.ts +0 -138
- package/templates/nextjs-standalone/src/lib/tools/soql-validation.ts +0 -172
|
@@ -20,14 +20,26 @@
|
|
|
20
20
|
"@ai-sdk/anthropic": "^3.0.46",
|
|
21
21
|
"@ai-sdk/openai": "^3.0.31",
|
|
22
22
|
"@ai-sdk/react": "^3.0.99",
|
|
23
|
+
"@better-auth/api-key": "^1.5.1",
|
|
23
24
|
"ai": "^6.0.97",
|
|
25
|
+
"better-auth": "^1.5.1",
|
|
26
|
+
"class-variance-authority": "^0.7.1",
|
|
24
27
|
"clsx": "^2.1.1",
|
|
28
|
+
"cmdk": "^1.1.1",
|
|
29
|
+
"croner": "^9.0.0",
|
|
30
|
+
"hono": "^4.12.3",
|
|
31
|
+
"jose": "^6.1.3",
|
|
25
32
|
"js-yaml": "^4.1.1",
|
|
26
|
-
"lucide-react": "^0.576.0",
|
|
27
33
|
"just-bash": "^2.10.2",
|
|
34
|
+
"lucide-react": "^0.577.0",
|
|
35
|
+
"mysql2": "^3.18.0",
|
|
28
36
|
"next": "^16.1.6",
|
|
29
37
|
"node-sql-parser": "^5.4.0",
|
|
38
|
+
"nuqs": "^2.8.9",
|
|
30
39
|
"pg": "^8.18.0",
|
|
40
|
+
"pino": "^10.3.1",
|
|
41
|
+
"pino-pretty": "^13.1.3",
|
|
42
|
+
"radix-ui": "^1.4.3",
|
|
31
43
|
"react": "^19.2.4",
|
|
32
44
|
"react-dom": "^19.2.4",
|
|
33
45
|
"react-markdown": "^10.1.0",
|
|
@@ -41,6 +53,7 @@
|
|
|
41
53
|
"@vercel/sandbox": "^1"
|
|
42
54
|
},
|
|
43
55
|
"devDependencies": {
|
|
56
|
+
"@clack/prompts": "^0.10.0",
|
|
44
57
|
"@eslint/js": "^10.0.1",
|
|
45
58
|
"@next/eslint-plugin-next": "^16.1.6",
|
|
46
59
|
"@tailwindcss/postcss": "^4.2.1",
|
|
@@ -50,9 +63,12 @@
|
|
|
50
63
|
"@types/react": "^19.2.14",
|
|
51
64
|
"@types/react-dom": "^19.2.3",
|
|
52
65
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
66
|
+
"@types/bun": "^1.3.9",
|
|
53
67
|
"@typescript/native-preview": "^7.0.0-dev.20260226.1",
|
|
54
68
|
"eslint": "^10.0.2",
|
|
55
69
|
"tailwindcss": "^4.2.1",
|
|
70
|
+
"shadcn": "^3.8.5",
|
|
71
|
+
"picocolors": "^1.1.0",
|
|
56
72
|
"typescript": "^5.9.3",
|
|
57
73
|
"typescript-eslint": "^8.56.1"
|
|
58
74
|
}
|
|
@@ -1,5 +1,64 @@
|
|
|
1
|
-
# Atlas Semantic Layer — Catalog
|
|
2
|
-
# Run `bun run atlas -- init` to auto-generate from your database.
|
|
3
1
|
version: "1.0"
|
|
4
|
-
|
|
2
|
+
name: Atlas Demo — SaaS CRM
|
|
3
|
+
description: |
|
|
4
|
+
B2B SaaS company CRM dataset. Tracks companies (customers), the people who work
|
|
5
|
+
there (contacts), and subscription accounts with plan tiers and MRR.
|
|
6
|
+
Use this dataset to explore revenue analysis, customer segmentation,
|
|
7
|
+
churn patterns, and org-level reporting.
|
|
8
|
+
|
|
9
|
+
entities:
|
|
10
|
+
- name: Companies
|
|
11
|
+
file: entities/companies.yml
|
|
12
|
+
grain: one row per customer company
|
|
13
|
+
description: >
|
|
14
|
+
Customer companies with firmographic data — industry, headcount,
|
|
15
|
+
geography, revenue, and valuation.
|
|
16
|
+
use_for:
|
|
17
|
+
- Firmographic segmentation (industry, country, company size)
|
|
18
|
+
- Revenue and valuation analysis
|
|
19
|
+
- Customer base composition
|
|
20
|
+
common_questions:
|
|
21
|
+
- What industries make up our customer base?
|
|
22
|
+
- Which countries have the most customers?
|
|
23
|
+
- What is the average company revenue by industry?
|
|
24
|
+
- How many enterprise-size companies (500+ employees) do we have?
|
|
25
|
+
|
|
26
|
+
- name: People
|
|
27
|
+
file: entities/people.yml
|
|
28
|
+
grain: one row per contact
|
|
29
|
+
description: >
|
|
30
|
+
Contacts at customer companies — department, seniority, title,
|
|
31
|
+
and start date. Linked to companies via company_id.
|
|
32
|
+
use_for:
|
|
33
|
+
- Stakeholder mapping by department and seniority
|
|
34
|
+
- Org chart analysis per company
|
|
35
|
+
- Tenure and hiring trend analysis
|
|
36
|
+
common_questions:
|
|
37
|
+
- How many contacts do we have per company?
|
|
38
|
+
- What is the department breakdown across all contacts?
|
|
39
|
+
- Which companies have the most executive-level contacts?
|
|
40
|
+
- What seniority levels are most common?
|
|
41
|
+
|
|
42
|
+
- name: Accounts
|
|
43
|
+
file: entities/accounts.yml
|
|
44
|
+
grain: one row per subscription account
|
|
45
|
+
description: >
|
|
46
|
+
Subscription accounts with plan tier, billing status, MRR
|
|
47
|
+
(monthly_value), and contract dates. Linked to companies via company_id.
|
|
48
|
+
use_for:
|
|
49
|
+
- MRR and revenue analysis by plan
|
|
50
|
+
- Churn and retention analysis
|
|
51
|
+
- Contract lifecycle tracking
|
|
52
|
+
- Cross-entity analysis joining to companies and people
|
|
53
|
+
common_questions:
|
|
54
|
+
- What is total MRR by plan type?
|
|
55
|
+
- How many accounts are churned vs active?
|
|
56
|
+
- What is the average contract length?
|
|
57
|
+
- Which companies have the highest MRR?
|
|
58
|
+
|
|
5
59
|
glossary: glossary.yml
|
|
60
|
+
metrics:
|
|
61
|
+
- file: metrics/accounts.yml
|
|
62
|
+
description: Subscription and revenue metrics (MRR, churn rate, ARPA)
|
|
63
|
+
- file: metrics/companies.yml
|
|
64
|
+
description: Customer base metrics (count, avg revenue, industry breakdown)
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
name: Accounts
|
|
2
|
+
type: fact_table
|
|
3
|
+
table: accounts
|
|
4
|
+
grain: one row per subscription account
|
|
5
|
+
description: |
|
|
6
|
+
Subscription accounts representing our billing relationship with each customer.
|
|
7
|
+
Each account belongs to one company and has a plan tier (Free, Starter, Pro,
|
|
8
|
+
Enterprise), a billing status (Active, Inactive, Suspended, Churned), and a
|
|
9
|
+
monthly_value representing MRR contribution. Contract dates track the lifecycle.
|
|
10
|
+
A company can have multiple accounts (e.g. separate subscriptions for different teams).
|
|
11
|
+
|
|
12
|
+
dimensions:
|
|
13
|
+
- name: id
|
|
14
|
+
sql: id
|
|
15
|
+
type: number
|
|
16
|
+
description: Primary key — unique account identifier
|
|
17
|
+
primary_key: true
|
|
18
|
+
|
|
19
|
+
- name: company_id
|
|
20
|
+
sql: company_id
|
|
21
|
+
type: number
|
|
22
|
+
description: Foreign key to companies — which customer owns this account
|
|
23
|
+
|
|
24
|
+
- name: plan
|
|
25
|
+
sql: plan
|
|
26
|
+
type: string
|
|
27
|
+
description: |
|
|
28
|
+
Subscription tier. Determines pricing and feature access.
|
|
29
|
+
Free = $0, Starter = ~$49-89, Pro = ~$299-500, Enterprise = ~$5K-15K.
|
|
30
|
+
sample_values: [Enterprise, Pro, Starter, Free]
|
|
31
|
+
|
|
32
|
+
- name: status
|
|
33
|
+
sql: status
|
|
34
|
+
type: string
|
|
35
|
+
description: |
|
|
36
|
+
Current billing status. Active = paying, Inactive = paused,
|
|
37
|
+
Suspended = payment issue, Churned = cancelled.
|
|
38
|
+
sample_values: [Active, Churned, Inactive, Suspended]
|
|
39
|
+
|
|
40
|
+
- name: monthly_value
|
|
41
|
+
sql: monthly_value
|
|
42
|
+
type: number
|
|
43
|
+
description: |
|
|
44
|
+
Monthly Recurring Revenue (MRR) from this account in dollars.
|
|
45
|
+
Free accounts have $0. This is the core revenue metric.
|
|
46
|
+
|
|
47
|
+
- name: contract_start
|
|
48
|
+
sql: contract_start
|
|
49
|
+
type: date
|
|
50
|
+
description: Date the subscription began
|
|
51
|
+
|
|
52
|
+
- name: contract_end
|
|
53
|
+
sql: contract_end
|
|
54
|
+
type: date
|
|
55
|
+
description: |
|
|
56
|
+
Date the subscription ended. NULL means the account is still under contract.
|
|
57
|
+
Set when an account churns or is terminated.
|
|
58
|
+
|
|
59
|
+
- name: monthly_value_bucket
|
|
60
|
+
sql: |-
|
|
61
|
+
CASE
|
|
62
|
+
WHEN monthly_value = 0 THEN 'Free'
|
|
63
|
+
WHEN monthly_value < 100 THEN 'Low'
|
|
64
|
+
WHEN monthly_value < 1000 THEN 'Mid'
|
|
65
|
+
ELSE 'High'
|
|
66
|
+
END
|
|
67
|
+
type: string
|
|
68
|
+
description: MRR tier bucket — Free / Low / Mid / High
|
|
69
|
+
virtual: true
|
|
70
|
+
sample_values: [Free, Low, Mid, High]
|
|
71
|
+
|
|
72
|
+
- name: contract_start_year
|
|
73
|
+
sql: EXTRACT(YEAR FROM contract_start)
|
|
74
|
+
type: number
|
|
75
|
+
description: Year the contract started — useful for cohort analysis
|
|
76
|
+
virtual: true
|
|
77
|
+
|
|
78
|
+
- name: contract_start_month
|
|
79
|
+
sql: TO_CHAR(contract_start, 'YYYY-MM')
|
|
80
|
+
type: string
|
|
81
|
+
description: Year-month the contract started
|
|
82
|
+
virtual: true
|
|
83
|
+
|
|
84
|
+
- name: is_churned
|
|
85
|
+
sql: CASE WHEN status = 'Churned' THEN true ELSE false END
|
|
86
|
+
type: boolean
|
|
87
|
+
description: Whether this account has churned
|
|
88
|
+
virtual: true
|
|
89
|
+
|
|
90
|
+
measures:
|
|
91
|
+
- name: account_count
|
|
92
|
+
sql: id
|
|
93
|
+
type: count_distinct
|
|
94
|
+
description: Number of unique accounts
|
|
95
|
+
|
|
96
|
+
- name: total_mrr
|
|
97
|
+
sql: monthly_value
|
|
98
|
+
type: sum
|
|
99
|
+
description: Total Monthly Recurring Revenue
|
|
100
|
+
|
|
101
|
+
- name: avg_mrr
|
|
102
|
+
sql: monthly_value
|
|
103
|
+
type: avg
|
|
104
|
+
description: Average MRR per account
|
|
105
|
+
|
|
106
|
+
joins:
|
|
107
|
+
- target_entity: Companies
|
|
108
|
+
relationship: many_to_one
|
|
109
|
+
join_columns:
|
|
110
|
+
from: company_id
|
|
111
|
+
to: id
|
|
112
|
+
description: Each account belongs to one company (customer)
|
|
113
|
+
|
|
114
|
+
use_cases:
|
|
115
|
+
- MRR analysis — total, by plan, by status, over time
|
|
116
|
+
- Churn analysis — churned vs active accounts, churn rate by plan
|
|
117
|
+
- Revenue segmentation — which plans drive the most revenue
|
|
118
|
+
- Contract lifecycle — average duration, upcoming renewals
|
|
119
|
+
- Cross-entity joins to companies for firmographic revenue analysis
|
|
120
|
+
|
|
121
|
+
query_patterns:
|
|
122
|
+
- name: mrr_by_plan
|
|
123
|
+
description: Total MRR and account count by plan tier
|
|
124
|
+
sql: |-
|
|
125
|
+
SELECT plan,
|
|
126
|
+
SUM(monthly_value) AS total_mrr,
|
|
127
|
+
COUNT(*) AS account_count,
|
|
128
|
+
AVG(monthly_value) AS avg_mrr
|
|
129
|
+
FROM accounts
|
|
130
|
+
WHERE status = 'Active'
|
|
131
|
+
GROUP BY plan
|
|
132
|
+
ORDER BY total_mrr DESC
|
|
133
|
+
|
|
134
|
+
- name: churn_rate_by_plan
|
|
135
|
+
description: Churn rate by plan type
|
|
136
|
+
sql: |-
|
|
137
|
+
SELECT plan,
|
|
138
|
+
COUNT(*) FILTER (WHERE status = 'Churned') AS churned,
|
|
139
|
+
COUNT(*) AS total,
|
|
140
|
+
ROUND(100.0 * COUNT(*) FILTER (WHERE status = 'Churned') / COUNT(*), 1) AS churn_pct
|
|
141
|
+
FROM accounts
|
|
142
|
+
GROUP BY plan
|
|
143
|
+
ORDER BY churn_pct DESC
|
|
144
|
+
|
|
145
|
+
- name: accounts_by_status
|
|
146
|
+
description: Account distribution by billing status
|
|
147
|
+
sql: |-
|
|
148
|
+
SELECT status, COUNT(*) AS count
|
|
149
|
+
FROM accounts
|
|
150
|
+
GROUP BY status
|
|
151
|
+
ORDER BY count DESC
|
|
152
|
+
|
|
153
|
+
- name: mrr_by_contract_year
|
|
154
|
+
description: MRR cohort analysis by contract start year
|
|
155
|
+
sql: |-
|
|
156
|
+
SELECT EXTRACT(YEAR FROM contract_start) AS cohort_year,
|
|
157
|
+
SUM(monthly_value) AS total_mrr,
|
|
158
|
+
COUNT(*) AS accounts
|
|
159
|
+
FROM accounts
|
|
160
|
+
WHERE status = 'Active'
|
|
161
|
+
GROUP BY cohort_year
|
|
162
|
+
ORDER BY cohort_year
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
name: Companies
|
|
2
|
+
type: dimension_table
|
|
3
|
+
table: companies
|
|
4
|
+
grain: one row per customer company
|
|
5
|
+
description: |
|
|
6
|
+
Customer companies (our B2B clients). Contains firmographic data including
|
|
7
|
+
industry vertical, headcount, founding year, HQ country, annual revenue,
|
|
8
|
+
and valuation. Each company can have multiple accounts (subscriptions)
|
|
9
|
+
and multiple people (contacts). This is the central dimension table for
|
|
10
|
+
customer-level analysis.
|
|
11
|
+
|
|
12
|
+
dimensions:
|
|
13
|
+
- name: id
|
|
14
|
+
sql: id
|
|
15
|
+
type: number
|
|
16
|
+
description: Primary key — unique company identifier
|
|
17
|
+
primary_key: true
|
|
18
|
+
|
|
19
|
+
- name: name
|
|
20
|
+
sql: name
|
|
21
|
+
type: string
|
|
22
|
+
description: Company name
|
|
23
|
+
sample_values: [Acme Corp, DataFlow Inc, CloudSync, RetailHub]
|
|
24
|
+
|
|
25
|
+
- name: industry
|
|
26
|
+
sql: industry
|
|
27
|
+
type: string
|
|
28
|
+
description: Business sector / vertical
|
|
29
|
+
sample_values: [Education, Energy, Finance, Healthcare, Manufacturing, Media, Retail, Technology]
|
|
30
|
+
|
|
31
|
+
- name: employee_count
|
|
32
|
+
sql: employee_count
|
|
33
|
+
type: number
|
|
34
|
+
description: Total headcount at the company
|
|
35
|
+
|
|
36
|
+
- name: founded_year
|
|
37
|
+
sql: founded_year
|
|
38
|
+
type: number
|
|
39
|
+
description: Year the company was founded
|
|
40
|
+
|
|
41
|
+
- name: country
|
|
42
|
+
sql: country
|
|
43
|
+
type: string
|
|
44
|
+
description: ISO 2-letter code for company HQ location
|
|
45
|
+
sample_values: [AU, BR, CA, DE, FR, IN, JP, SG, UK, US]
|
|
46
|
+
|
|
47
|
+
- name: revenue
|
|
48
|
+
sql: revenue
|
|
49
|
+
type: number
|
|
50
|
+
description: Annual revenue in dollars (the company's own revenue, not what they pay us)
|
|
51
|
+
|
|
52
|
+
- name: valuation
|
|
53
|
+
sql: valuation
|
|
54
|
+
type: number
|
|
55
|
+
description: Company valuation in dollars
|
|
56
|
+
|
|
57
|
+
- name: company_size
|
|
58
|
+
sql: |-
|
|
59
|
+
CASE
|
|
60
|
+
WHEN employee_count < 100 THEN 'Small'
|
|
61
|
+
WHEN employee_count < 300 THEN 'Mid-Market'
|
|
62
|
+
ELSE 'Enterprise'
|
|
63
|
+
END
|
|
64
|
+
type: string
|
|
65
|
+
description: Company size segment based on headcount
|
|
66
|
+
virtual: true
|
|
67
|
+
sample_values: [Small, Mid-Market, Enterprise]
|
|
68
|
+
|
|
69
|
+
- name: revenue_tier
|
|
70
|
+
sql: |-
|
|
71
|
+
CASE
|
|
72
|
+
WHEN revenue < 10000000 THEN 'Under $10M'
|
|
73
|
+
WHEN revenue < 50000000 THEN '$10M-$50M'
|
|
74
|
+
WHEN revenue < 100000000 THEN '$50M-$100M'
|
|
75
|
+
ELSE '$100M+'
|
|
76
|
+
END
|
|
77
|
+
type: string
|
|
78
|
+
description: Revenue tier for segmentation
|
|
79
|
+
virtual: true
|
|
80
|
+
sample_values: [Under $10M, $10M-$50M, $50M-$100M, $100M+]
|
|
81
|
+
|
|
82
|
+
measures:
|
|
83
|
+
- name: company_count
|
|
84
|
+
sql: id
|
|
85
|
+
type: count_distinct
|
|
86
|
+
description: Number of unique companies
|
|
87
|
+
|
|
88
|
+
- name: avg_employee_count
|
|
89
|
+
sql: employee_count
|
|
90
|
+
type: avg
|
|
91
|
+
description: Average headcount per company
|
|
92
|
+
|
|
93
|
+
- name: total_revenue
|
|
94
|
+
sql: revenue
|
|
95
|
+
type: sum
|
|
96
|
+
description: Combined annual revenue of all companies
|
|
97
|
+
|
|
98
|
+
- name: avg_revenue
|
|
99
|
+
sql: revenue
|
|
100
|
+
type: avg
|
|
101
|
+
description: Average annual revenue per company
|
|
102
|
+
|
|
103
|
+
- name: avg_valuation
|
|
104
|
+
sql: valuation
|
|
105
|
+
type: avg
|
|
106
|
+
description: Average company valuation
|
|
107
|
+
|
|
108
|
+
use_cases:
|
|
109
|
+
- Customer segmentation by industry, country, company size
|
|
110
|
+
- Revenue and valuation analysis across the customer base
|
|
111
|
+
- Firmographic profiling for ICP (ideal customer profile) analysis
|
|
112
|
+
- Join to accounts for revenue-per-company analysis
|
|
113
|
+
- Join to people for stakeholder density per company
|
|
114
|
+
|
|
115
|
+
query_patterns:
|
|
116
|
+
- name: companies_by_industry
|
|
117
|
+
description: Customer count and avg revenue by industry
|
|
118
|
+
sql: |-
|
|
119
|
+
SELECT industry,
|
|
120
|
+
COUNT(*) AS company_count,
|
|
121
|
+
AVG(revenue) AS avg_revenue,
|
|
122
|
+
AVG(employee_count) AS avg_headcount
|
|
123
|
+
FROM companies
|
|
124
|
+
GROUP BY industry
|
|
125
|
+
ORDER BY company_count DESC
|
|
126
|
+
|
|
127
|
+
- name: companies_by_country
|
|
128
|
+
description: Customer distribution by country
|
|
129
|
+
sql: |-
|
|
130
|
+
SELECT country,
|
|
131
|
+
COUNT(*) AS company_count,
|
|
132
|
+
SUM(revenue) AS total_revenue
|
|
133
|
+
FROM companies
|
|
134
|
+
GROUP BY country
|
|
135
|
+
ORDER BY company_count DESC
|
|
136
|
+
|
|
137
|
+
- name: top_companies_by_revenue
|
|
138
|
+
description: Largest customers by annual revenue
|
|
139
|
+
sql: |-
|
|
140
|
+
SELECT name, industry, country, revenue, employee_count
|
|
141
|
+
FROM companies
|
|
142
|
+
ORDER BY revenue DESC
|
|
143
|
+
LIMIT 10
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
name: People
|
|
2
|
+
type: dimension_table
|
|
3
|
+
table: people
|
|
4
|
+
grain: one row per contact
|
|
5
|
+
description: |
|
|
6
|
+
Contacts at customer companies. Each person has a department, seniority level,
|
|
7
|
+
job title, and start date. Linked to companies via company_id. Use for
|
|
8
|
+
stakeholder mapping, org analysis, and understanding who we're selling to
|
|
9
|
+
and supporting at each company.
|
|
10
|
+
|
|
11
|
+
dimensions:
|
|
12
|
+
- name: id
|
|
13
|
+
sql: id
|
|
14
|
+
type: number
|
|
15
|
+
description: Primary key — unique contact identifier
|
|
16
|
+
primary_key: true
|
|
17
|
+
|
|
18
|
+
- name: name
|
|
19
|
+
sql: name
|
|
20
|
+
type: string
|
|
21
|
+
description: Full name of the contact
|
|
22
|
+
|
|
23
|
+
- name: email
|
|
24
|
+
sql: email
|
|
25
|
+
type: string
|
|
26
|
+
description: Work email address
|
|
27
|
+
|
|
28
|
+
- name: company_id
|
|
29
|
+
sql: company_id
|
|
30
|
+
type: number
|
|
31
|
+
description: Foreign key to companies — which company this person works at
|
|
32
|
+
|
|
33
|
+
- name: department
|
|
34
|
+
sql: department
|
|
35
|
+
type: string
|
|
36
|
+
description: Functional department within the company
|
|
37
|
+
sample_values: [Engineering, Finance, Marketing, Operations, Product, Sales]
|
|
38
|
+
|
|
39
|
+
- name: seniority
|
|
40
|
+
sql: seniority
|
|
41
|
+
type: string
|
|
42
|
+
description: Career level — indicates decision-making authority
|
|
43
|
+
sample_values: [Executive, Senior, Mid, Junior]
|
|
44
|
+
|
|
45
|
+
- name: title
|
|
46
|
+
sql: title
|
|
47
|
+
type: string
|
|
48
|
+
description: Job title (e.g. CFO, Backend Engineer, Account Executive)
|
|
49
|
+
|
|
50
|
+
- name: start_date
|
|
51
|
+
sql: start_date
|
|
52
|
+
type: date
|
|
53
|
+
description: Date the person started at their company
|
|
54
|
+
|
|
55
|
+
- name: start_date_year
|
|
56
|
+
sql: EXTRACT(YEAR FROM start_date)
|
|
57
|
+
type: number
|
|
58
|
+
description: Year the person started — useful for tenure analysis
|
|
59
|
+
virtual: true
|
|
60
|
+
|
|
61
|
+
- name: tenure_years
|
|
62
|
+
sql: EXTRACT(YEAR FROM AGE(CURRENT_DATE, start_date))
|
|
63
|
+
type: number
|
|
64
|
+
description: Approximate years of tenure at the company
|
|
65
|
+
virtual: true
|
|
66
|
+
|
|
67
|
+
measures:
|
|
68
|
+
- name: contact_count
|
|
69
|
+
sql: id
|
|
70
|
+
type: count_distinct
|
|
71
|
+
description: Number of unique contacts
|
|
72
|
+
|
|
73
|
+
- name: avg_tenure
|
|
74
|
+
sql: EXTRACT(YEAR FROM AGE(CURRENT_DATE, start_date))
|
|
75
|
+
type: avg
|
|
76
|
+
description: Average tenure in years
|
|
77
|
+
|
|
78
|
+
joins:
|
|
79
|
+
- target_entity: Companies
|
|
80
|
+
relationship: many_to_one
|
|
81
|
+
join_columns:
|
|
82
|
+
from: company_id
|
|
83
|
+
to: id
|
|
84
|
+
description: Each contact belongs to one company
|
|
85
|
+
|
|
86
|
+
use_cases:
|
|
87
|
+
- Stakeholder mapping — who are the key contacts at each company
|
|
88
|
+
- Department breakdown — what functions are represented
|
|
89
|
+
- Seniority analysis — how many executives vs individual contributors
|
|
90
|
+
- Hiring trends — when were contacts added, by year
|
|
91
|
+
- Join to companies + accounts for full customer intelligence
|
|
92
|
+
|
|
93
|
+
query_patterns:
|
|
94
|
+
- name: contacts_by_department
|
|
95
|
+
description: Contact count by department
|
|
96
|
+
sql: |-
|
|
97
|
+
SELECT department,
|
|
98
|
+
COUNT(*) AS contact_count
|
|
99
|
+
FROM people
|
|
100
|
+
GROUP BY department
|
|
101
|
+
ORDER BY contact_count DESC
|
|
102
|
+
|
|
103
|
+
- name: contacts_by_seniority
|
|
104
|
+
description: Contact distribution by seniority level
|
|
105
|
+
sql: |-
|
|
106
|
+
SELECT seniority,
|
|
107
|
+
COUNT(*) AS contact_count
|
|
108
|
+
FROM people
|
|
109
|
+
GROUP BY seniority
|
|
110
|
+
ORDER BY contact_count DESC
|
|
111
|
+
|
|
112
|
+
- name: executives_by_company
|
|
113
|
+
description: Executive contacts per company
|
|
114
|
+
sql: |-
|
|
115
|
+
SELECT c.name AS company,
|
|
116
|
+
COUNT(*) AS executive_count
|
|
117
|
+
FROM people p
|
|
118
|
+
JOIN companies c ON p.company_id = c.id
|
|
119
|
+
WHERE p.seniority = 'Executive'
|
|
120
|
+
GROUP BY c.name
|
|
121
|
+
ORDER BY executive_count DESC
|
|
122
|
+
|
|
123
|
+
- name: contacts_per_company
|
|
124
|
+
description: Contact density per company
|
|
125
|
+
sql: |-
|
|
126
|
+
SELECT c.name AS company,
|
|
127
|
+
COUNT(*) AS contact_count,
|
|
128
|
+
c.employee_count AS total_employees
|
|
129
|
+
FROM people p
|
|
130
|
+
JOIN companies c ON p.company_id = c.id
|
|
131
|
+
GROUP BY c.name, c.employee_count
|
|
132
|
+
ORDER BY contact_count DESC
|
|
@@ -1,6 +1,118 @@
|
|
|
1
|
-
# Atlas Glossary — Business term definitions
|
|
2
|
-
# Run `bun run atlas -- init` to auto-generate terms from your database.
|
|
3
1
|
terms:
|
|
4
|
-
|
|
2
|
+
MRR:
|
|
5
3
|
status: defined
|
|
6
|
-
definition:
|
|
4
|
+
definition: >
|
|
5
|
+
Monthly Recurring Revenue. The sum of monthly_value across all active accounts.
|
|
6
|
+
Use accounts.monthly_value and filter by status = 'Active' for current MRR.
|
|
7
|
+
tables:
|
|
8
|
+
- accounts
|
|
9
|
+
|
|
10
|
+
ARR:
|
|
11
|
+
status: defined
|
|
12
|
+
definition: >
|
|
13
|
+
Annual Recurring Revenue. MRR * 12. Not stored directly — calculate from
|
|
14
|
+
accounts.monthly_value.
|
|
15
|
+
tables:
|
|
16
|
+
- accounts
|
|
17
|
+
|
|
18
|
+
ARPA:
|
|
19
|
+
status: defined
|
|
20
|
+
definition: >
|
|
21
|
+
Average Revenue Per Account. Total MRR divided by active account count.
|
|
22
|
+
Use AVG(monthly_value) on active accounts.
|
|
23
|
+
tables:
|
|
24
|
+
- accounts
|
|
25
|
+
|
|
26
|
+
churn:
|
|
27
|
+
status: defined
|
|
28
|
+
definition: >
|
|
29
|
+
An account with status = 'Churned'. Churned accounts have monthly_value = 0
|
|
30
|
+
and typically have a contract_end date set.
|
|
31
|
+
tables:
|
|
32
|
+
- accounts
|
|
33
|
+
|
|
34
|
+
plan:
|
|
35
|
+
status: defined
|
|
36
|
+
definition: >
|
|
37
|
+
Subscription tier. Four levels: Free ($0), Starter (~$49-89/mo),
|
|
38
|
+
Pro (~$299-500/mo), Enterprise (~$5,000-15,000/mo).
|
|
39
|
+
tables:
|
|
40
|
+
- accounts
|
|
41
|
+
|
|
42
|
+
status:
|
|
43
|
+
status: ambiguous
|
|
44
|
+
note: >
|
|
45
|
+
"status" appears on accounts only, but could be confused with general
|
|
46
|
+
state. Always refers to subscription status: Active, Inactive,
|
|
47
|
+
Suspended, or Churned.
|
|
48
|
+
possible_mappings:
|
|
49
|
+
- accounts.status
|
|
50
|
+
|
|
51
|
+
name:
|
|
52
|
+
status: ambiguous
|
|
53
|
+
note: >
|
|
54
|
+
"name" appears in both companies and people. ASK the user which
|
|
55
|
+
entity they mean — company name or person name.
|
|
56
|
+
possible_mappings:
|
|
57
|
+
- companies.name
|
|
58
|
+
- people.name
|
|
59
|
+
|
|
60
|
+
company:
|
|
61
|
+
status: defined
|
|
62
|
+
definition: >
|
|
63
|
+
Refers to the companies entity (our customers). Linked from accounts
|
|
64
|
+
and people via company_id -> companies.id.
|
|
65
|
+
tables:
|
|
66
|
+
- companies
|
|
67
|
+
- accounts
|
|
68
|
+
- people
|
|
69
|
+
|
|
70
|
+
industry:
|
|
71
|
+
status: defined
|
|
72
|
+
definition: >
|
|
73
|
+
Business sector of a customer company. Values: Education, Energy,
|
|
74
|
+
Finance, Healthcare, Manufacturing, Media, Retail, Technology.
|
|
75
|
+
tables:
|
|
76
|
+
- companies
|
|
77
|
+
|
|
78
|
+
country:
|
|
79
|
+
status: defined
|
|
80
|
+
definition: >
|
|
81
|
+
ISO 2-letter country code for company HQ location. Values: AU, BR,
|
|
82
|
+
CA, DE, FR, IN, JP, SG, UK, US.
|
|
83
|
+
tables:
|
|
84
|
+
- companies
|
|
85
|
+
|
|
86
|
+
department:
|
|
87
|
+
status: defined
|
|
88
|
+
definition: >
|
|
89
|
+
Functional department of a contact. Values: Engineering, Finance,
|
|
90
|
+
Marketing, Operations, Product, Sales.
|
|
91
|
+
tables:
|
|
92
|
+
- people
|
|
93
|
+
|
|
94
|
+
seniority:
|
|
95
|
+
status: defined
|
|
96
|
+
definition: >
|
|
97
|
+
Career level of a contact. Values: Executive, Senior, Mid, Junior.
|
|
98
|
+
tables:
|
|
99
|
+
- people
|
|
100
|
+
|
|
101
|
+
revenue:
|
|
102
|
+
status: ambiguous
|
|
103
|
+
note: >
|
|
104
|
+
Could mean company revenue (companies.revenue — annual total revenue
|
|
105
|
+
of the customer) or account revenue (accounts.monthly_value — our MRR
|
|
106
|
+
from that account). Clarify which is meant.
|
|
107
|
+
possible_mappings:
|
|
108
|
+
- companies.revenue
|
|
109
|
+
- accounts.monthly_value
|
|
110
|
+
|
|
111
|
+
contract:
|
|
112
|
+
status: defined
|
|
113
|
+
definition: >
|
|
114
|
+
Subscription agreement period. contract_start is when billing began;
|
|
115
|
+
contract_end is set when an account churns or is terminated.
|
|
116
|
+
NULL contract_end means the account is still under contract.
|
|
117
|
+
tables:
|
|
118
|
+
- accounts
|