For forging your next project inside of a browser.
This project is currently just my thoughts and playing around with ideas. Honestly it doesn't work right now because i don't have the time to polish it. Here is commit fef7146 with files already created to show a demo of what i've worked on.
basic-editor.mp4
Here's the pitch, what if we had a editor in the browser that anyone could visit and just start programming. The "editor" would run on the server and use a LSP-like protocol to communicate between the client and the server using websockets. The secret sauce to the idea would be that the editor is actually a large micro-service that is calling LSP's through network calls. By deploying an editor in this way, we can distribute it across multiple machines.
A rough sketch of some of my thoughts is below.
You need to setup redis. If you don't want to start a docker container, just run the following in your terminal.
brew install redis
redis-serverYou'll also need an S3 server with the following variables defined in .env file
S3_BUCKET="forge-editor"
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
# Create this folder
ROOT_PROJECT_DIRECTORY="./.workspace-cache"
You'll also need to install language servers so that you can effectively.
Warning
Only javascript has been tested a lot.
# Install gopls... lol idk how to do this.
# Installing markdown LSP
brew install marksman
# Installing Rust LSP
rustup component install rust-analyzer
# Install language servers for the Web
npm i -g typescript-language-server vscode-json-languageserver npm install vscode-markdown-languageservice vscode-html-languageserver-bin vscode-css-languageservice typescriptInstall the packages
npm iPatch for web socket support (next.js doesn't support this out of the box)
npx next-ws-cli@latest patchFirst, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
