Skip to content

Commit 9b53878

Browse files
committed
update the final report
1 parent 51638cc commit 9b53878

File tree

6 files changed

+2486
-5
lines changed

6 files changed

+2486
-5
lines changed

final-report-09.md

Lines changed: 244 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
| Cyclomatic complexity | 1061 |
1717
| Number of dependencies | 26 |
1818

19-
Certainly! Here’s the complete **English version** of the content you provided, suitable for inclusion in the “Quality Assurance and Project Complexity Analysis” section of a project report:
20-
2119
------
2220

2321
### Python Backend Metrics
@@ -99,11 +97,35 @@ cat requirements.txt | wc -l
9997

10098
### Frontend Metrics
10199

100+
#### Cyclomatic Complexity
101+
102+
[Javascript Cyclomatic Complexity](./statistic/js-cyclomatic-complexity.json)
103+
104+
#### Cloc
105+
106+
```
107+
91 text files.
108+
classified 91 files
109+
91 unique files.
110+
0 files ignored.
111+
112+
github.com/AlDanial/cloc v 1.96 T=0.04 s (2424.6 files/s, 225593.6 lines/s)
113+
-------------------------------------------------------------------------------
114+
Language files blank comment code
115+
-------------------------------------------------------------------------------
116+
Vuejs Component 72 863 375 6125
117+
JavaScript 10 64 64 564
118+
CSS 9 76 7 329
119+
-------------------------------------------------------------------------------
120+
SUM: 91 1003 446 7018
121+
-------------------------------------------------------------------------------
122+
```
123+
102124

103125

104126
## Documentation
105127

106-
### backend developer api documentation
128+
### Documentation for developers
107129

108130
#### http://10.16.60.67:9090/swagger-ui.html#/
109131

@@ -113,6 +135,195 @@ cat requirements.txt | wc -l
113135

114136
![image-20250525221802032](final-report-09/image-20250525221802032.png)
115137

138+
### Documentation for end users
139+
140+
A modern Vue 3 and Tailwind CSS application for organizing, editing, and managing your photo collections with AI-powered styling capabilities.
141+
142+
#### ✨ Features
143+
144+
- **Photo Management**: Upload, organize, and view photos in a beautiful gallery interface
145+
- **Album Organization**: Create and manage photo albums with drag-and-drop functionality
146+
- **Timeline View**: Browse photos chronologically with an intuitive timeline interface
147+
- **AI Photo Styling**: Transform your photos with AI-powered style transfer using Aliyun DashScope
148+
- **Photo Editing**: Built-in photo editor with cropping, filters, and adjustment tools
149+
- **Advanced Search & Filtering**: Powerful search capabilities with multiple filter criteria
150+
- **Tag System**: Organize photos with custom tags for easy searching and filtering
151+
- **Responsive Design**: Works seamlessly on desktop, tablet, and mobile devices
152+
- **User Profiles**: Personal user accounts with secure authentication
153+
154+
#### Architecture
155+
156+
![dependency-graph](final-report-09/dependency-graph.svg)
157+
158+
#### 📖 User Guide
159+
160+
##### Getting Started
161+
162+
1. **Create an Account**
163+
164+
- Navigate to the registration page
165+
![login-register](../../Software Engineering/team-project-25spring-9/frontend/image/login-register.png)
166+
- Fill in your username, email, and password
167+
![Register](final-report-09/register.png)
168+
- Complete the registration process
169+
170+
2. **Login**
171+
- Use your credentials to access your personal photo library
172+
173+
##### Managing Photos
174+
175+
###### Uploading Photos
176+
177+
- Navigate to the **Photos** section
178+
- Click the upload button or drag and drop files into the photo area
179+
- Supported formats: JPG, PNG, GIF, WebP
180+
- Multiple files can be uploaded simultaneously
181+
- Progress indicator shows upload status for each file
182+
183+
###### Deleting Photos
184+
185+
- Select photos using the checkbox selection mode
186+
- Click the delete button in the toolbar
187+
- Confirm deletion in the popup dialog
188+
- **Note**: Deleted photos are permanently removed and cannot be recovered
189+
- Alternatively, right-click on individual photos for quick delete option
190+
191+
###### Downloading Photos
192+
193+
- **Single Photo**: Click on a photo and select the download option
194+
- **Multiple Photos**: Select photos using checkboxes and click the download button
195+
- **Bulk Download**: Selected photos will be packaged into a ZIP file
196+
- Downloads preserve original image quality and metadata
197+
- Large selections may take time to process before download begins
198+
199+
![photos-view](../../Software Engineering/team-project-25spring-9/frontend/image/photos-view.png)
200+
201+
##### Advanced Search & Filtering
202+
203+
The Smart Album includes powerful search and filtering capabilities to help you quickly find specific photos in your collection.
204+
205+
###### Quick Search
206+
207+
1. **Basic Text Search**
208+
- Use the search bar at the top of the Photos section
209+
- Search by photo name, file type, or any text field
210+
- Press Enter or click the search button to apply
211+
- Real-time suggestions appear as you type
212+
213+
###### Advanced Search Panel
214+
215+
1. **Accessing Advanced Search**
216+
217+
- Click the filter icon next to the search bar
218+
- The advanced search panel will expand below the search bar
219+
- Multiple filter criteria can be applied simultaneously
220+
221+
2. **Date Range Filtering**
222+
223+
- **Start Date**: Select the earliest date for photos to include
224+
- **End Date**: Select the latest date for photos to include
225+
- Use date pickers for precise date selection
226+
- Leave either field empty for open-ended ranges
227+
- Example: Find all photos from your vacation in July 2024
228+
229+
3. **Location-Based Search**
230+
231+
- Enter location names, cities, or places
232+
- Searches through photo location metadata
233+
- Supports partial matches (e.g., "Paris" will find "Paris, France")
234+
- Case-insensitive search
235+
236+
4. **Tag-Based Filtering**
237+
238+
- **Adding Tags**: Type tag names and press Enter or comma
239+
- **Multiple Tags**: Add multiple tags for more specific searches
240+
- **Tag Colors**: Each tag gets a unique color for easy identification
241+
- **Removing Tags**: Click the 'x' on any tag to remove it
242+
- **Auto-complete**: Suggests existing tags as you type
243+
- Example: Search for photos tagged with both "family" and "vacation"
244+
245+
5. **People Search**
246+
- Search for photos containing specific people
247+
- Enter names or identifiers
248+
- Useful for finding photos with friends, family members, or colleagues
249+
- Supports partial name matching
250+
251+
###### Filter Combinations
252+
253+
- **Multiple Criteria**: Use any combination of filters for precise results
254+
- **AND Logic**: All specified criteria must match (photos must meet every condition)
255+
- **Real-time Results**: Photo gallery updates instantly as you apply filters
256+
257+
![advanced-search](final-report-09/advanced-search.png)
258+
259+
##### Organizing with Albums
260+
261+
- Go to the **Albums** section
262+
- Create new albums with custom names and descriptions
263+
- Move photos between albums using the selection tools
264+
- Delete albums (photos will be moved to "Unfiled")
265+
266+
![albums-view](../../Software Engineering/team-project-25spring-9/frontend/image/albums-view.png)
267+
![albums-view-create](final-report-09/albums-view-create.png)
268+
269+
##### Using the Timeline
270+
271+
- Access the **Timeline** view to browse photos by date
272+
- Scroll through your photo history chronologically
273+
274+
##### Photo Editing
275+
276+
###### Basic Editing
277+
278+
1. Select a photo from any view
279+
2. Click the edit button or double-click the photo
280+
3. Use the built-in editor for:
281+
- Cropping and resizing
282+
- Applying filters
283+
- Adjusting brightness, contrast, and saturation
284+
- Adding text overlays
285+
286+
![photos-view-edit](../../Software Engineering/team-project-25spring-9/frontend/image/photos-view-edit.png)
287+
288+
##### AI Style Transfer
289+
290+
1. Navigate to the **Style** section
291+
2. Select photos you want to stylize
292+
3. Choose from available AI style presets
293+
4. Process and download your stylized images
294+
295+
##### Organizing with Tags
296+
297+
1. **Adding Tags**
298+
- Select photos in any view
299+
- Use the tag interface to add descriptive keywords
300+
- Create custom tag categories
301+
302+
![tag-add](../../Software Engineering/team-project-25spring-9/frontend/image/tag-add.png)
303+
304+
2. **Searching by Tags**
305+
- Use the search functionality to find photos by tags
306+
- Filter your photo library using tag combinations
307+
308+
![tag-search](../../Software Engineering/team-project-25spring-9/frontend/image/tag-search.png)
309+
310+
##### Advanced Features
311+
312+
###### Batch Operations
313+
314+
- Select multiple photos using the selection mode
315+
- Perform bulk operations:
316+
- Move to albums
317+
- Download as ZIP
318+
- Apply tags
319+
- Delete photos
320+
321+
###### Download and Export
322+
323+
- Download individual photos or entire albums
324+
- Export photos in original quality
325+
- Batch download selected photos as ZIP files
326+
116327
## Tests
117328

