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.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Build a Face Login Web App with Spring Boot, Vue, and Tencent Cloud API

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 install

2. Start the development server

npm run serve

3. 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

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Spring Bootface recognitionVue.jsWeb DevelopmentTencent Cloud
Java High-Performance Architecture
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.