Skip to content

anbraten/nano-web-ide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nano web IDE

Develop the web in the web. This project provides a runtime to run Node.js projects completely in the browser by mocking internals like process. In addition it includes a shell written in javascript to run commands like ls or cd and a playground to test those features.

🚀 Features

  • Webcontainer compatible api

  • Virtual File system

  • Process management

    • fork / clone processes
    • pid management
    • /proc file system
    • get process exit code
    • node.js compatible process object
  • Shell Environment

    • a shell written in javascript
    • supports: ls, cat, echo, touch, rm, cd, cp, mv, pwd, env, exit, true, false, history, clear, xdg-open, wget, unzip
    • auto-completion for commands, aliases & paths
    • execute commands in PATH
  • Networking

    • service worker to intercept requests
  • Playground

    • file explorer
    • file editor
    • terminals to run commands

📦 Project Structure

.
├── packages
│   ├── core # webcontainer runtime
│   │   └── src
│   │       └── shell # shell environment
│   │           └── commands # shell commands
│   └── playground
│       ├── public # public files
│       └── src
│           ├── assets # static assets
│           ├── components # vue components
│           └── compositions # vue compositions
└── testing
    └── busybox # emscripten compiled busybox

🛠️ Development

# install dependencies
bun install

# start dev server
bun dev

# visit http://localhost:5173

TODO

  • networking
    • add service worker to intercept requests
    • clean way to initialize service worker first time (load files somehow)
    • polyfill node:net and node:http modules
    • tcp/ip stack using sth like (IwIP)
    • support http requests
    • support websockets
  • process management
    • spawn isolated processes using mocked process object (workers?)
  • jsh
    • allow to run script files from fs
    • fix input buffer when moving cursor in terminal
    • support && and || operators
    • support >> and >
    • support |
    • add shebang support
  • jsh commands
    • rm -r
    • mkdir -p
    • cp -r
    • which
    • export
    • sleep
    • alias
    • curl
  • external commands
    • wasm (using wasmer)
    • node
    • python (using wasmer)
    • pnpm
    • npm
    • yarn
  • playground
    • allow to persist fs (download or api)

🤝 Acknowledgments

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

Similar projects

About

Develop the web in the web

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published