Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added Markdown files for Documentation #378

Merged
merged 44 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d4eea1d
[add]: docs/Quickstart guide to get the user started
hasnainmakada-99 Nov 28, 2023
4d7c042
[add]: Getting-Started.md to help users install drifty on various OS
hasnainmakada-99 Nov 28, 2023
cd7abfa
[add]: Drifty Demo video
hasnainmakada-99 Nov 28, 2023
61ae360
[add]: Dirfty Explanations
hasnainmakada-99 Nov 28, 2023
52ca30a
[add]: FAQ Docs for better troubleshooting of the project for the end…
hasnainmakada-99 Dec 12, 2023
0faf709
Merge branch 'master' into master
SaptarshiSarkar12 Dec 12, 2023
783f061
[fix]: Linter errors in Quickstart.md
hasnainmakada-99 Dec 12, 2023
361e1da
Merge branch 'master' of https://github.com/hasnainmakada-99/Drifty
hasnainmakada-99 Dec 12, 2023
f7b8e21
[fix]: linters on line 17 of quickstart.md
hasnainmakada-99 Dec 12, 2023
b740738
Merge branch 'master' into master
SaptarshiSarkar12 Dec 12, 2023
db37382
[add]: Project(s) Contribution Guide
hasnainmakada-99 Dec 25, 2023
99a5ac5
Merge branch 'master' of https://github.com/hasnainmakada-99/Drifty
hasnainmakada-99 Dec 25, 2023
b232477
Merge branch 'master' into master
SaptarshiSarkar12 Dec 25, 2023
7b8dc5f
update: Contribution as well as the quickstart guide to go for review
hasnainmakada-99 Jan 22, 2024
ea52319
Merge branch 'master' into master
SaptarshiSarkar12 Jan 25, 2024
343a125
Update: Website/app/docs/Quickstart.md
hasnainmakada-99 Jan 26, 2024
173f196
Fixed Typo
hasnainmakada-99 Jan 28, 2024
6ca9b95
Fixed Typos by Saptershi
hasnainmakada-99 Jan 28, 2024
2d481a7
Merge branch 'master' into master
SaptarshiSarkar12 Feb 13, 2024
becf18b
docs: Updated Installation Video in Quickstart
SaptarshiSarkar12 Feb 13, 2024
81fa019
Update Website/app/docs/Contribution.md
hasnainmakada-99 Feb 16, 2024
6baba37
Update Website/app/docs/Contribution.md
hasnainmakada-99 Feb 16, 2024
7d4a320
Update Website/app/docs/Contribution.md
hasnainmakada-99 Feb 16, 2024
2b20e52
Merge branch 'master' into master
SaptarshiSarkar12 Apr 18, 2024
e46b4d9
Merge branch 'master' into master
SaptarshiSarkar12 Apr 27, 2024
4a762a8
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 May 8, 2024
1c1e103
docs: Refactored some lines in the FAQ and Contributing files
SaptarshiSarkar12 May 9, 2024
99430fb
docs: Rewritten Quickstart, Getting Started and Contributing, and als…
SaptarshiSarkar12 Jul 23, 2024
94fbe75
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Jul 23, 2024
1f45e23
fix(CI): Fixed linter issues
SaptarshiSarkar12 Jul 23, 2024
9b49e79
fix(CI): Fixed linter issues
SaptarshiSarkar12 Jul 23, 2024
a00c390
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Jul 23, 2024
51c7951
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Jul 27, 2024
3849aeb
feat(docs): Organized development flow and added more details in the …
SaptarshiSarkar12 Jul 29, 2024
94cc49b
fix(CI): Fixed linter issue
SaptarshiSarkar12 Jul 29, 2024
03a3be4
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Jul 30, 2024
8ebeb4b
feat(docs): Added steps to generate graalvm metadata for both Drifty …
SaptarshiSarkar12 Jul 30, 2024
9a7fabf
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Jul 30, 2024
57b84a4
fix(CI): Fixed all typos and sentence improvements provided by CodeRa…
SaptarshiSarkar12 Jul 30, 2024
87331c6
docs: Added Usage guidelines for both Drifty CLI and Drifty GUI
SaptarshiSarkar12 Aug 11, 2024
2455ffa
Merge branch 'master' of github.com:SaptarshiSarkar12/Drifty into has…
SaptarshiSarkar12 Aug 11, 2024
7eef297
docs: Added images for Usage guidelines of Drifty CLI
SaptarshiSarkar12 Aug 11, 2024
0b3dd80
docs: Fixed Coderabbit AI reviews
SaptarshiSarkar12 Aug 11, 2024
b43e6c1
docs: Fixed a grammatical error provided by Coderabbit AI
SaptarshiSarkar12 Aug 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ MD004:
MD005: true # Inconsistent indentation for list items at the same level
MD022: true # Headers should be surrounded by blank lines
MD023: true # Headers must start at the beginning of the line
MD024: true # Multiple headers with the same content
MD024:
siblings_only: true # Multiple headers with the same content under different nesting levels are allowed
MD026:
punctuation: ".,;:!" # Trailing punctuation in header
MD027: true # Multiple spaces after blockquote symbol
Expand Down
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions Website/app/docs/Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to Drifty

