Skip to content

Commit b24b90b

Browse files
Merge pull request #421 from rahulharpal1603/enhancement/setup-guide-update
Introduce Video Tutorials for Setup and Change README.md Setup Instructions [Sr. No. 26]
2 parents fd66180 + 0aa4772 commit b24b90b

11 files changed

Lines changed: 330 additions & 359 deletions

File tree

README.md

Lines changed: 28 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PictoPy
22

3+
### Discord Channel [Link](https://discord.com/channels/1022871757289422898/1311271974630330388)
4+
35
PictoPy is an advanced desktop gallery application that combines the power of Tauri, React, and Rust for the frontend with a Python backend for sophisticated image analysis and management.
46

57
## Architecture
@@ -55,76 +57,49 @@ Handles file system operations and provides a secure bridge between the frontend
5557

5658
## Setup
5759

58-
### Frontend Setup
60+
1. Setup Using Script (Recommended Approach): [Guide](docs/Script_Setup_Guide.md)
61+
2. Setup Manually: [Guide](docs/Manual_Setup_Guide.md)
62+
3. Docker Setup:
5963

60-
#### Prerequisites
64+
- Docker Compose Setup: [Guide](./docs/docker-compose/redme.md)
65+
- Setup using Dockerfile
6166

62-
- Node.js (LTS version recommended)
63-
- npm (comes with Node.js)
64-
- Rust (latest stable version)
65-
- Tauri CLI
67+
- For setting up the frontend, follow the instructions in the [Frontend Setup Guide](./docs/frontend/docker-setup.md).
68+
</br>
69+
- For setting up the backend, follow the instructions in the [Backend Setup Guide](./docs/backend/docker-setup.md).
6670

67-
#### Installation
71+
## Testing
6872

69-
1. Clone the repository to your local system:
73+
### Frontend
7074

71-
## Automatic Setup:
72-
```bash
73-
npm run setup
74-
```
75-
```bash
76-
git clone git@github.com:AOSSIE-Org/PictoPy.git
77-
```
78-
79-
```bash
80-
cd PictoPy
81-
```
82-
83-
## Automatic Setup:
8475
```bash
85-
npm run setup
76+
cd frontend
77+
npm test
8678
```
87-
## Manual Setup:
88-
1. Navigate to the frontend directory:
89-
```bash
90-
cd frontend
91-
```
92-
1. Install dependencies:
9379

94-
```bash
95-
npm install
96-
```
80+
### Backend
9781

98-
```bash
99-
cd scripts
100-
```
101-
102-
On Debian/Ubuntu:
103-
104-
```bash
105-
./setup_env.sh
106-
```
107-
108-
On Windows:
109-
```
110-
./setup_win.ps1
111-
```
112-
113-
#### Running the Application
82+
- FastAPI
83+
```bash
84+
cd backend
85+
pytest
86+
```
87+
- Tauri
11488

115-
```bash
116-
npm run tauri dev
117-
```
89+
```bash
90+
cd frontend/src-tauri/
91+
cargo test
92+
```
11893

119-
#### Building for Production
94+
## Building for Production
12095

12196
Create Signing Keys for tauri using the command:
12297

12398
```bash
12499
npm run tauri signer generate
125100
```
126101

127-
Set the public key in tauri.conf.json as pubkey and private key and password in Enviroment Variables as TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD
102+
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
128103

129104
There is a preset pubkey in tauri.conf.json ; private key and password for it is:
130105

@@ -140,138 +115,9 @@ TAURI_SIGNING_PRIVATE_KEY_PASSWORD=pass
140115
npm run tauri build
141116
```
142117

143-
### Python Backend Setup
144-
145-
**Note:** For backend setup make sure that you have Python version 3.12 or lower. Additionally, for Windows, make sure that you are using powershell for the setup, not command prompt.
146-
147-
#### Installation Steps
148-
149-
1. **Navigate to the Backend Directory:** Open your terminal and use `cd` to change directories:
150-
151-
Bash
152-
153-
```
154-
cd backend
155-
156-
```
157-
158-
2. **Set Up a Virtual Environment (Highly Recommended):** Virtual environments isolate project dependencies. Create one using:
159-
160-
Bash(Linux/MacOS)
161-
162-
```
163-
python3 -m venv .env
164-
165-
```
166-
167-
Powershell(Windows)
168-
169-
```
170-
python -m venv .env
171-
172-
```
173-
174-
3. **Activate the Virtual Environment:**
175-
176-
Bash(Linux/MacOS)
177-
178-
```
179-
source .env/bin/activate
180-
181-
```
182-
183-
Powershell(Windows)
184-
185-
```
186-
.env\Scripts\activate.ps1
187-
188-
```
189-
190-
After activating, you should be able to see the virtual environment's name before the current path. Something like this:
191-
192-
![alt text](docs/assets/screenshots/virtualEnv.png)
193-
194-
4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
195-
196-
Bash
197-
198-
```
199-
pip install -r requirements.txt
200-
201-
```
202-
203-
5. **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:
204-
205-
**Debian/Ubuntu:**
206-
207-
Bash
208-
209-
```
210-
sudo apt update
211-
sudo apt install -y libglib2.0-dev libgl1-mesa-glx
212-
213-
```
214-
215-
**Other Systems:** Consult your distribution's documentation for installation instructions.
216-
217-
6. **`gobject-2.0` Not Found Error:** Resolve this error by installing `libglib2.0-dev` (Debian/Ubuntu):
218-
219-
Bash
220-
221-
```
222-
sudo apt install -y libglib2.0-dev pkg-config
223-
224-
```
225-
226-
For other systems, consult your distribution's documentation.
227-
228-
7. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the virtual environment activated:
229-
230-
Bash/Powershell
231-
232-
```
233-
fastapi dev
234-
```
235-
236-
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.
237-
238-
![alt text](docs/assets/screenshots/serverRunning.png)
239-
240-
### Docker Compose Setup
241-
242-
- [Docker Compose](./docs/docker-compose/redme.md)
243-
244-
### Setup using Dockerfile
245-
246-
- For setting up the frontend, follow the instructions in the [Frontend Setup Guide](./docs/frontend/docker-setup.md).
247-
</br>
248-
- For setting up the backend, follow the instructions in the [Backend Setup Guide](./docs/backend/docker-setup.md).
249-
250-
### Testing
251-
252-
#### Frontend
253-
254-
```bash
255-
cd frontend
256-
npm test
257-
```
258-
259-
#### Backend'
260-
261-
- FastAPI
262-
```bash
263-
cd backend
264-
pytest
265-
```
266-
- Tauri
267-
```bash
268-
cd frontend/src-tauri/
269-
cargo test
270-
```
271-
272118
## Additional Resources
273119

274-
- [Tauri Documentation](https://tauri.app/v1/guides/)
120+
- [Tauri Documentation](https://tauri.app/start/)
275121
- [React Documentation](https://reactjs.org/docs/getting-started.html)
276122
- [FastAPI Documentation](https://fastapi.tiangolo.com/)
277123

app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ def initialize_app():
88
invalidate_cache()
99
# ...existing code...
1010

11+
1112
# If there's a refresh functionality, update it to clear relevant caches
1213
def refresh_data():
1314
# ...existing code...
1415
# Clear specific caches that need refreshing
1516
invalidate_cache("albums:get_all_albums")
1617
invalidate_cache("folder_structure:get_folder_structure")
1718
# ...existing code...
19+
20+
1821
# ...existing code...

core/album_manager.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

core/folder_manager.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

core/image_processor.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)