3 comments

[ 3.2 ms ] story [ 16.0 ms ] thread
Hey HN! This is a project I’ve been working on for the past few months. With CodeSandbox I want to focus on a feature of React that, in my opinion, could be exploited much more, which is reusability. With CodeSandbox you can easily build and share a React project with anyone by just sharing the url, others can then fork it to make changes or download it (which includes the default `create-react-app` template).

The next thing I’m building for CodeSandbox is the real reusable part: it should be possible to publish any project you have on CodeSandbox to NPM with a single click and let others reuse it as much as they like. An example is that someone makes a button on CodeSandbox and publishes it, others can then use this button inside CodeSandbox or in any project out of CodeSandbox. Publishing is already done, I’m now working on UI so publishing and searching sandboxes becomes easier.

I’d love to hear any feedback or suggestions or problems you might have! I want to make CodeSandbox as friendly as possible.

Looks well done from my first glance. Can you talk about the stack used and any plans on open sourcing the code?
Thanks! I'm still thinking about open sourcing it. I'm also planning on writing a blog post on how things like NPM are implemented in this application.

For now a quick summary of what we use now:

1. Phoenix/Elixir for the API

2. Node for bundling NPM packages

3. Postgres for SQL

4. Redis for caching NPM package metadata

The editor itself is written in React (hah!) and uses styled-components, redux, redux-thunk and react-router@4.0.0 as most used libraries. I code split every optional preference a user may have (like autocomplete, vim or prettify) using webpack 2.

Everything is hosted on Vultr (20$ node).

I'd love to answer more if you have any questions.