The IDE playground
Start from a template, an example or a GitHub repo, and use the IDE panes.
The playground has one page per language: JavaScript, which also has a field for cloning a GitHub repo, and Java. Use the switcher at the top of either page to move between them. When you pick a starting point, BrowserCode installs dependencies, starts the dev server and shows the result. The commands it runs are listed in the terminal's Output tab.
The two languages use different runtimes, so each has its own page: Running JavaScript projects and Running Java projects. Support for Rust and Python is planned.
Starting a project
- A JavaScript template: Vite on its own or with React, Svelte or Vue, plus Next.js, Nuxt and Express.
- A Java example, from Hello World to Swing programs such as the Mandelbrot explorer, algorithm demos and examples of records and streams.
- A public GitHub repo. Paste its URL into the clone field on the JavaScript page, or select Clone from GitHub under the IDE entry in the sidebar.
Panes
- Files and Search browse and search the project.
- Editor is Monaco, the editor used in VS Code. Themes are in the settings menu. Edits are saved as you type.
- Terminal opens on an Output tab that lists the commands BrowserCode ran to boot your project. In JavaScript projects you can open more tabs, each with its own shell. In Java projects the terminal handles the program's input and output.
- Preview shows your running app. In Java projects it is replaced by the Display, where Swing windows are drawn.
In a narrow window the panes become tabs. A tab shows an indicator when its content changes while it is hidden.
Exporting your work
Projects are stored in your browser, so export anything you want to keep. To download the whole project as a zip, use the download button in the Files pane header. To download a single file, use its menu in the file tree.
The zip contains the files shown in the file tree. Files you create from the terminal are not included, so copy them out from the shell.
Share creates a link that contains the whole project. The files are encoded in the URL, so nothing is stored on a server and the link works for anyone you send it to. Lockfiles are left out and images are included as empty files, to keep the URL short.
Embed generates an iframe snippet for the open project, with a preview of the result. See Embedding BrowserCode. To send someone a URL instead, see Linking to BrowserCode.