-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(blog): created first page #1550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR introduces the first blog post page for the Sim platform, creating infrastructure for content marketing by comparing Sim with competitor workflow automation platforms like n8n and OpenAI. The changes establish a new `/building` section under the landing page structure, specifically creating a blog post at `/building/openai-vs-n8n-vs-sim/` that compares these three platforms for building AI agent workflows.The implementation follows Next.js App Router conventions with proper separation of concerns: a dedicated layout component for the building section, a page component for routing and metadata, and a separate content component for the actual blog post. The blog post uses responsive Tailwind CSS styling and follows modern web design patterns, including proper semantic HTML structure and accessibility considerations. The content is currently placeholder text that will be filled with actual comparative analysis.
Additionally, the PR includes a minor update to the GitHub star count display in the navigation component, changing the placeholder value from '15.4k' to '16.3k' to better reflect current repository metrics.
PR Description Notes:
- The PR description is incomplete - it contains only template placeholders without actual content describing what was implemented
- No issue number is referenced despite the template suggesting one should be included
- The Type of Change checkboxes are not filled out
- Testing information is missing
- The checklist items are not completed
Important Files Changed
Changed Files
| Filename | Score | Overview |
|---|---|---|
| apps/sim/app/(landing)/components/nav/nav.tsx | 5/5 | Updated GitHub star count placeholder from '15.4k' to '16.3k' |
| apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/page.tsx | 3/5 | Created new blog post page with metadata and routing for OpenAI vs n8n vs Sim comparison |
| apps/sim/lib/environment.ts | 1/5 | Hardcoded all environment detection constants to production values, bypassing environment variable detection |
| apps/sim/app/(landing)/building/layout.tsx | 4/5 | Added layout component for building section with consistent navigation |
| apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/openai-n8n-sim.tsx | 4/5 | Created responsive blog post component with placeholder content for workflow platform comparison |
Confidence score: 2/5
- This PR contains a critical issue that could cause production behaviors in all environments due to hardcoded environment constants
- Score severely impacted by the dangerous environment.ts changes that force production-level billing and cost multipliers across all environments
- Pay immediate attention to apps/sim/lib/environment.ts which needs to be reverted or properly implemented with environment variable detection
5 files reviewed, 3 comments
| import OpenAiN8nSim from './openai-n8n-sim' | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: 'Building with n8n vs Sim: A Comparison | Sim', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Title mentions only 'n8n vs Sim' but the file path includes 'openai'. Consider updating the title to match the URL path or vice versa for consistency.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/page.tsx
Line: 5:5
Comment:
**style:** Title mentions only 'n8n vs Sim' but the file path includes 'openai'. Consider updating the title to match the URL path or vice versa for consistency.
How can I resolve this? If you propose a fix, please make it concise.| } | ||
|
|
||
| /** | ||
| * Blog post page comparing n8n and Sim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Comment mentions 'comparing n8n and Sim' but the component name and content also reference OpenAI. Ensure consistency across naming and descriptions.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/page.tsx
Line: 18:18
Comment:
**style:** Comment mentions 'comparing n8n and Sim' but the component name and content also reference OpenAI. Ensure consistency across naming and descriptions.
How can I resolve this? If you propose a fix, please make it concise.
apps/sim/lib/environment.ts
Outdated
| export const isProd = true | ||
|
|
||
| /** | ||
| * Is the application running in development mode | ||
| */ | ||
| export const isDev = env.NODE_ENV === 'development' | ||
| export const isDev = false | ||
|
|
||
| /** | ||
| * Is the application running in test mode | ||
| */ | ||
| export const isTest = env.NODE_ENV === 'test' | ||
| export const isTest = false | ||
|
|
||
| /** | ||
| * Is this the hosted version of the application | ||
| */ | ||
| export const isHosted = | ||
| getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' || | ||
| getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai' | ||
| export const isHosted = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Hardcoding environment constants is dangerous. This forces production behavior (including billing, cost multipliers) in all environments, potentially causing unexpected charges in development/testing.
| export const isProd = true | |
| /** | |
| * Is the application running in development mode | |
| */ | |
| export const isDev = env.NODE_ENV === 'development' | |
| export const isDev = false | |
| /** | |
| * Is the application running in test mode | |
| */ | |
| export const isTest = env.NODE_ENV === 'test' | |
| export const isTest = false | |
| /** | |
| * Is this the hosted version of the application | |
| */ | |
| export const isHosted = | |
| getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' || | |
| getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai' | |
| export const isHosted = true | |
| export const isProd = env.NODE_ENV === 'production' | |
| /** | |
| * Is the application running in development mode | |
| */ | |
| export const isDev = env.NODE_ENV === 'development' | |
| /** | |
| * Is the application running in test mode | |
| */ | |
| export const isTest = env.NODE_ENV === 'test' | |
| /** | |
| * Is this the hosted version of the application | |
| */ | |
| export const isHosted = env.NEXT_PUBLIC_APP_URL === 'https://www.sim.ai' || env.NEXT_PUBLIC_APP_URL === 'https://www.staging.sim.ai' |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/lib/environment.ts
Line: 9:24
Comment:
**logic:** Hardcoding environment constants is dangerous. This forces production behavior (including billing, cost multipliers) in all environments, potentially causing unexpected charges in development/testing.
```suggestion
export const isProd = env.NODE_ENV === 'production'
/**
* Is the application running in development mode
*/
export const isDev = env.NODE_ENV === 'development'
/**
* Is the application running in test mode
*/
export const isTest = env.NODE_ENV === 'test'
/**
* Is this the hosted version of the application
*/
export const isHosted = env.NEXT_PUBLIC_APP_URL === 'https://www.sim.ai' || env.NEXT_PUBLIC_APP_URL === 'https://www.staging.sim.ai'
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
Created first blog post.
Type of Change
Checklist