You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Live E2E against real Supabase + DB (opt-in):**
55
+
Requires environment variables for your real stack (`SPRING_DATASOURCE_URL`, `SPRING_DATASOURCE_USERNAME`, `SPRING_DATASOURCE_PASSWORD`, `SUPABASE_URL`, `SUPABASE_ANON_KEY`, `SUPABASE_JWT_SECRET`, `SUPABASE_STORAGE_BUCKET`). Runs only when `LIVE_E2E=true` is set to avoid accidental external calls.
56
+
```bash
57
+
LIVE_E2E=true mvn -Dtest=dev.coms4156.project.metadetect.e2e.ClientServiceLiveE2eTest test
58
+
```
59
+
This flow signs up a unique email, logs in via Supabase Auth, uploads `Spaghetti.png` from `src/test/resources/mock-images/Spaghetti.png`, lists images, and deletes the upload—exercising real DB/storage paths. If signup/login fail (e.g., Supabase creds misconfigured), the test will skip with the upstream error text to avoid red builds while still surfacing the root cause.
60
+
61
+
-**Manual Pulse checklist (against a running backend):**
62
+
1. Start MetaDetect (`mvn spring-boot:run`) with valid Supabase env vars loaded.
63
+
2. Open http://localhost:8080/ (Pulse landing page served from `src/main/resources/static`).
64
+
3. Submit the **Join Pulse** form with a fresh email/password; confirm the Supabase JSON response shows your email.
65
+
4. Log in with the same credentials; verify the response shows tokens and the UI saves the token banner.
66
+
5. Navigate to Pulse Studio (auto-redirect or http://localhost:8080/compose.html) and upload a sample image (e.g., `src/test/resources/mock-images/Spaghetti.png`) with a caption/labels.
67
+
6. Confirm the feed shows your new post and that the signed URL preview loads.
68
+
7. Delete the post from the feed; ensure the API returns 204 and the card disappears.
69
+
8. (Optional) Watch the AI banner on the card; it polls `/api/analyze/{imageId}` and should flip to **AI generated** once the backend marks the analysis `DONE`.
`client/` contains a lightweight social-style demo called **Pulse** that exercises the `/auth/signup` and `/auth/login` endpoints.
98
+
99
+
1. Start the MetaDetect backend (see steps above) so `http://localhost:8080` is available.
100
+
2. Run a tiny static server from the project root:
101
+
```bash
102
+
python3 -m http.server 4173 --directory client
103
+
```
104
+
3. Visit http://localhost:4173 in your browser. Submit either form to see the live API response in the right panel. After a successful login the client automatically routes you to the Pulse Studio page.
105
+
106
+
### Targeting another deployment
107
+
- Edit `client/config.js` and change `apiBaseUrl` to the host of any MetaDetect instance (e.g., a staging URL or a tunnel).
108
+
- The badge in the form header reflects the active base URL so you always know which backend you are exercising.
109
+
110
+
### What the demo covers
111
+
-**Sign up**: posts `{ email, password }` to `/auth/signup` and surfaces the raw Supabase JSON for convenient debugging.
112
+
-**Log in**: posts the same shape to `/auth/login`, displaying access/refresh tokens if enabled in your Supabase project.
113
+
- Responses can be copied to the clipboard for quickly pasting into tools like Swagger or HTTP clients.
114
+
115
+
### Pulse Studio — create/delete posts
116
+
- Open http://localhost:4173/compose.html in the same static server session.
117
+
- After logging in, the access token is automatically saved to your browser and reused by the Studio page.
118
+
- Use the composer to upload images via `/api/images/upload`, add captions/hashtags (mapped to the `note` + `labels` fields), and delete posts inline via `/api/images/{id}`.
119
+
- The feed retrieves your existing uploads with `/api/images` and pulls signed URLs per asset so you can actually preview the media.
120
+
- Each card automatically runs `/api/analyze/{imageId}` and labels posts with an **AI generated** banner whenever the backend reports `status=DONE`.
121
+
- Tokens stay hidden in the UI for safety; log in again from Pulse if you need to refresh credentials.
STILL UNDER DEVELOPMENT - PUSH TO ITERATION 2 - Sulay has been working very hard on this and it's good for next iteration
78
128
79
129
### 🐳 What is Docker?
80
130
Docker packages your application and its dependencies into a container so that it runs identically across any environment. It’s a portable and lightweight runtime environment — ideal for ensuring consistent deployments.
@@ -283,6 +333,8 @@ Cd in to code directory
283
333
Ran to generate report:
284
334
$HOME/pmd-bin-7.16.0/bin/pmd check -d src/main/java,src/test/java -R rulesets/java/quickstart.xml -f text -r pmd-report.txt
285
335
336
+
You can also run `mvn clean verify` to run pmd and test
337
+
286
338
287
339
288
340
## MetaDetect Endpoints
@@ -476,13 +528,39 @@ I used PMD to perform static analysis on my codebase, see below for the most rec
476
528
477
529

478
530
531
+
## Proof of Multiple Test Users in DB
532
+
We tested with two users uploading the same exact image to see if it caused conflicts, there were no conflicts and images were store sperately within DB.
533
+
534
+

535
+
536
+
## Proof of Images stored in Supabase Bucket
537
+
Wanted to show proof of Objects stored in DB.
538
+
539
+

540
+
541
+
## Proof of API Testing using Postman
542
+
Used Postman and Curl to Test our API routes
543
+
544
+

545
+
546
+
## Proof of Self-Documenting Code
547
+
Had a Ticket Dedicated to Going through each file and Ensuring there was javadocs and inline comments:
548
+
[[Chore] - Write JavaDoc comments for all non-trivial code #35](https://github.com/users/Jalen-Stephens/projects/5/views/1?pane=issue&itemId=135291288&issue=Jalen-Stephens%7CAdvanceJavaStudentEngineers%7C35)
549
+
550
+
## Documentation of AI Resources
551
+
Where AI was used it was heavily documented in the [citations.md](https://github.com/Jalen-Stephens/AdvanceJavaStudentEngineers/blob/main/citations.md)
552
+
553
+
## Project Management Tool
554
+
We used [Github Projects Kanban Board](https://github.com/users/Jalen-Stephens/projects/5) to Track development.
This repository using GitHub Actions to perform continous integration, to view the latest results go to the following link: https://github.com/Jalen-Stephens/AdvanceJavaStudentEngineers/actions
558
+
This repository using GitHub Actions to perform continous integration, to view the latest results go to the following link: [AdvanceJavaStudentEngineers/actions](https://github.com/Jalen-Stephens/AdvanceJavaStudentEngineers/actions)
483
559
484
560
Click on the latest job on the top under "X workflow runs" then Click 'build' under jobs finally click the drop down next to all the action items to read the logs made during their execution.
485
561
562
+
STILL UNDER DEVELOPMENT - PUSH TO ITERATION 2 - Sulay has been working very hard on this and it's good for next iteration
0 commit comments