Full-Stack Online Photography Studio System with Java, Spring Boot, and MySQL
System Overview
The online photography studio platform is built using a modern web architecture based on Java, Spring Boot, and MySQL. This system enables efficient digital management of photographic content, user interactions, and administrative workflows. Designed for scalability and ease of use, it supports both administrators and end-users through a responsive B/S (Browser/Server) interface.
The core functionality includes user authentication, image curation, content categorization, dynamic banner menagement, social engagement features like comments and likes, and secure data handling via role-based access control.
Technical Stack
- Backend Language: Java 8+
- Framework: Spring Boot
- Frontend Technologies: Vue.js, JavaScript, CSS3
- Build Tool: Apache Maven 3.8.1
- IDEs: IntelliJ IDEA, Eclipse, or VS Code
- Database: MySQL 5.7 / 8.0
- Database Tools: phpMyAdmin, Navicat
- Node.js Version: 12, 14, or 16
Key Functional Modules
Administrator Panel
-
User Management
- View, add, edit, and remove user accounts.
- Real-time filtering and search capabilities.
-
Category Administration
- Define and manage photo categories (e.g., portrait, landscape, event).
- Support for hierarchical organization and status flags.
-
Banner Management
- Upload, update, and deactivate promotional banners.
- Configurible display order and duration.
-
Photography Content Oversight
- Review and moderate uploaded images.
- Bulk actions for approval, rejection, or deletion.
User-Facing Features
-
Image Bookmarking
- Users can save favorite photos to a personal collection.
- Persistent storage across sessions.
-
Social Feed (Photography Circle)
- Post updates, share insights, and interact with peers.
- Comment and like functionality integrated.
-
Photo Submission Portal
- Upload original works with metadata (title, description, tags).
- Pre-submission validation for file type and size.
Core Implementation Snippets
@RequestMapping("/users")
@RestController
public class UserProfileController {
@Autowired
private UserService userService;
@Autowired
private TokenService tokenGenerator;
/**
* Handle user login with JWT token generation
*/
@IgnoreAuth
@PostMapping("/signin")
public R authenticate(@RequestParam String email, @RequestParam String secret, HttpServletRequest httpRequest) {
UserEntity account = userService.getOne(new EntityWrapper<UserEntity>().eq("email", email));
if (account == null || !account.getPassword().equals(secret)) {
return R.error("Invalid credentials");
}
String jwtToken = tokenGenerator.generateToken(account.getId(), email, "user", account.getRole());
return R.ok().put("token", jwtToken);
}
/**
* Register new user with unique email check
*/
@IgnoreAuth
@PostMapping("/signup")
public R registerNewUser(@RequestBody UserEntity newUser) {
if (userService.getOne(new EntityWrapper<UserEntity>().eq("email", newUser.getEmail())) != null) {
return R.error("Email already in use");
}
userService.insert(newUser);
return R.ok();
}
/**
* Logout endpoint: invalidate session
*/
@GetMapping("/signout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("Session terminated");
}
/**
* Reset password to default for specified user
*/
@IgnoreAuth
@PostMapping("/reset")
public R resetPassword(@RequestParam String email) {
UserEntity user = userService.getOne(new EntityWrapper<UserEntity>().eq("email", email));
if (user == null) {
return R.error("Account not found");
}
user.setPassword("default123");
userService.updateById(user);
return R.ok("Password reset to 'default123'");
}
/**
* Retrieve paginated list of users
*/
@RequestMapping("/list")
public R fetchUsers(UserEntity filter) {
EntityWrapper<UserEntity> queryCondition = new EntityWrapper<>();
queryCondition.allEq(MPUtil.allEQMapPre(filter, "user"));
return R.ok().put("records", userService.selectListView(queryCondition));
}
/**
* Add new user record
*/
@PostMapping("/add")
public R createUser(@RequestBody UserEntity newUser) {
if (userService.getOne(new EntityWrapper<UserEntity>().eq("email", newUser.getEmail())) != null) {
return R.error("Duplicate email detected");
}
userService.insert(newUser);
return R.ok();
}
/**
* Update existing user details
*/
@PutMapping("/modify")
public R updateUser(@RequestBody UserEntity updatedUser) {
userService.updateById(updatedUser);
return R.ok();
}
/**
* Delete multiple users by ID
*/
@DeleteMapping("/remove")
public R deleteUsers(@RequestBody Long[] userIds) {
userService.deleteBatchIds(Arrays.asList(userIds));
return R.ok();
}
}
Design Considerations
- Secure authentication using JWT tokens.
- Input validation at both client and server levels.
- Role-based access control (RBAC) to restrict sensitive operations.
- Responsive UI powered by Vue.js with modular component design.
- Database normalization and indexing for optimal query performance.
This project serves as a practical example of full-stack development, suitable for academic projects, portfolio showcases, or enterprise-grade content management systems.