Skip to content

Khalidmamdou7/cursor-clash-backend

Repository files navigation

Cursor Clash Backend

This is the backend for Cursor Clash, a web-based collaborative text editor. This project is part of the academic coursework for the "Advanced Programming Techniques" course at Cairo University Faculty of Engineering.

The backend is built using the Java Spring Boot framework.

The frontend for this project can be found here. [Not created yet]

The project is still under development and is not yet ready for production use.

How to run the project

Prerequisites

  • Java Version 21 or higher installed on your machine (OpenJDK is recommended)
  • Maven installed on your machine

Note: If you are using IntelliJ IDEA, you can use the built-in Maven and Java tools.

Running the project

  1. Clone the repository

    git clone <repo-url>
    cd cursor-clash-backend
  2. Open the project in your favorite IDE (IntelliJ IDEA is recommended)

  3. Create a new file named application.properties in the src/main/resources directory copied from the application.template.properties file

    Or you can run the following command to create the file

     cp src/main/resources/application.template.properties src/main/resources/application.properties
  4. Set the undefined properties in the application.properties file

  5. Run the project

  6. The server will start on localhost:<PORT> where <PORT> is the port specified in the application.properties file

Running using docker (better for production)

  1. Make sure you have docker and docker-compose installed on your machine

    docker --version
    docker-compose --version

    if not installed, you can install them from the following links:

    sudo apt update
    sudo apt install docker.io docker-compose
    sudo systemctl start docker
    sudo systemctl enable docker
  2. Clone the repository

    git clone <repo-url>
    cd <repo-name>
  3. Generate a self-signed certificate for the server to use https and place it in the ssl directory

    mkdir -p ssl && openssl req -newkey rsa:2048 -nodes -keyout ssl/mykey.key -x509 -days 365 -out ssl/mycert.crt
  4. Run the following command to build the docker image

    sudo docker-compose up --build

Congratulations! The server is now running on both HTTP and HTTPS on 80 and 443 ports respectively.

Contribution Guidelines

Please refer to the CONTRIBUTING.md file for the contribution guidelines.

About

The backend of web-based collaborative text editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published