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.
The video shows the project status as of 08.06.2024
and the core functionality of the application.
Previous status video: 26.04.2024
Conclusion: The main goal of 100 days plan is to deliver 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.
-
Guest sees
Gallery UI
with other guest photos. He also sees QR code in the application corner. -
Guest scans QR code, which redirects him to
Photo Collector UI
and there he can upload photo and wishes. -
Photo Collector UI
send data toPhoto Collector Service
. -
Photo Collector Service
upload guest photo to blob storage. -
Photo Collector Service
add guest data to database. -
Photo Collector Service
publish event to queue. -
Gallery Service
receive the event and process it. -
Gallery Service
push notification about new photo in the gallery forGallery UI
, and thenGallery UI
adds new guest photo to gallery collection.
Description:
-
Backend services:
-
UI applications:
-
Azure Services:
- Table Storage
- Queue Storage
- Blob Storage
You can run the project locally on your machine using Docker. Follow the steps below to run the application locally:
-
Before we start you should generate
dev-certs
for LensUp on your machine. This operation is required to hosting ASP.NET Core images with Docker over HTTPS. So generate a certificate using these commands:dotnet dev-certs https -ep "%USERPROFILE%\.aspnet\https\lens-up.pfx" -p localCertPassword dotnet dev-certs https --trust
Replace
%USERPROFILE%
with your computer name. Example"C:\Users\Dell Precision 7520\.aspnet\https\lens-up.pfx"
For local development purposes, we will use the password
localCertPassword
. Do not change this, as the same password is used in thedocker-compose.yml
file.The above commands should generate a
lens-up.pfx
certificate, and should place it in the directory as shown in the screenshot below.This is necessary step, because docker-compose refers to that certificate!
-
Install
docker desktop
on your machine (skip if you already done it). -
Run your
docker desktop
application. -
In the main project directory (
lens-up
), where thedocker-compose.yml
file is located, run the commanddocker-compose build
. This will build 7 necessary LensUp images. The first time build may take a few minutes (up to 10 minutes). After completing these steps, you should see new images in the Docker Desktop application. -
After the build command, run the
docker-compose up
to start the entire infrastructure. You should see in Docker Desktop that 7 containers related to LensUp have been started. -
Now the entire application is running on your machine. You can use the following addresses:
-
Backend services:
LensUp.BackOfficeService.API
swagger - https://localhost:8085/swagger/index.htmlLensUp.GalleryService.API
swagger - https://localhost:8083/swagger/index.htmlLensUp.GalleryService.WebhookTriggerSimulator
- http://localhost:8086/LensUp.PhotoCollectorService.API
swagger - https://localhost:8081/swagger/index.html
-
UI applications:
-
LensUp.GalleryService.UI
- http://localhost:5001/ -
LensUp.PhotoCollectorService.UI
- http://localhost:5002/On LensUp.PhotoCollectorService.UI you will see error page, because you need to navigate to the view associated with a specific gallery, which you haven't created yet.
-
-
How to create your first gallery and have fun with LensUp?
-
Go to
LensUp.BackOfficeService.API
- https://localhost:8085/swagger/index.html -
Use
Create
endpoint to create your gallery. The endpoint returns the gallery identifier after it is created (1). -
Before using the gallery, we need to activate it. In that case use
Activate
endpoint and passgalleryId
andendDate
in request body. Remember theendDate
is validated and must be greater than the current time. Otherwise, your gallery will be treated as expired. The endpoint returns the galleryenterCode
after it is activated (1). -
With your gallery
enterCode
you can open your gallery usingLensUp.GalleryService.UI
- http://localhost:5001/Log in to your gallery using
enterCode
. -
Now you can scan gallery QR code and upload photos to it. The code redirects to a form for adding photos to the gallery. You can use browser tool to scan QR code or if it doesn't work you can just go to
http://localhost:5002/upload-photo/{enterCode}
. -
QR Code redirects you to add photo and wishes form. Now you can upload your data to gallery.
-
After successfully completing the form, we should see success notification and the photo should appear in the gallery.
- Set up monorepo infrastructure for backend
- Set up monorepo infrastructure for frontend
- Create LensUp running scripts
- Create documentation how to run LensUp locally
- Create movie tutorial "How to run LensUp locally"
- Create documentation how to run LensUp locally in WLAN network.
- Create shared common backend project
- Create coding rule set for backend services
- Create Queue package in shared common project
- Create Table Storage package in shared common project
- Crate Blob Package in shared common project
- Create project structure
- Create add user endpoint
- Create add gallery endpoint
- Create activate gallery endpoint
- Create project structure
- Create get gallery info endpoint
- Create gallery notification hub
- Create project structure
- Create add photo and wishes endpoint
- Create image resizer
- Create shared common frontend project
- Create coding rule set for frontend applications
- Create shared components in shared common frontend project
- Create Admin Panel (optional)
- Create login to gallery page
- Create main page with gallery
- Handle notifications from backend
- Add animations to gallery
- Add carousel for photos
- Create single page with add photo and wishes form