A demo web application for a Picture Publishing Website built with SpringBoot.
A Photo Publishing Service that can be used by sellers on an ecommerce website to upload photos of their products. The service is powered by Springboot and has an easy-to-use interface that allows sellers to quickly and easily upload photos and select a category for their products. All submissions are then reviewed by an admin before being approved or declined. This ensures that only high-quality, relevant photos are displayed on the ecommerce website, which can help improve the shopping experience for customers. By using our Photo Publishing Service, sellers can easily showcase their products to potential customers, while the admin can ensure that only the best photos are displayed on the website.
The client needs a website where registered and logged in users can upload pictures for acceptance or rejection. An administrator will login and review all submissions. Accepted pictures will be assigned a URL which can be accessed by all users (without login). Rejected pictures have their pictures removed but the metadata remains
- End-users can register.
- Registration information: email address, password
- Landing page shows all accepted pictures' URLs
- NON-logged in users can click on the links to see the pictures
- Logged in users can upload a picture along with following fields:
- description
- picCategory
- only three fixed categories: living thing, machine, nature
- attachment (up to 2 Mb) (jpg, png, gif only)
- An administrative appUser can login to a separate admin page
- a built-in admin with a username "admin" and password "admin123"
- Administrative appUser sees list of uploaded pictures
- list of all uploaded, unprocessed pictures
- anything that was accepted or rejected does not show up here
- Admin can select a picture to process it
- opens a new page showing description, picCategory, picture dimensions, and displays picture
- has two buttons "Accept", "Reject".
- if "Accept" is pressed, a URL is autogenerated for that picture, and can be displayed on the Landing page.
- if "Reject" is pressed, the picture file will be removed from storage, and the data record marked as "Rejected".
- the backend database should be an open source standard SQL variety of PostgreSQL
- must provide scripts for deployment and running unit tests
- the entire project: code and database
- instructions on how to deploy it
- REST API documentation (Swagger preferred but anything clear is fine)
Embedded Swagger Documentation
- Just load this project on your preferred IDE e.g. Intellij or Netbeans ...etc and Maven will load all dependencies and configure directories.
- Create an empty database with the name provided in the application configuration and the JPA will create the schema
- install maildev form npm to receive the confirmation token emails for new register users
npm install -g maildev
- There are 2 provided users by default
- appUser: muhammad-saad-01@outlook.com
- password: adminUser
- role/authority: ADMIN
- appUser: hello@muhammad-saad.net
- password: appUser
- role/authority: USER
- maven clean install to get the JAR file
-
Spring Security with Thymeleaf integration
properly will recreate the project without thymeleaf integration
-
Spring Security forbidden authorization for some requests
properly CORS problem