onlook
onlook copied to clipboard
feat: daytona as an alternative provider
This PR adds support for both CodeSandbox and Daytona with a clean and flexible setup. It uses a simple adapter pattern so we can easily add more providers later without changing much code. All the important stuff, like API keys, stays safe on the server, and the client talks to it through a secure tRPC API. No matter which provider we use, the flow stays the same, making things easier to work with also test cases have been fixed too .Please review it, and let me know your feedback , i have refactored some code to do the same, thanks!!
[!IMPORTANT] Adds Daytona as an alternative provider to CodeSandbox using an adapter pattern, ensuring secure communication and consistent flow across providers.
- Behavior:
- Adds Daytona as an alternative provider to CodeSandbox using an adapter pattern.
- Secure communication via tRPC API; consistent flow across providers.
- Updates
sandboxRouterinsandbox.tsto handle Daytona.- Adapters and Providers:
- Introduces
CodeSandboxAdapterandServerSandboxAdapterinadapters.- Adds
DaytonaProviderandCodeSandboxProviderinproviders.- Implements
SandboxAdapterFactoryfor adapter management.- Session and File Management:
- Refactors
SessionManagerto support multiple providers.- Updates
SandboxManagerfor file operations and session handling.- Adds
getProviderType()inutils.tsfor provider selection.- Testing and Configuration:
- Updates tests in
sandbox.test.tsfor new provider logic.- Modifies
next.config.tsfor environment-specific configurations.- Adds dependencies in
package.jsonandbun.lock.This description was created by
for fdf8ca4bae7e9f66ce5519d42ef3e2ab77549eee. You can customize this summary. It will automatically update as commits are pushed.
Someone is attempting to deploy a commit to the Onlook Team on Vercel.
A member of the Team first needs to authorize it.
Fixes #2229
thanks @spartan-vutrannguyen for the feedback its really very helpful, i will try to reflect those changes asap!
Also looks like there's been a lot of conflicts popped up from some large changes in the codebase, could you also resolve the conflict by pulling from main?
@Kitenite @spartan-vutrannguyen did we change anything, the project is not able to run locally??i was testing daytona