mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(landing): repair Lighthouse-flagged CWV audits on production (#5605)
* fix(landing): repair Lighthouse-flagged CWV audits on production
Empirically verified against a live full Lighthouse run of www.sim.ai
(production, pre-fix) plus a local build of the exact deployed commit with
source maps temporarily enabled for root-causing. Distinguished genuinely
failing audits from passing ones already misread as broken.
- fetchPriority missing on every LCP hero image: `priority` generates a
preload <link> but Next does not auto-add fetchpriority=high to it -
confirmed via raw deployed HTML diff. Added explicit fetchPriority='high'
to all 5 priority Image usages (hero, enterprise, blog/library post +
index cards).
- valid-source-maps failing: production ships no source maps at all
(productionBrowserSourceMaps defaults false). Enabled it - safe here since
this repo's frontend is already fully open source, so no incremental
exposure versus Next's default.
- image-delivery-insight (55.8KB wasted): feature-integrate-ui.png's `sizes`
hint was a flat 1050px regardless of viewport, so mobile fetched the
1920w variant for a ~423px real render. Replaced with a responsive sizes
expression derived from the sibling backdrop image's own (already
correct) hint, scaled by the callout's documented 125% overhang.
- cache-insight (best-fixable portion): _next/static/* filenames are
content-hashed and immutable per deploy, but shared one cache rule with
unhashed /public assets, capping both at 1-day max-age. Split into two
rules - hashed assets now get 1-year immutable, unhashed assets keep the
shorter revalidating TTL. Verified via a real build + server that both
paths now return the correct distinct header.
Investigated and NOT changed (documented, not assumed):
- legacy-javascript-insight (14KB): traced via sourcemap to
next/dist/build/polyfills/polyfill-module.js - Next's own built-in
polyfill bundle, not our code or a dependency, and not exposed via any
next.config.ts option. No browserslist misconfiguration on our end (none
exists; Next already defaults to its modern target).
- forced-reflow-insight: even with source maps present locally, the
dominant cost (335-417ms) stayed [unattributed] by Chrome's own profiler,
and the small attributed slice was non-deterministic between our own
chunk and a third-party script (HubSpot analytics) across runs - not a
confident single root cause worth a targeted fix.
- render-blocking-insight / network-dependency-tree / bf-cache: bf-cache's
actual failure reason is Cache-Control: no-store on the main document -
the exact root cause already fixed on staging (PR #5522/#5528, the
PublicEnvScript/unstable_noStore fix) but not yet promoted to main/prod.
Resolves once that ships, not additional work here.
* fix(landing): convert mothership cover from PNG to JPEG (/blog LCP 6.6s -> 2.8s)
Ran a full Lighthouse sweep across every public page as requested. /blog
scored 73 (LCP 6.6s) while every other page scored 95+ - reproduced
consistently across 3 runs, not noise. Traced via lcp-breakdown-insight:
the LCP image (mothership/cover.png, 241KB even after the earlier palette
compression pass) took 6+ seconds to download on simulated mobile
throttling, well beyond what its size should cost.
PNG is a poor fit for this illustration's subtle gradients versus JPEG's
lossy compression. Verified empirically before converting: same 1920x1080
resolution, visually identical (spot-checked), 241KB -> 65KB (73% smaller).
No other cover in the content set uses PNG and benefits the same way
(checked copilot/cover.png, the only other PNG cover - already optimal at
64KB, converting it yielded no improvement, left unchanged).
Verified fix: /blog score 73->93, LCP 6.6s->2.8s, reproduced across 3 runs.
* fix(landing): correct mobile sizes tier, drop non-functional cache rule
- integrations-callout: account for FeatureCard's max-lg:grid-cols-1 mobile
stack in the sizes hint, verified against Lighthouse's measured mobile
render width.
- next.config: remove a custom _next/static cache-control rule that never
actually fired (confirmed via header-marker test) - Next's own built-in
default already applies the correct immutable 1yr cache to that path.
* fix(landing): correct sizes underestimate + fix dead .map header rule
- integrations-callout: derive sizes from the section's actual grid math
(fixed 386px copy column, 40px gap, section gutters) instead of an
approximated vw fraction. Verified against a static reproduction of the
layout rendered at each Tailwind breakpoint - the old 110vw mobile tier
underestimated real render width by ~3% right at the 1023px stack
boundary, which could cause the browser to pick a too-small srcset
candidate and upscale.
- next.config: the .map header rule's trailing `$` was read as a literal
character by Next's path-to-regexp source matcher, not a regex anchor,
so the rule never matched a real .map URL (confirmed via routes-manifest
regex + a live header check). Removed the dead anchor and added a
bounded Cache-Control so a future decision to stop shipping source maps
isn't undermined by a 1yr immutable cache on already-fetched maps.
* fix(llms): serve well-formed llms.txt, remove Mothership + dead static files
Both the marketing site and docs site's llms.txt validator errors ("does
not appear to contain any links") traced to the same root cause: a static
public/llms.txt shadowed a better-written, already-existing dynamic
app/llms.txt route, and every "link" in the static files (and in the
docs app's auto-generated route) was bare `label: url` text, not Markdown
link syntax - so a strict Markdown-link parser found zero matches even
though URLs were visibly present.
- apps/sim: delete public/llms.txt (dead code, shadowing the properly
Markdown-linked app/llms.txt route.ts, confirmed via production headers
showing the static file was what actually served). Fix llms-full.txt's
Links/Support/Legal sections to use [label](url) syntax, correct a
stale "Next.js 15" reference, and replace "Mothership" with "Chat" per
the constitution's language rules.
- apps/docs: same shadowing issue - delete the orphaned public/llms.txt
(also still said "Mothership"). Fix the auto-generated per-page link
list in app/llms.txt/route.ts to emit [title](url) instead of
"title: url" for every documentation page.
* fix(llms): actually include the route.ts fixes from the prior commit
The prior commit (3b2d35c99) only staged the two deleted public/llms.txt
files - these two modified route.ts files (the Mothership/link-format
fixes they were meant to accompany) were left unstaged. No new changes,
just completing that commit's intent.
This commit is contained in:
@@ -44,7 +44,7 @@ Sim is the open-source AI workspace where teams build, deploy, and manage AI age
|
||||
|
||||
## Documentation Overview
|
||||
|
||||
This file provides an overview of our documentation. For full content of all pages, see ${baseUrl}/llms-full.txt
|
||||
This file provides an overview of our documentation. For full content of all pages, see [llms-full.txt](${baseUrl}/llms-full.txt).
|
||||
|
||||
## Main Sections
|
||||
|
||||
@@ -54,16 +54,16 @@ ${Object.entries(sections)
|
||||
.split('-')
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ')
|
||||
return `### ${sectionTitle}\n\n${items.map((item) => `- ${item.title}: ${item.url}${item.description ? `\n ${item.description}` : ''}`).join('\n')}`
|
||||
return `### ${sectionTitle}\n\n${items.map((item) => `- [${item.title}](${item.url})${item.description ? `\n ${item.description}` : ''}`).join('\n')}`
|
||||
})
|
||||
.join('\n\n')}
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- Full documentation content: ${baseUrl}/llms-full.txt
|
||||
- [Full documentation content](${baseUrl}/llms-full.txt)
|
||||
- Individual page content: ${baseUrl}/llms.mdx/[page-path]
|
||||
- API documentation: ${baseUrl}/api-reference/
|
||||
- Tool integrations: ${baseUrl}/tools/
|
||||
- [API documentation](${baseUrl}/api-reference/)
|
||||
- [Tool integrations](${baseUrl}/tools/)
|
||||
|
||||
## Statistics
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
# Sim Documentation
|
||||
|
||||
Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Create agents visually with the workflow builder, conversationally through Mothership, or programmatically with the API — connected to 1,000+ integrations and every major LLM.
|
||||
|
||||
## What is Sim?
|
||||
|
||||
Sim provides a complete AI workspace including:
|
||||
- Mothership — natural language agent creation and workspace management
|
||||
- Visual workflow builder with drag-and-drop interface
|
||||
- 1,000+ built-in integrations (OpenAI, Anthropic, Slack, Gmail, GitHub, etc.)
|
||||
- Knowledge bases for retrieval-augmented generation
|
||||
- Built-in tables for structured data
|
||||
- Real-time team collaboration
|
||||
- Multiple deployment options (cloud-hosted or self-hosted)
|
||||
- Custom integrations via MCP protocol
|
||||
|
||||
## Main Documentation Sections
|
||||
|
||||
Here are the key areas covered in our documentation:
|
||||
|
||||
/introduction - Getting started with Sim AI workspace
|
||||
/getting-started - Quick start guide for building your first agent
|
||||
/blocks - Understanding blocks (AI agents, APIs, functions)
|
||||
/tools - 1,000+ integrations and tools
|
||||
/webhooks - Webhook triggers and handling
|
||||
/mcp - Custom integrations via MCP protocol
|
||||
/deployment - Cloud-hosted vs self-hosted deployment
|
||||
/permissions - Team collaboration and workspace management
|
||||
/collaboration - Real-time editing and team features
|
||||
/workflows - Building agent logic with the visual builder
|
||||
|
||||
## Technical Information
|
||||
|
||||
- Framework: Fumadocs (Next.js-based documentation platform)
|
||||
- Content: MDX files with interactive examples
|
||||
- Languages: English (primary), Spanish, French, German, Japanese, Chinese
|
||||
- Search: AI-powered search and assistance available
|
||||
|
||||
## Complete Documentation
|
||||
|
||||
For the full documentation with all pages, examples, and interactive features, visit our documentation site. We also provide machine-readable versions at /llms.txt (full content) for AI systems.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- GitHub repository with agent examples
|
||||
- Discord community for support and discussions
|
||||
- 1,000+ built-in integrations with detailed guides
|
||||
- MCP protocol documentation for custom integrations
|
||||
- Self-hosting guides and Docker deployment
|
||||
|
||||
For the complete documentation visit https://docs.sim.ai
|
||||
@@ -96,6 +96,7 @@ export function ContentIndexPage({
|
||||
sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw'
|
||||
className='object-cover'
|
||||
priority={index < 3}
|
||||
fetchPriority={index === 0 ? 'high' : undefined}
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -52,6 +52,7 @@ export function ContentPostPage({
|
||||
className='h-auto w-full'
|
||||
sizes='(max-width: 768px) 100vw, 450px'
|
||||
priority
|
||||
fetchPriority='high'
|
||||
itemProp='image'
|
||||
unoptimized
|
||||
/>
|
||||
|
||||
+13
-1
@@ -17,6 +17,18 @@ import { CalloutFrame } from '@/app/(landing)/components/features/components/cal
|
||||
* the right AND bottom edges bleed past the media stage's clip - a zoomed-in
|
||||
* peek at part of the product rather than a complete miniature, scaling
|
||||
* proportionally with the aspect-locked stage. Decorative.
|
||||
*
|
||||
* `sizes` is derived directly from the section's grid math rather than
|
||||
* approximated, then rounded up to the worst-case (peak render/viewport
|
||||
* ratio) in each tier so the browser never under-fetches:
|
||||
* `callout = 1.25 * (viewport - 2*gutter - 32px card padding - [40px gap +
|
||||
* 386px fixed copy column, desktop only])`, gutter = `px-20`/`max-lg:px-8`/
|
||||
* `max-sm:px-5` from `Features`'s grid, matching `FeatureCard`'s
|
||||
* `max-lg:grid-cols-1` stack. Peak ratios (verified against a static
|
||||
* reproduction of this exact layout rendered at each Tailwind breakpoint):
|
||||
* ~113.3% at the `max-width: 1023px` stacked tier's own upper edge, ~108.6%
|
||||
* at `1460px` (the container's cap, where render width stops growing with
|
||||
* viewport - hence the final tier is a flat px value, not a vw fraction).
|
||||
*/
|
||||
export function IntegrationsCallout() {
|
||||
return (
|
||||
@@ -29,7 +41,7 @@ export function IntegrationsCallout() {
|
||||
src='/landing/feature-integrate-ui.png'
|
||||
alt=''
|
||||
fill
|
||||
sizes='1050px'
|
||||
sizes='(max-width: 1023px) 114vw, (max-width: 1460px) 109vw, 1053px'
|
||||
className='object-cover'
|
||||
/>
|
||||
</CalloutFrame>
|
||||
|
||||
@@ -102,6 +102,7 @@ export function Hero() {
|
||||
alt=''
|
||||
fill
|
||||
priority
|
||||
fetchPriority='high'
|
||||
quality={90}
|
||||
sizes='(max-width: 1460px) 100vw, 1300px'
|
||||
className='object-cover'
|
||||
|
||||
@@ -66,6 +66,7 @@ const ENTERPRISE_CONFIG: SolutionsPageConfig = {
|
||||
<Image
|
||||
fill
|
||||
priority
|
||||
fetchPriority='high'
|
||||
alt=''
|
||||
className='object-cover object-center'
|
||||
sizes='(max-width: 1024px) 100vw, 1300px'
|
||||
|
||||
@@ -9,7 +9,7 @@ export function GET() {
|
||||
|
||||
## Overview
|
||||
|
||||
Sim is the AI workspace where teams create agents visually with the workflow builder, conversationally through Mothership, or programmatically with the API. Over 100,000 builders use Sim — from startups to Fortune 500 companies. Teams connect their tools and data, build agents that automate real work across systems, and manage them with full observability. SOC2 compliant.
|
||||
Sim is the AI workspace where teams create agents visually with the workflow builder, conversationally through Chat, or programmatically with the API. Over 100,000 builders use Sim — from startups to Fortune 500 companies. Teams connect their tools and data, build agents that automate real work across systems, and manage them with full observability. SOC2 compliant.
|
||||
|
||||
## Product Details
|
||||
|
||||
@@ -122,7 +122,7 @@ Built-in table creation and management:
|
||||
## Technical Architecture
|
||||
|
||||
### Frontend
|
||||
- Next.js 15 with App Router
|
||||
- Next.js 16 with App Router
|
||||
- React Flow for the visual builder
|
||||
- Tailwind CSS for styling
|
||||
- Zustand for state management
|
||||
@@ -150,26 +150,26 @@ Built-in table creation and management:
|
||||
|
||||
## Links
|
||||
|
||||
- **Website**: ${baseUrl}
|
||||
- **Documentation**: https://docs.sim.ai
|
||||
- **API Reference**: https://docs.sim.ai/api
|
||||
- **GitHub**: https://github.com/simstudioai/sim
|
||||
- **Discord**: https://discord.gg/Hr4UWYEcTT
|
||||
- **X/Twitter**: https://x.com/simdotai
|
||||
- **LinkedIn**: https://linkedin.com/company/simstudioai
|
||||
- [Website](${baseUrl}): Product overview and primary entry point
|
||||
- [Documentation](https://docs.sim.ai): Product guides and technical reference
|
||||
- [API Reference](https://docs.sim.ai/api): API documentation
|
||||
- [GitHub](https://github.com/simstudioai/sim): Open-source codebase
|
||||
- [Discord](https://discord.gg/Hr4UWYEcTT): Community server
|
||||
- [X/Twitter](https://x.com/simdotai): Announcements and updates
|
||||
- [LinkedIn](https://linkedin.com/company/simstudioai): Company page
|
||||
|
||||
## Support
|
||||
|
||||
- **Email**: help@sim.ai
|
||||
- **Security Issues**: security@sim.ai
|
||||
- **Documentation**: https://docs.sim.ai
|
||||
- **Community Discord**: https://discord.gg/Hr4UWYEcTT
|
||||
- [Documentation](https://docs.sim.ai): Self-serve guides and reference
|
||||
- [Community Discord](https://discord.gg/Hr4UWYEcTT): Community support
|
||||
- Email: help@sim.ai
|
||||
- Security issues: security@sim.ai
|
||||
|
||||
## Legal
|
||||
|
||||
- **Terms of Service**: ${baseUrl}/terms
|
||||
- **Privacy Policy**: ${baseUrl}/privacy
|
||||
- **Security**: ${baseUrl}/.well-known/security.txt
|
||||
- [Terms of Service](${baseUrl}/terms): Legal terms
|
||||
- [Privacy Policy](${baseUrl}/privacy): Data handling practices
|
||||
- [Security](${baseUrl}/.well-known/security.txt): Vulnerability disclosure policy
|
||||
`
|
||||
|
||||
return new Response(llmsFullContent, {
|
||||
|
||||
@@ -8,7 +8,7 @@ authors:
|
||||
- emir
|
||||
readingTime: 10
|
||||
tags: [Release, Mothership, Tables, Knowledge Base, Connectors, RAG, Sim]
|
||||
ogImage: /blog/mothership/cover.png
|
||||
ogImage: /blog/mothership/cover.jpg
|
||||
ogAlt: 'Introducing Mothership airship illustration'
|
||||
about: ['AI Agents', 'Workflow Automation', 'Developer Tools']
|
||||
timeRequired: PT10M
|
||||
|
||||
+26
-3
@@ -29,6 +29,10 @@ const minimalRegistryAlias: Record<string, string> = useMinimalRegistry
|
||||
const nextConfig: NextConfig = {
|
||||
devIndicators: false,
|
||||
poweredByHeader: false,
|
||||
// Safe here since this repo's source is already fully public on GitHub -
|
||||
// no additional exposure versus Next's default (disabled to avoid leaking
|
||||
// source on the client).
|
||||
productionBrowserSourceMaps: true,
|
||||
turbopack: {
|
||||
root: path.join(import.meta.dirname, '../..'),
|
||||
resolveAlias: minimalRegistryAlias,
|
||||
@@ -188,7 +192,11 @@ const nextConfig: NextConfig = {
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/((?!api/).*\\.(?:svg|jpg|jpeg|png|gif|ico|webp|avif|woff|woff2|ttf|eot))',
|
||||
// `/public`-served assets keep their path across deploys (no content
|
||||
// hash), so a shorter TTL + revalidation window bounds how long a
|
||||
// changed asset can serve stale.
|
||||
source:
|
||||
'/((?!api/|_next/static/).*\\.(?:svg|jpg|jpeg|png|gif|ico|webp|avif|woff|woff2|ttf|eot))',
|
||||
headers: [
|
||||
{
|
||||
key: 'Cache-Control',
|
||||
@@ -245,14 +253,29 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
],
|
||||
},
|
||||
// Block access to sourcemap files (defense in depth)
|
||||
// Block access to sourcemap files (defense in depth). The trailing
|
||||
// `$` this rule previously ended with is not a regex anchor in Next's
|
||||
// `source` matcher (path-to-regexp syntax, not raw regex) - it matched
|
||||
// a literal `$` character, so this rule never actually fired against
|
||||
// real `.map` URLs. Next already anchors the compiled pattern at both
|
||||
// ends, so no trailing anchor is needed here.
|
||||
//
|
||||
// Also bounds `.map` files to a short, revalidated TTL rather than
|
||||
// Next's built-in 1yr immutable default for `_next/static/*` - maps
|
||||
// are content-hashed like their JS, so this isn't about staleness,
|
||||
// it's so a future decision to stop shipping `productionBrowserSourceMaps`
|
||||
// isn't undermined by browsers/edges holding old maps for a year.
|
||||
{
|
||||
source: '/(.*)\\.map$',
|
||||
source: '/(.*)\\.map',
|
||||
headers: [
|
||||
{
|
||||
key: 'x-robots-tag',
|
||||
value: 'noindex',
|
||||
},
|
||||
{
|
||||
key: 'Cache-Control',
|
||||
value: 'public, max-age=86400, stale-while-revalidate=604800',
|
||||
},
|
||||
],
|
||||
},
|
||||
// Chat pages - allow iframe embedding from any origin
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 241 KiB |
@@ -1,59 +0,0 @@
|
||||
# Sim
|
||||
|
||||
Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Create agents visually with the workflow builder, conversationally through Chat, or programmatically with the API — connected to 1,000+ integrations and every major LLM.
|
||||
|
||||
## Key Facts
|
||||
|
||||
- Website: https://sim.ai
|
||||
- GitHub: https://github.com/simstudioai/sim
|
||||
- Documentation: https://docs.sim.ai
|
||||
- License: Apache 2.0
|
||||
- Category: AI workspace, AI agent builder, developer tools
|
||||
- Trusted by: 100,000+ builders, from startups to Fortune 500
|
||||
|
||||
## What Sim Does
|
||||
|
||||
Sim is a unified AI workspace with these core modules:
|
||||
|
||||
- **Mothership** — AI command center. Build and manage everything in natural language.
|
||||
- **Workflows** — Visual builder. Connect blocks, models, and integrations into agent logic.
|
||||
- **Knowledge Base** — Upload docs, sync sources, build vector databases for agent memory.
|
||||
- **Tables** — Built-in database. Store, query, and wire structured data into agent runs.
|
||||
- **Files** — Upload, create, and share documents across your team and agents.
|
||||
- **Logs** — Full execution tracing. Inputs, outputs, cost, and duration for every run.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- 1,000+ integrations (Slack, Gmail, GitHub, Notion, Jira, Salesforce, HubSpot, and more)
|
||||
- Every major LLM: OpenAI, Anthropic, Google Gemini, xAI Grok, Mistral, Groq, Cerebras
|
||||
- Real-time team collaboration with multiplayer editing
|
||||
- Enterprise governance: RBAC, staging/production environments, deployment versioning, audit logs
|
||||
- Self-hosting via Docker, bring-your-own-key (BYOK) for all model providers
|
||||
- API, CLI, and SDK access (TypeScript, Python)
|
||||
- MCP (Model Context Protocol) server creation and connection
|
||||
- SOC2 compliant
|
||||
|
||||
## Key Pages
|
||||
|
||||
- AI Models Directory: https://sim.ai/models
|
||||
- Integrations: https://sim.ai/integrations
|
||||
- Pricing: https://sim.ai/#pricing
|
||||
- Partners: https://sim.ai/partners
|
||||
|
||||
## Blog
|
||||
|
||||
The Sim blog covers announcements, technical deep-dives, and guides for building AI agents.
|
||||
|
||||
- Blog: https://sim.ai/blog
|
||||
- RSS: https://sim.ai/blog/rss.xml
|
||||
|
||||
## Documentation
|
||||
|
||||
- Getting Started: https://docs.sim.ai/getting-started
|
||||
- Blocks: https://docs.sim.ai/workflows
|
||||
- Tools & Integrations: https://docs.sim.ai/integrations
|
||||
- Webhooks: https://docs.sim.ai/workflows/triggers/webhook
|
||||
- MCP Protocol: https://docs.sim.ai/agents/mcp
|
||||
- Self-Hosting: https://docs.sim.ai/platform/self-hosting
|
||||
- API Reference: https://docs.sim.ai/api-reference/getting-started
|
||||
- SDKs: https://docs.sim.ai/api-reference
|
||||
Reference in New Issue
Block a user