Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Build and Release

name: Build and Release App
on:
workflow_dispatch: # Ability to manually trigger the workflow

Expand Down Expand Up @@ -187,8 +186,8 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YzZCUHNpNjQzalN3SllaeGI0TUU1Ky9VQjZOZjI0aklxdXJ6WVhrTEVVUUFBQkFBQUFBQUFBQUFBQUlBQUFBQWxRSUV5LzJkSXlMWUZrWE44MC9HQXFKQ1piYkhDUmJvTDlIVnlPQXpKeFJTWVBDdGZCcHp6RGpJMTlTWkp0RGhCNzRyT2lHc0JsYWFBTTdzcEN0ZnNuaE1EcjZxYWlEOHArbU9hcnFIUjUvQ1VpOERGeU55M2ttZE5xNnBvSE5ONllGOWN0YmkvS289Cg==
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: 123456
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY}}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
projectPath: ./frontend
tagName: app-v__VERSION__
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Docs Deploy
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: "PR Check for PictoPy"
name: PR Check Build
on:
pull_request_review:
types: [submitted]
pull_request:
paths:
- "frontend/**"

jobs:
tauri-build-check:
name: Tauri Build Check
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -57,8 +56,9 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5NlF2SjE3cWNXOVlQQ0JBTlNITEpOUVoyQ3ZuNTdOSkwyNE1NN2RmVWQ1a0FBQkFBQUFBQUFBQUFBQUlBQUFBQU9XOGpTSFNRd0Q4SjNSbm5Oc1E0OThIUGx6SS9lWXI3ZjJxN3BESEh1QTRiQXlkR2E5aG1oK1g0Tk5kcmFzc0IvZFZScEpubnptRkxlbDlUR2R1d1Y5OGRSYUVmUGoxNTFBcHpQZ1dSS2lHWklZVHNkV1Byd1VQSnZCdTZFWlVGOUFNVENBRlgweUU9Cg==
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: pass
# Don't worry, the below key is just a sample key for PR-Checks. Actual app build workflow uses a secret private key :)
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5TzhIVE9SbEtZZThpM2RvQWpvV09wZXlEOXR0cVRsVUs3NlR2NXhRTUJsSUFBQkFBQUFBQUFBQUFBQUlBQUFBQTBVZE5kNmR4ZHdScUtDWURsNWtweXQwem01WlJobXQzSmNtQUZydnNrb0UvSzJKQnM0b2ZRcSt6eElmaHFHZ3VzVkRrRkdtSC9jcGVRMDJzZlR3RDRta3V2UDBNdzRUSU1LQlo0dk43NHRHZGdaYTNPbndhYU14YmdqN1Y3VkNRb2l2bDF4NDQ5Tk09Cg==
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: abcd
with:
projectPath: ./frontend
args: ${{ matrix.args }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI for PictoPy
name: PR Check

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Create Signing Keys for tauri using the command:
npm run tauri signer generate
```

Set the public key in tauri.conf.json as pubkey and private key and password in Environment Variables as TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD
Set the public key in tauri.conf.json as pubkey and private key and password in Environment Variables(of your terminal) as TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD

There is a preset pubkey in tauri.conf.json ; private key and password for it is:
As an **example** of the private key would look like this:

```bash
TAURI_SIGNING_PRIVATE_KEY=dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5NlF2SjE3cWNXOVlQQ0JBTlNITEpOUVoyQ3ZuNTdOSkwyNE1NN2RmVWQ1a0FBQkFBQUFBQUFBQUFBQUlBQUFBQU9XOGpTSFNRd0Q4SjNSbm5Oc1E0OThIUGx6SS9lWXI3ZjJxN3BESEh1QTRiQXlkR2E5aG1oK1g0Tk5kcmFzc0IvZFZScEpubnptRkxlbDlUR2R1d1Y5OGRSYUVmUGoxNTFBcHpQZ1dSS2lHWklZVHNkV1Byd1VQSnZCdTZFWlVGOUFNVENBRlgweUU9Cg==
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ PictoPy is an advanced desktop gallery application that combines the power of Ta

---

## 💡 **Want to contribute?**
For detailed setup instructions, coding guidelines, and the contribution process, please check out our [CONTRIBUTING.md](./CONTRIBUTING.md) file.
## 💡 **Want to contribute?**

For detailed setup instructions, coding guidelines, and the contribution process, please check out our [CONTRIBUTING.md](./CONTRIBUTING.md) file.

---

# Architecture

### Frontend
Expand Down
131 changes: 131 additions & 0 deletions docs/Manual_Setup_Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
## Manual Setup Guide

### Initial Steps:

#### 1. Fork the PictoPy repository: https://github.com/AOSSIE-Org/PictoPy

#### 2. Open your Terminal (Linux/MacOS) or Powershell (Windows)

#### 3. Clone your forked repository:

```bash
git clone https://github.com/yourUsername/PictoPy
```

#### 4. Change to the repository directory:

```bash
cd PictoPy
```

#### 5. Add the main repository as "upstream":

```bash
git remote add upstream https://github.com/AOSSIE-Org/PictoPy
```

### Tauri Frontend Setup:

1. **Install Tauri prerequisites based on your OS using this** [guide](https://tauri.app/start/prerequisites/).

2. **Navigate to the Frontend Directory:** Open your terminal and use `cd` to change directories:
```
cd frontend
```
3. **Install Dependencies**:
```
npm install
```
4. **Start the Tauri desktop app in development mode**
```
npm run tauri dev
```

### Python (FastAPI) Backend Setup Steps:

> **Note:** For backend setup make sure that you have **Python version 3.12**. Additionally, for Windows, make sure that you are using Powershell for the setup, not command prompt.

1. **Navigate to the Backend Directory:** Open your terminal and use `cd` to change directories:

Bash

```
cd backend
```

2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:

Bash(Linux/MacOS)

```
python3 -m venv .env
```

Powershell(Windows)

```
python -m venv .env
```

3. **Activate the Virtual Environment:**

Bash(Linux/MacOS)

```
source .env/bin/activate
```

Powershell(Windows)

```
.env\Scripts\activate.ps1
```

After activating, you should be able to see the virtual environment's name before the current path. Something like this:

![alt text](/docs/assets/screenshots/virtualEnv.png)

4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:

Bash

```
pip install -r requirements.txt
```

5. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the virtual environment activated:

Bash/Powershell

```
fastapi dev
```

The server will start on `http://localhost:8000` by default. In test mode, the server will automatically restart if any errors are detected or if source files are modified.

![alt text](/docs/assets/screenshots/serverRunning.png)

6. **Missing System Dependencies:** Some dependencies might need system-level libraries like `libGL.so.1` (often needed by OpenCV). Install the appropriate packages based on your distribution:

**Debian/Ubuntu:**

Bash

```
sudo apt update
sudo apt install -y libglib2.0-dev libgl1-mesa-glx

```

**Other Systems:** Consult your distribution's documentation for installation instructions.

7. **`gobject-2.0` Not Found Error:** Resolve this error by installing `libglib2.0-dev` (Debian/Ubuntu):

Bash

```
sudo apt install -y libglib2.0-dev pkg-config

```

For other systems, consult your distribution's documentation.
80 changes: 80 additions & 0 deletions docs/Script_Setup_Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
## Setting Up using Script

### Video Setup Guide:

- [Windows](https://youtu.be/nNVAE4or280?si=j_y9Xn8Kra6tPHjw)
- [Ubuntu (Debian)](https://www.youtube.com/watch?v=a7I0ZRE-SHk)

### Prerequisites:

- [NodeJS](https://nodejs.org/en) (LTS Version Recommended)
- [Git](https://git-scm.com/downloads) version control system

### Steps Performed in the Video:

1. Fork the PictoPy repository: https://github.com/AOSSIE-Org/PictoPy

2. Open your terminal (or Powershell with administrator privileges on Windows)

3. Clone your forked repository:

```bash
git clone https://github.com/yourUsername/PictoPy
```

4. Change to the repository directory:

```bash
cd PictoPy
```

5. Add the main repository as "upstream":

```bash
git remote add upstream https://github.com/AOSSIE-Org/PictoPy
```

6. Run the Automatic Setup

```bash
npm run setup
```

> **Note:** This step can take a long time depending on your internet connection and system specifications. If the script seems to stop progressing after waiting for more than 10 minutes, press Enter in your terminal window to continue.

7. Start the Backend Server

#### Windows

```powershell
cd .\backend
.env\Scripts\activate.ps1
fastapi dev
```

#### Linux

```bash
cd ./backend
source .env/bin/activate
fastapi dev
```

8. Start the Frontend Desktop App

Open a new terminal window, navigate to the project directory, and run:

```bash
cd frontend
npm run tauri dev
```

9. Pre-commit Setup

Before running the `git commit` command, ensure you have the following Python packages installed globally:

```bash
pip install ruff black mypy pre-commit
```

> **Note:** If you are committing from a virtual environment, these packages should already be installed as they are included in the requirements.txt file.
Loading
Loading