Build a Face Login Web App with Spring Boot, Vue, and Tencent Cloud API
Learn how to create a web-based facial recognition login system by setting up a Spring Boot backend with MySQL and JWT, integrating Tencent Cloud's face comparison API, and building a Vue 2.x frontend that captures webcam images, manages face data, and displays comprehensive CRUD interfaces.
Introduction
FACE-UI is a front‑back separated web project that implements a web‑based facial login system. It captures a photo via the front‑end webcam, sends it to the back‑end, and compares it with a stored face library to authenticate users.
Key technologies: Spring Boot, MySQL, JWT, Vue 2.x, and Tencent Cloud face comparison API. Core features include CRUD operations for face lists and logs, storing face images as Base64 in a custom face library, and invoking the cloud API for similarity matching.
Backend (Spring Boot)
1. Import project dependencies
After pulling the repository, import the required JAR files.
2. Project structure
3. Execute MySQL scripts
4. Configure Tencent Cloud
Reference: https://blog.csdn.net/Susan003/article/details/125914027
5. Set secretId and secretKey
After enabling the face service, add the secretId and secretKey to the application.yml configuration.
6. Run the application
Start the Spring Boot application by running FaceEasyApplication.
Frontend (Vue)
1. Install dependencies
npm install<br/># If you use the Taobao mirror
cnpm install2. Start the development server
npm run serve3. Login page
The initial login page shows a message that the database contains no faces. The first captured photo registers a new face; subsequent attempts verify the face.
Note: If the webcam is blocked, the capture will fail.
4. Home page
5. List pages
5.1 Add face
5.2 Edit face
6. Log list
The log list records recent login attempts and exceptions.
Project Repository
Backend project: https://gitee.com/susantyp/face-easy
Frontend project: https://gitee.com/susantyp/face-ui
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