Drifty is an Open-Source project, and we encourage contributions from the community.
Thank you for considering and taking the time to contribute!
The following are the guidelines for contributing to this project.

## Code of Conduct

We have a [Code of Conduct](https://github.com/SaptarshiSarkar12/Drifty/blob/master/CODE_OF_CONDUCT.md) that all contributors must follow.
This code of conduct outlines our expectations for participants within the project. It also includes steps to report unacceptable behavior.
We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates or has concerns about the code of conduct should report it directly to the project maintainers.

## How to Report Bugs and Issues

To report any bugs or any difficulties you are facing, you can create an issue by following the below steps 👇

1. Go to the [issues](https://github.com/SaptarshiSarkar12/Drifty/issues) tab of the drifty project on GitHub
2. Click on the [new issue](https://github.com/SaptarshiSarkar12/Drifty/issues/new/choose) button
3. Choose the relevant category of the issue which you would like to raise
4. Provide as much information as possible, including screenshots, text output, and both your expected and actual results.

## What does each Issue Category mean?

1. **Bug Report for Application**:
You can create a **Bug Report for Application** to report any bug related to the application, including installation problems and crashes.
2. **Bug report for Website**:
You can create an issue in this category if you encounter any bugs or issues in the [official website of Drifty](https://saptarshisarkar12.github.io/Drifty/).
3. **Documentation Change Request**:
Raise an issue if you think any improvements can be made in the Documentation of Drifty.
4. **Feature Request for Drifty Application**:
If you have any ideas to improve the application by adding new features, you can create an issue in this category.
5. **Feature Request for Drifty Website**:
If you have any ideas to improve the Website of Drifty by adding new features, you can create an issue in this category.

If none of the above categories applies to your case, feel free to create an issue in the **Others** category.

## Pull Requests

[Pull requests](https://github.com/SaptarshiSarkar12/Drifty/pulls) are a fantastic way to bring your ideas to life in this project! Start by opening an issue to describe your proposed changes and discuss them with the maintainers. Once the issue is assigned to you, you can go ahead and submit your pull request.

## What does each Label mean in Issues and Pull Requests?

1. **App 💻**
This label indicates that changes are made in the Application code
2. **bug 🐛**
This label indicates that changes are made to fix a bug
3. **dependencies 📦️**
This label indicates that dependencies are updated in a Pull Request
4. **docker 🐋**
This label indicates that changes are made in the Dockerfiles
5. **documentation 📝**
This label indicates that changes are made in the documentation
6. **good first issue**
This label indicates that the issue is suitable for beginners to start contributing
7. **help wanted**
This label indicates that the issue requires help from the community
8. **invalid**
This label is used to mark an issue or Pull Request as invalid, meaning it does not meet the project's guidelines or is not relevant to the project's goals.
9. **CI/CD 🔁**
This label indicates that changes are made in the CI/CD workflows (GitHub Actions)
10. **duplicate**
This label indicates that the issue / Pull Request is duplicate
11. **hacktoberfest**
This label indicates that the issue is a part of [Hacktoberfest](https://hacktoberfest.com/)
12. **hacktoberfest-accepted**
This label indicates that the Pull Request is accepted for [Hacktoberfest](https://hacktoberfest.com/) and will count towards your participation

## Project Insights: Status and Task Progress

[Projects Tab](https://github.com/users/SaptarshiSarkar12/projects/3) lists the tasks completed, in progress and the ideas left to be incorporated in the project. You can work on the **to-do tasks** by creating the issue (if not already created) and getting yourself assigned.

![Project Insights](https://github.com/user-attachments/assets/292c5c90-fbee-4eb0-8912-02faea96ad23)
33 changes: 33 additions & 0 deletions Website/app/docs/Development/Architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Architecture

## Project Structure

The project is organized into the following directories:

- `.github`: Contains the GitHub Actions workflows, issue and pull request templates, linter configuration files, and other GitHub-specific files.
- `CLI`: Maven child module containing the source code for the Drifty CLI.
- `GUI`: Maven child module containing the source code for the Drifty GUI.
- `Core`: Maven child module containing the shared code between the CLI and GUI.
- `Website`: Contains the source code for the Drifty website (A Next.js application).
- `config`: Contains the configuration files for building the native installers and executables.
- `Docker`: Contains the Dockerfile to build and run the Drifty application in a Docker container.
- `dev`: Contains the Dockerfiles to build and run the Drifty application in a Docker container for development purposes.
- `CLI`: Contains the Dockerfile to build and run the Drifty CLI executable in a Docker container for development purposes.
- `GUI`: Contains the Dockerfile to build and run the Drifty GUI executable in a Docker container for development purposes.
- `commons`: Contains the Dockerfiles for the base images used by the Drifty CLI and GUI Dockerfiles.
- `prod`: Contains the Dockerfile to build and run the Drifty application in a Docker container for production purposes.
- `CLI`: Contains the Dockerfile to build the Docker image for the Drifty CLI executable.
- `GUI`: Contains the Dockerfile to build the Docker image for the Drifty GUI executable.

## Technologies Used

The Drifty project uses the following technologies:

- [**Java**](https://www.java.com/): The project is written in Java, which is a high-level, class-based, object-oriented programming language.
- [**JavaFX**](https://openjfx.io/): The project uses JavaFX as the GUI toolkit for Drifty GUI.
- [**Maven**](https://maven.apache.org/): The project uses Maven as the build automation and project management tool.
- [**GraalVM**](https://www.graalvm.org/): The project uses GraalVM to build native executables for the Drifty CLI and GUI.
- [**GluonFX Maven Plugin**](https://github.com/gluonhq/gluonfx-maven-plugin): The project uses the GluonFX Maven Plugin (which uses GraalVM under the hood) to build native executables for the Drifty GUI.
- [**Next.js**](https://nextjs.org/): The project uses Next.js to build the Drifty website.
- [**Docker**](https://www.docker.com/): The project uses Docker to containerize the Drifty application for development and production purposes.
- [**GitHub Actions**](https://docs.github.com/en/actions): The project uses GitHub Actions for CI/CD workflows.
163 changes: 163 additions & 0 deletions Website/app/docs/Development/Building-Executables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Building Installer or Executable Binaries for Drifty

## Generating GraalVM Metadata

> [!NOTE]
> This step is required only if you want to see your changes reflected in Drifty CLI or GUI executables.
> If you are only interested in building the installer or executable binaries, you can skip this step.

### Prerequisites

- [Java 21](https://www.oracle.com/java/technologies/downloads/#java21)
- [Download](https://maven.apache.org/download.cgi#previous-stable-3-8-x-release) and [install](https://maven.apache.org/install.html) **Maven** (Maven v3.8.8 is required for generating GraalVM metadata for Drifty GUI)
- [GraalVM 21](https://www.graalvm.org/downloads/)

### Steps

1. Open the terminal and navigate to the project directory
2. Follow the below instructions to generate GraalVM metadata for Drifty CLI or GUI
- For Drifty GUI,
- Navigate to the `GUI` directory
```shell
cd GUI
```
- Run the below command to generate GraalVM metadata for Drifty GUI
```shell
mvn gluonfx:runagent
```
- For Drifty CLI,
- Navigate to the `CLI` directory
```shell
cd CLI
```
- Run the below command to generate GraalVM metadata for Drifty CLI
```shell
mvn -P generate-graalvm-metadata exec:exec@java-agent
```
3. Upon completion of the command, the GraalVM metadata will be generated in `src/main/resources/META-INF/native-image` directory of the respective project (`GUI` or `CLI`) directory.
SaptarshiSarkar12 marked this conversation as resolved.
Show resolved Hide resolved

## Local Build

### Prerequisites

- [Java 21](https://www.oracle.com/java/technologies/downloads/#java21)
- [Download](https://maven.apache.org/download.cgi#previous-stable-3-8-x-release) and [install](https://maven.apache.org/install.html) **Maven** (Maven v3.8.8 is required for building installer or executable binaries for Drifty GUI, locally)
- [GraalVM 21](https://www.graalvm.org/downloads/)
- [GCC](https://gcc.gnu.org/install/)

### Steps

> [!NOTE]
> Check if GraalVM is added to the system path by running `native-image --version` in the terminal.
> If the command is not recognized, add the GraalVM `bin` directory to the system path.
> ```shell
> PATH=$GRAALVM_HOME/bin
> ```
> Set the following environment variable to point to your GraalVM installation directory.
> ```shell
> GRAALVM_HOME=<path-to-graalvm>
> ```
> Replace `<path-to-graalvm>` with the actual path to the GraalVM installation directory.

1. Open the terminal and navigate to the project directory
2. Assuming you have installed the necessary project dependencies, run the below command to generate the C object file required only for building executable binaries for Drifty GUI
- For Linux,
```shell
gcc -c config/missing_symbols.c -o config/missing_symbols-ubuntu-latest.o
```
- For Windows,
```shell
gcc -c config/missing_symbols.c -o config/missing_symbols-windows-latest.o
```
- For macOS,
```shell
gcc -c config/missing_symbols.c -o config/missing_symbols-macos-latest.o
```
Replace `gcc` with the path to the GCC compiler if it is not in the system path.
3. Run the below command to build the installer or executable binaries
- For Drifty GUI,
- For Linux,
```shell
mvn -P build-drifty-gui-for-ubuntu-latest gluonfx:build gluonfx:package -rf :GUI -U
```
- For Windows,
```shell
mvn -P build-drifty-gui-for-windows-latest gluonfx:build gluonfx:package -rf :GUI -U
```
- For macOS,
```shell
mvn -P build-drifty-gui-for-macos-latest gluonfx:build gluonfx:package -rf :GUI -U
```
- For Drifty CLI,
- For Linux,
```shell
mvn -P build-drifty-cli-for-ubuntu-latest package
```
- For Windows,
```shell
mvn -P build-drifty-cli-for-windows-latest package
```
- For macOS,
```shell
mvn -P build-drifty-cli-for-macos-latest package
```
4. Upon completion of the build, the installer or executable binaries will be neatly organized in the directories listed below. The placeholder `{arch}` should be replaced with either `x86_64` or `aarch64`, depending on your system's architecture.
- For Drifty GUI,
- For Linux,
```shell
GUI/target/gluonfx/{arch}-linux
```
- For Windows,
```shell
GUI/target/gluonfx/{arch}-windows
```
- For macOS,
```shell
GUI/target/gluonfx/{arch}-mac
```
- For Drifty CLI,
- For Linux,
```shell
CLI/target/CLI/linux
```
- For Windows,
```shell
CLI/target/CLI/windows
```
- For macOS,
```shell
CLI/target/CLI/mac
```
5. You can now run the installer or executable binaries to use the application.
6. To remove the generated files, run the below command
```shell
mvn clean
```

## Docker Build

### Prerequisites

- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/)

### Steps

1. Open the terminal and navigate to the project directory
2. Follow the below instructions to build and start the Drifty application in a Docker container
- For Drifty GUI,
- For Linux and Windows users,
- Run the below command to add access to the X server (required for GUI applications running in Docker)
```shell
xhost +local:docker
```
- Run the below command to build and start the Drifty GUI native executable in a Docker container
```shell
docker compose run gui
```
- For macOS users, please follow [these instructions](macOS%20Docker%20Build%20Instructions.md)
- For Drifty CLI,
Run the below command to build and start the Drifty CLI native executable in a Docker container
```shell
docker compose run cli
```
79 changes: 79 additions & 0 deletions Website/app/docs/Development/Quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Quick Start

This is a quick start guide to get developers up and running with the project for development purposes.

## Clone the Project

> [!NOTE]
> You need to have Git installed on your machine to clone the project. If you don't have Git installed, you can download it from [here](https://git-scm.com/downloads).

SaptarshiSarkar12 marked this conversation as resolved.
Show resolved Hide resolved
Clone the Drifty repository to your local machine using the following command:

```bash
git clone [email protected]:SaptarshiSarkar12/Drifty.git
```
After the project has been cloned successfully, the **`Drifty`** directory will be created. Navigate into that directory.

## Drifty Application Development

### Prerequisites

- [Java 21](https://www.oracle.com/java/technologies/downloads/#java21)
- [Maven](https://maven.apache.org/download.cgi)
- [IntelliJ IDEA](https://www.jetbrains.com/idea/) (**Recommended**)

### Install Dependencies

Install the dependencies required for the project using the following command:

```bash
mvn clean install
```
This command will install all the dependencies required for the maven project.

### Running the Project in IntelliJ IDEA

1. Open the project in IntelliJ IDEA.
2. Follow the below steps to run the project:
- Open the `Drifty_CLI` Java class in the `CLI/src/main/java/main` directory and click on the run button. This will start the Drifty CLI application.
- Open the `Drifty_GUI` Java class in the `GUI/src/main/java/main` directory and click on the run button. This will start the Drifty GUI application.
3. Make changes to the code and see them reflected in the application. Re-run the project after each change to see the updated output.

### Debugging Drifty Application

To debug the project, you can set breakpoints in the code and run the project in debug mode (by clicking on the debug button in IntelliJ IDEA). This will allow you to step through the code and inspect variables to identify and resolve issues.

## Drifty Website Development

### Prerequisites

- [Node.js](https://nodejs.org/en/download/)
- [npm](https://www.npmjs.com/get-npm)
- [WebStorm](https://www.jetbrains.com/webstorm/) (**Recommended**) (You can also use any other IDE of your choice)

### Install Dependencies

Navigate to the `Website` directory and install the dependencies required for the website using the following command:

```bash
npm ci
```

### Running the Website Locally (Development Mode)

To run the website locally in development mode, use the following command:

```bash
npm run dev
```

This will start the development server, and you can access the website at `http://localhost:3000` in your browser.
Make changes to the website code from your IDE and see them reflected in real-time in the browser.

### Debugging Drifty Website

To debug the website, you can use the browser's developer tools to inspect the elements, view console logs, and debug JavaScript code. You can also use the `console.log()` function to log messages to the console for debugging purposes.

## Contributing

If you would like to contribute to the project, please read the [Contributing Guidelines](../Contributing.md) for more information on how to get started.
Loading
Loading