Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@

Have you ever attended a wedding or a birthday party? If yes, you probably saw photo booth there. You get in, take a photo and paste it in the guest book - simple and fun. But what if we could bring this fun into the digital world? This is where **LensUp** comes to the rescue. **LensUp** is a web application that serves as a virtual gallery, allowing party guests to upload their photos from the event and also write down their wishes.

- [Project status](#project-status)
- [100 days roadmap](#100-days-roadmap)
- [How to run LensUp locally](#how-to-run-lensup-locally)
- [TODO list (100 days)](#todo-list-(100-days))

# Project status
# :mega: Project status
The video shows the project status as of `26.04.2024` and the core functionality of the application.
[![LensUp state](https://img.youtube.com/vi/73V7og0nS38/maxresdefault.jpg)](https://www.youtube.com/watch?v=73V7og0nS38)


# 100 days roadmap
# :rocket: 100 days roadmap

**Conclusion:** The main goal of 100 days plan is to deliver [core functionality](#core-functionality) related to adding photos and wishes. I also want to do that without any extra cost for Azure services. So whole app should works on local environment with azure simulators like Azurite. This fact forces certain application architecture decisions, because not all Azure services can be simulated locally. Additionally MVP version doesn't focus on authentication, authorization and security.

Expand Down Expand Up @@ -71,7 +66,7 @@ Description:



## How to run LensUp locally
## :bomb: How to run LensUp locally

You can run the project locally on your machine using Docker. Follow the steps below to run the application locally:

Expand Down Expand Up @@ -153,7 +148,7 @@ You can run the project locally on your machine using Docker. Follow the steps b

![lens-up-upload-flow](/docs/lens-up-upload-flow.gif)

## TODO list (100 days)
## :clipboard: 100 days TODO list

#### General aspects:

Expand Down
14 changes: 7 additions & 7 deletions backend-services/back-office-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

The project has typical .net project folder structure. Inside solution we can find 2 main catalogs- `src` and `tests`. Application code follows `Clean Architecture` approach and we can distinguish the following layers there:

:open_file_folder:**src** *(contains the actual source code for the application)*
​ **src** *(contains the actual source code for the application)*

:books:LensUp.BackOfficeService.API
- LensUp.BackOfficeService.API

:books:LensUp.BackOfficeService.Application
- LensUp.BackOfficeService.Application

:books:LensUp.BackOfficeService.Domain
- LensUp.BackOfficeService.Domain

:books:LensUp.BackOfficeService.Infrastructure
- LensUp.BackOfficeService.Infrastructure

:open_file_folder:**tests** *(contains test projects)*
**tests** *(contains test projects)*

:books:LensUp.BackOfficeService.UnitTests
- LensUp.BackOfficeService.UnitTests



Expand Down
67 changes: 66 additions & 1 deletion backend-services/gallery-service/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# LensUp.GalleryService
# LensUp.GalleryService

- [Intro](#intro)

- [Major responsibilities](#major-responsibilities)

---

## Intro

The project has typical .net project folder structure. Inside solution we can find 2 main catalogs- `src` and `tests`. Application code follows `Clean Architecture` approach and we can distinguish the following layers there:

​ **src** *(contains the actual source code for the application)*

​ - LensUp.GalleryService.API

​ - LensUp.GalleryService.Application

​ - LensUp.GalleryService.Domain

​ - LensUp.GalleryService.Infrastructure

​ - LensUp.GalleryService.WebhookTriggerSimulator

​ **tests** *(contains test projects)*

​ - LensUp.GalleryService.UnitTests



**Project Overview:**

- **Technology Stack:** .NET 8

- **Architecture:** Clean Architecture design

- **Functionality:** Gallery read side



## Major responsibilities

The primary purpose of this service is to read galleries data.

**Login:**

- Users can login to gallery and open it on device.

​ Dedicated endpoint:

```http
curl -X 'POST' \
'https://localhost:7205/Login' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"enterCode": "number"
}'
```



**WebhookTriggerSimulatorFunction:**

- Azure function created in `LensUp.GalleryService.WebhookTriggerSimulator` to read events from Azure Queue storage.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using FluentAssertions;
using LensUp.GalleryService.API.Controllers;
using LensUp.GalleryService.Application.Abstractions;
using LensUp.GalleryService.Application.Models;
using LensUp.PhotoCollectorService.Contracts.Events;
using Moq;
using Xunit;

namespace LensUp.GalleryService.UnitTests.Controllers;

public sealed class WebhookControllerUnitTests
{
private readonly Mock<IGalleryNotificationService> notificationServiceMock;
private readonly WebhookController uut;
public WebhookControllerUnitTests()
{
this.notificationServiceMock = new Mock<IGalleryNotificationService>();

this.uut = new WebhookController(this.notificationServiceMock.Object);
}

[Fact]
public async Task PhotoUploadedToGalleryHook_Should_Publish_Notification()
{
// Arrange
var eventPayload = new PhotoUploadedEventPayload("photoId", "galleryId", "photoUrl", DateTimeOffset.Now, "author", "wishes");
var @event = new PhotoUploadedEvent(eventPayload);

PhotoUploadedNotification? photoUploadedNotification = null;
string? galleryId = null;
this.notificationServiceMock
.Setup(x => x.SendPhotoUploadedToGalleryNotification(It.Is<string>(x => x == eventPayload.GalleryId), It.IsAny<PhotoUploadedNotification>()))
.Callback<string, PhotoUploadedNotification>((x, y) =>
{
galleryId = x;
photoUploadedNotification = y;
})
.Returns(Task.CompletedTask);

// Act
await this.uut.PhotoUploadedToGalleryHook(@event);

// Assert
this.notificationServiceMock.Verify(x => x.SendPhotoUploadedToGalleryNotification(It.Is<string>(x => x == eventPayload.GalleryId), It.IsAny<PhotoUploadedNotification>()), Times.Once);
photoUploadedNotification.Should().NotBeNull();
photoUploadedNotification!.Id.Should().Be(eventPayload.PhotoId);
photoUploadedNotification.Url.Should().Be(eventPayload.PhotoUrl);
photoUploadedNotification.AuthorName.Should().Be(eventPayload.AuthorName);
photoUploadedNotification.WishesText.Should().Be(eventPayload.WishesText);

galleryId.Should().Be(eventPayload.GalleryId);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\src\LensUp.GalleryService.API\LensUp.GalleryService.API.csproj" />
<ProjectReference Include="..\..\src\LensUp.GalleryService.Application\LensUp.GalleryService.Application.csproj" />
</ItemGroup>
</Project>
Binary file removed docs/lens-up-photo-collector-ui-form.png
Binary file not shown.
2 changes: 1 addition & 1 deletion ui-applications/packages/photo-collector-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ The main purpose of this UI is to upload user photo and wishes to backend servic

Route: **/upload-photo/{enterCode}**

![lens-up-photo-collector-ui-form](../../../docs/lens-up-photo-collector-ui-form.png)
![lens-up-photo-collector-ui-form](../../../docs/lens-up-upload-photo-form.png)