onlook
onlook copied to clipboard
[feat] Add alternate sandbox provider
Describe the feature
Add adapter and alternative sandbox provider to CodeSandbox, such as a local running server, E2B or Daytona
@Kitenite can you give more context about it ?
i can try to add E2B as alternative to sandbox, can you assign it to me @Kitenite @drfarrell
Go ahead @aditya162002 ! Daytona could be a good option too
hey @aditya162002 are you working on this?
yes @IkramBagban !!
hey @Kitenite , i have almost implemented daytona as an alternative sandbox provider, but i am stuck on one thing, can you please help me out??
the app keeps using CodeSandbox even though I set the Daytona API key. The issue is that the frontend can't see the server environment variables, so it falls back to CodeSandbox by default.
We have a few options to fix this:
1)Make the Daytona key visible to the frontend
2)Move the provider choice to the backend
i think when we do
"backend:start": "bun --filter @onlook/backend start",, i get data from supabase right, can you provide me some insights to help me??
I think we would need to handle that as a different provider on setup. So we'd need to route the changes based on the provider we're using. Perhaps abstract the sandboxManager into an adapter pattern that can be switched between providers.
hey @Kitenite below is the pr, for adding daytona as an alternative provider with also test cases fixed, things got delayed because i was trying to understand the codebase, i think i am yet to learn much :),and made sure that orginal logic shouldn't hinder!Please review
@Kitenite @drfarrell did you have the time to check this?