This document describes Same.dev's standardized practices for web application development, including framework selection, tooling preferences, design standards, and deployment workflows. These guidelines ensure that generated applications are production-ready, browser-compatible, and optimized for Same.dev's cloud-based IDE environment.
For information about code editing and validation workflows in Same.dev, see Code Editing and Validation Workflow. For design system implementation details, see Design Standards and shadcn/ui Integration.
Same.dev enforces specific tooling choices to optimize compatibility with its Docker-based Ubuntu 22.04 LTS environment located at /home/project.
Mandatory: Use bun over npm for all package management operations. When the startup tool is used, bun is automatically installed. Similarly, use bunx over npx for package execution.
Rationale: Bun provides faster installation and execution times in the Same.dev environment.
Sources: Same.dev/Prompt.txt79 Same.dev/Prompt.txt244
| Framework | Use Case | Configuration Requirement |
|---|---|---|
| React with Vite | Single-page applications, component-heavy UIs | "dev": "vite --host 0.0.0.0" in package.json |
| Next.js | Server-side rendering, full-stack applications | "dev": "next dev -H 0.0.0.0" in package.json |
Critical: The --host 0.0.0.0 flag (or -H 0.0.0.0 for Next.js) is mandatory to expose the development server to the user through Same.dev's iframe preview system. This configuration is automatically applied when using the startup tool but must be manually added when initializing projects via terminal commands.
Sources: Same.dev/Prompt.txt78-80 Same.dev/Prompt.txt245
Sources: Same.dev/Prompt.txt78-80 Same.dev/Prompt.txt243-245 Same.dev/Prompt.txt52-60
All web applications must be compatible with loading in an iframe and work across all major browsers. This constraint affects API selection.
| Prohibited API | Required Alternative | Reason |
|---|---|---|
crypto.randomUUID() | Math.random() | crypto.randomUUID() is restricted in iframe context |
Example: When generating unique identifiers, use:
Sources: Same.dev/Prompt.txt86 Same.dev/Prompt.txt251
Same.dev mandates the use of shadcn/ui for component libraries but requires extensive customization to prevent generic-looking applications.
Installation Command: bunx shadcn@latest add -y -o
Note: The shadcn CLI has changed; this is the correct command format.
CRITICAL REQUIREMENT: Never use default shadcn/ui components. All components must be customized before building the main application to create unique designs.
Components are installed to components/ui/ directory with filenames following the pattern:
button.tsxinput.tsxcard.tsxdropdown.tsxdialog.tsxpopover.tsxtooltip.tsxalert.tsxavatar.tsxbadge.tsxbreadcrumb.tsxcalendar.tsxcheckbox.tsxcollapsible.tsxcombobox.tsxcommand.tsxcontext-menu.tsxdate-picker.tsxdropdown-menu.tsxform.tsxhover-card.tsxlabel.tsxmenubar.tsxnavigation-menu.tsxprogress.tsxradio-group.tsxscroll-area.tsxselect.tsxseparator.tsxsheet.tsxskeleton.tsxslider.tsxswitch.tsxtable.tsxtabs.tsxtextarea.tsxtoast.tsxtoggle.tsxuse-dialog.tsxuse-toast.tsxStrategy: Edit each of these files individually to create visual distinctiveness.
Sources: Same.dev/Prompt.txt99-100 Same.dev/Prompt.txt264-265
| Rule | Requirement |
|---|---|
| Emojis | NEVER use in web applications |
| Default Colors | Avoid purple, indigo, blue unless specified in prompt |
| Image Colors | Use color palette from attached images when provided |
| Responsive Design | MUST generate responsive designs |
Sources: Same.dev/Prompt.txt101-103 Same.dev/Prompt.txt266-268
Same.dev enforces the use of Vanilla Three.js over React Three Fiber for 3D graphics.
Required Setup:
[email protected] + @types/[email protected]import { OrbitControls } from 'three/addons/controls/OrbitControls.js'Prohibited: React Three Fiber
Rationale: Vanilla Three.js is a known working configuration in Same.dev's environment and provides better compatibility.
Sources: Same.dev/Prompt.txt81 Same.dev/Prompt.txt246
Same.dev provides multiple pathways for image acquisition and integration.
Preference: Use URL links for images directly in the project rather than downloading and storing files locally.
When users provide documentation URLs, use the web_scrape tool to read the page content before proceeding with implementation.
Sources: Same.dev/Prompt.txt83-85 Same.dev/Prompt.txt248-250
Same.dev provides a live preview system where users see their web application in an iframe on the right side of the screen.
suggestions toolSources: Same.dev/Prompt.txt88-95 Same.dev/Prompt.txt253-260
Same.dev automatically deploys projects after each version, defaulting to static site deployment.
Users who want to connect custom domains should:
Same.dev retains access to update the deployment even after users claim it.
Sources: Same.dev/Prompt.txt91-92 Same.dev/Prompt.txt256-257
Same.dev supports pixel-perfect website cloning with specific ethical and security constraints.
| Category | Prohibition | Reason |
|---|---|---|
| Ethical/Legal Content | NEVER clone sites with borderline ethical, legal, pornographic, or privacy concerns | Legal and moral compliance |
| Login Pages | NEVER clone login forms or authentication pages | Phishing prevention |
If a site requires authentication, request that users provide a screenshot after they log in.
Before writing any code for website cloning:
The web_scrape tool does not capture animation information. When cloning sites with animations:
Any URLs pointing to same-assets.com can be used directly in the project without downloading.
Attempt to implement all implied fullstack functionalities, not just the visual interface. This includes:
Sources: Same.dev/Prompt.txt116-127 Same.dev/Prompt.txt280-292
The complete Same.dev web development workflow follows this pattern:
| Phase | Actions | Tools/Commands |
|---|---|---|
| Initialization | Create project, install dependencies, configure dev script | startup tool, manual initialization with bunx |
| Setup | Create .same/ folder, start dev server | Directory creation, server launch |
| Component Customization | Install and customize shadcn/ui components | bunx shadcn@latest add -y -o, file editing |
| Development | Implement features, test in live preview | Code editing, run_linter tool |
| Versioning | Restart server, create version, analyze screenshot | Dev server restart, versioning tool |
| Deployment | Verify configuration, auto-deploy | Read netlify.toml, automatic deployment |
| Iteration | Gather user feedback, propose improvements | User interaction, suggestions tool |
This workflow emphasizes:
Sources: Same.dev/Prompt.txt78-95 Same.dev/Prompt.txt242-260
Refresh this wiki