Online-Code-Editor

An Online IDE with login functionality enables users to run code, generate new code refactor existing code through secure login and share the code with anyone.

Homepage

Lines of code

Structure of a .env File

#Frontend
VITE_GEMINI_API_URL=
VITE_BACKEND_API_URL=
VITE_TEMP_SHARE_URL= #same as TEMP_FILE_URL

#Login
MONGO_URI=
JWT_SECRET=
PORT=
OTP_EMAIL_SERVICE=
OTP_EMAIL_USER=
OTP_EMAIL_PASS=

#GenAi
GEMINI_API_KEY=
GEMINI_MODEL=
GEMINI_MODEL_1=
JWT_SECRET= #same from Login

#TempFile
REDIS_HOST=
REDIS_PASSWORD=
REDIS_PORT=6379
TEMP_FILE_URL= #same as VITE_TEMP_SHARE_URL
JWT_SECRET= #same from Login

Diagram

Diagram

Frontend Dependencies:

Backend Dependencies:

Python Libraries:

How to Set Up and Use

To set up and run:

What You Need

Clone the repository:

git clone https://github.com/gladw-in/online-ide.git

Backend Login

  1. Go to the Backend/Login folder:
    cd Backend/Login
    
  2. Install dependencies:
    npm install
    
  3. Remember to have the .env.

  4. Run the server:
    node server.js
    

Note:

Ensure that Genai and TempFile are assigned different ports.

You can modify the port by:

if __name__ == "__main__":
    app.run(debug=False, port = <port>)

GenAi

  1. Go to the Backend/Genai folder:
    cd Backend/Genai
    
  2. Install packages:
    pip install -r requirements.txt
    
  3. Remember to have the .env.

  4. Run it:
    python app.py
    

TempFile

  1. Go to the Backend/TempFile folder:
    cd Backend/TempFile
    
  2. Install packages:
    pip install -r requirements.txt
    
  3. Remember to have the .env.

  4. Run it:
    python app.py
    

Frontend

  1. Go to the Frontend folder:
    cd ./Frontend
    
  2. Install dependencies:
    npm install
    
  3. Remember to have the .env.

For Development

To start working on the project:

npm run dev

This starts the development server. Open your web browser and go to http://localhost:5173 (or the address shown in your terminal) to see the app.

Building for Release

To make the project ready for release:

npm run build

This creates optimized files in the dist folder.

Looking at the Release Version

To see how the release version looks:

npm run preview

Screenshots

Homepage

Homepage

HTML, CSS, JS

HTML, CSS, JS

Python

Python

JavaScript

JavaScript

C

C

C++

C++

Java

Java

C#

C#

Rust

Rust

Go

Go

Verilog

Verilog

SQL

SQL

MongoDB

MongoDB

Swift

Swift

Typescript

Typescript

Dart

Dart

Kotlin

Kotlin

Perl

Perl

Scala

Scala

Julia

Julia

Accounts

Accounts

Login

Login

Register

Register

License

You can use this under the MIT License. See LICENSE for more details.