118329
### Tests for java backend
@@ -129,7 +340,7 @@ The low coverage for DTO classes and similar is due to the `@Data` annotation; i
129340

130341
[![img_3.png](final-report-09/img_3.png)
131342

132-
### Test for python backend
343+
### Tests for python backend
133344

134345
#### 1. Testing Tools and Frameworks
135346

@@ -158,7 +369,31 @@ def test_extract_exif_api():
158369
with open("tests/sample.jpg", "rb") as f:
159370
response = client.post("/extract_exif/", files={"file": ("sample.jpg", f, "image/jpeg")})
160371
assert response.status_code == 200
161-
assert "Timestamp" in response.json()
372+
assert "Timestamp" in response.json()
373+
374+
def test_generate_caption():
375+
with open(SAMPLE_IMAGE, "rb") as f:
376+
response = client.post("/generate_caption/", files={"file": ("sample.jpg", f, "image/jpeg")})
377+
assert response.status_code == 200
378+
assert "caption" in response.json()
379+
380+
381+
def test_auto_tag():
382+
with open(SAMPLE_IMAGE, "rb") as f:
383+
response = client.post("/auto_tag/", files={"file": ("sample.jpg", f, "image/jpeg")})
384+
assert response.status_code == 200
385+
assert "tags" in response.json()
386+
assert isinstance(response.json()["tags"], list)
387+
388+
389+
def test_process_image():
390+
with open(SAMPLE_IMAGE, "rb") as f:
391+
response = client.post("/process_image", files={"file": ("sample.jpg", f, "image/jpeg")})
392+
assert response.status_code == 200
393+
data = response.json()
394+
assert "Caption" in data
395+
assert "AutoTags" in data
396+
assert "PersonLabel" in data
162397
```
163398

164399
------
@@ -182,6 +417,10 @@ process_image.py 804 94 88%
182417

183418
**Test coverage above 85% is considered good.**
184419

420+
421+
422+
423+
185424
## Automated Build and Continuous Integration
186425

187426
To ensure maintainability, reproducibility, and deployment efficiency, we implemented an automated build pipeline using **Jenkins** in combination with **Docker**. This setup allows us to compile, assemble, and deploy our project in a fully automated manner, without manual intervention. Below is a detailed explanation of the technologies and steps involved.
49.1 KB
Loading
17.5 KB
Loading

0 commit comments

Comments
 (0)