Skip to content

A sync Code Editor built with Angular using CRDT idea. Connections created using peer to peer model.

License

Notifications You must be signed in to change notification settings

DinamoTeam/Code-Spot-P2P

Repository files navigation

A real-time collaborative code editor with the power of Visual Studio Code.

I. Check it out here!

We also published an article on building a real-time collaborative code editor. Check it out here!

II. Development setup

  1. (Optional) Download SQLite3 https://sqlite.org/download.html

  2. Make sure you have ASP.NET Core 2.1 SDK and runtime: Installs via Visual Studio Installer or downloads at https://dotnet.microsoft.com/download/dotnet-core/2.1

  3. Install the .NET Core CLI

dotnet tool install --global dotnet-ef --version 2.1
  1. Create the local instance of the DB by running this command in the terminal
dotnet ef database update

Note: to drop the database, run the following command

dotnet ef database drop
  1. This project was generated with Angular CLI version 8.3.9.

Install the Angular CLI using NPM (Node.js >= 10 required)

npm install -g @angular/[email protected] 

In the code-spot-client folder. Restore all NPM packages by running

cd ./code-spot-client
npm install
  1. Start IIS Express server through Visual Studio IDE or run this command in the project's folder (Code-Spot-P2P)
cd ..
dotnet run
  1. Run this command in the client's folder (code-spot-client).
cd ./code-spot-client
ng serve --open

Note: If you're using Windows and see this error cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170, run the following script and retry

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.