Skip to content

Project Setup

Tom Calver edited this page Oct 10, 2025 · 18 revisions

Follow these steps to prepare your environment for development and testing. Whether you're contributing code, testing features, or exploring the project, these instructions will help you start smoothly.

Prerequisites

  1. Git: Ensure git is installed on your system. If not, download it here.
  2. IntelliJ IDEA: We recommend using IntelliJ IDEA (Community Edition) with JetBrains Toolbox to manage updates and multiple JetBrains products. Download IntelliJ here (you may need to scroll down on the Downloads page to find the community edition). If installing the IDE with JetBrains Toolbox, visit this link instead.
  3. Java Development Kit (JDK): You may need to install JDK 17 if it does not come with your IntelliJ installation. Here is an installation guide from the geeksforgeeks website.
  4. A GitHub Account, with SSH key set-up. You can follow this guide to create an account, this guide to create an SSH key and this guide to add the SSH key to your GitHub account.

1. Cloning the Project

You can clone Roky via IntelliJ or the command line:

Option A: Clone via IntelliJ

  1. Open IntelliJ IDEA.
  2. Go to File > New > Project from Version Control.
  3. Paste the repository URL: git@github.com:PPartisan/Roky.git
  4. Select a directory and click Clone.

Option B: Clone via Command Line

  1. Open your terminal.
  2. From an appropriate directory, run the following command:
git clone git@github.com:PPartisan/Roky.git
  1. Navigate into the project directory:
cd Roky

2. Configuring the Application

If you are cloning the project for the first time, you may need to specify the Java version and run Gradle sync.

Set the Gradle JVM

  1. Navigate to File → Settings... (keyboard shortcut, Ctrl + Alt + S).
  2. From the Settings dialog box, navigate to Build, Execution, Deployment → Build Tools → Gradle.
  3. A Gradle JVM dropdown menu is at the bottom of the box. From here, select Project SDK 17. If this does not exist, select Download JDK: set the version to 17 and the vendor to Amazon Corretto.

Set the Project JDK

  1. Navigate to File → Project Structure (keyboard shortcut, Ctrl + Alt + Shift + S).
  2. From the Project selection, click the SDK dropdown menu and select 17. If this does not exist, select Download JDK and set the version to 17 and the vendor to Amazon Corretto.

Run a Gradle Sync

  1. On the far right of the IDE, there is an elephant-shaped icon. Hovering over it shows a "Gradle" tooltip. Press this to open the Gradle pane.
  2. From this pane, click the button in the top row, fourth from the left. It looks like a "save" or "download" icon. Hovering over this button will show a "Download Sources" tooltip.
  3. Wait for this step to complete. If you are running for the first time, it may take several minutes.

3. Setup Supabase CLI

Roky uses Supabase as its backend to store user and chat message data. To simplify development and protect our production server from work on our develop branch, we use Supabase CLI while building features. Supabase CLI creates a local Supabase server on your development machine, which means we can use and test the behaviour of Supabase without affecting our production server. So, it is strongly recommended that all new contributors configure Supabase CLI on their development machines. The official instructions exist here, and we have guides on our Supabase page written by Roky contributors.

If you continue to experience problems, please raise an Issue if the situation requires modifying our Wiki. Otherwise, communicate them on the Discussions board or raise them in our WhatsApp channel.

4. Running the Application

You can run Roky directly from IntelliJ or the command line using Gradle.

Option A: Run from IntelliJ

  1. Open the main.kt file and press the green "Run" symbol next to fun main().

Option B: Run from the Command Line

  1. First, build the project by running:
./gradlew assemble

Once assembled, you can run the application using:

java -jar build/libs/Roky-1.0-SNAPSHOT.jar

Note that the name of the jar file may differ from Roky-1.0-SNAPSHOT.jar. Check the contents of the build/libs directory.

Configuring Roky to use Supabase-CLI

Distributed releases of Roky use Supabase as a backend, but for safety reasons, Roky contributors do not typically use this production server during development. Instead, Roky contributors have two strategies to simulate interactions with Supabase: hardcoded mocks and Supabase-CLI.

Hardcoded mocks refer to Roky source code that returns predetermined values for various user interactions. For example, logging in via the Login screen may "authenticate" against a list of usernames and passwords in the source code. Supabase-CLI, on the other hand, refers to an instance of Supabase designed to run locally on a contributor's computer. It captures the interactions between our app and our production server more accurately but requires more work to configure and deploy. The Setup Supabase CLI section provides instructions on how to install and run Supabase-CLI.

To switch between these two strategies, contributors may modify the constants under the secrets.properties file in the project root directory. To use the Hardcoded Mocks strategy, set USE_LOCAL_MOCKS=true. To use the Supabase-CLI strategy, set this same value to false. Note that to use Supabase-CLI, you must also add values for the server URL and client API key.

5. Key Technologies Used

Roky currently uses the following libraries and tools:

  • Lanterna: Lightweight UI framework for text-based user interfaces.
  • Supabase: Backend service for authentication and database management.
  • Koin: Dependency injection for better code modularity.
  • Kotlin Coroutines: Enables asynchronous programming with concise code.
  • JUnit5 & Kotest: Testing frameworks for unit and integration tests.
  • MockK: Mocking framework for Kotlin to support unit testing.
  • Ktor: A framework for building asynchronous server and client applications.

Next Steps

Once you’ve set up the project, please familiarise yourself with our Contribution Guidelines so you can understand our coding standards. If you encounter any issues during setup, please refer to the FAQ or ask for assistance in the WhatsApp group.