Saarthi-AI repl_setup
Setup and configure web applications in the Replit environment. Covers host configuration, frontend/backend connectivity, cache control, and framework-specific setup for Angular, React, Vite, and Vue.
git clone https://github.com/SAARTHII-AI/Saarthi-AI
T=$(mktemp -d) && git clone --depth=1 https://github.com/SAARTHII-AI/Saarthi-AI "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.local/skills/repl_setup" ~/.claude/skills/saarthii-ai-saarthi-ai-repl-setup && rm -rf "$T"
.local/skills/repl_setup/SKILL.mdRepl Setup
Guidelines for setting up and configuring web applications to work correctly in the Replit environment. Users see your application through a proxy (iframe), which requires specific configuration.
When to Use
Use this skill when:
- Setting up a new web application or frontend framework
- The user cannot see your frontend changes
- Configuring host settings for development servers
- Connecting frontend code to backend APIs
- Debugging visibility issues with the user's preview
When NOT to Use
- For non-web applications (CLI tools, scripts, etc.)
- When the application is already working correctly
- For deployment/publishing issues (use the deployment skill)
Critical Replit Environment Rules
Host Configuration
The user sees your frontend through a proxy within an iframe. You must configure your development server to allow all hosts, otherwise the user will never see your frontend.
Every web framework needs its development configuration set to allow all hosts. If you don't know the specific configuration for a framework, use web search to find it.
Frontend Server Port
Bind frontend servers to 0.0.0.0:5000. Never bind anything else to port 5000.
No Docker or Virtual Environments
Never use Docker, virtual environments, or containerization. Replit uses a Nix environment that doesn't support nested virtualization.
Stack-Specific Setup
For framework-specific configuration, refer to these guides:
- Angular setup with allowedHosts and CLI flagsreferences/angular.md
- React and Vite configurationreferences/react_vite.md
- Vue.js setupreferences/vue.md
Frontend-Backend Connectivity
When your frontend calls a local backend API:
- Get the public domain: Run
in the shell to get the website's public URLenv | grep DOMAIN - Use the public URL: Replace any
references with the public domainlocalhost - Never use localhost: You're in a cloud environment - the user cannot access your localhost
# Get the public domain for API calls env | grep DOMAIN
Debugging Visibility Issues
If the user reports they cannot see your changes:
- Check workflow status: Ensure the workflow is running and has been restarted after changes
- Read console logs: Check for errors and follow any instructions in the logs
- Verify host configuration: Confirm the framework's dev config allows all hosts (most common issue)
- Cache control (rare): If above checks pass, the issue may be caching
- Modify webserver code to disable cache storage
- Instruct user to use "empty cache and hard refresh" in developer tools
Workflow Setup Order
Always set up frontend workflows first, then backend services. After completing any task:
- Re-run the workflows to ensure they're running
- Read the console logs to verify no errors
- Take a screenshot to confirm the frontend is visible
Best Practices
- Verify host config early: Check framework-specific allowedHosts before writing any code
- Test visibility immediately: After setup, verify the user can see the preview
- Use public URLs: Never hardcode localhost in frontend code
- Restart after changes: Server-side changes require workflow restart
- Check logs first: Console logs often reveal the root cause of issues