Complete Spring Boot mastery through three progressive projects demonstrating enterprise development practices, from basic REST APIs to advanced HATEOAS-compliant services with security and modern architecture patterns.
This repository documents a comprehensive full-stack web development learning journey through three progressive Spring Boot projects, each building upon previous concepts while introducing new enterprise development patterns.
Project 1: RESTful User Management API Foundation project focusing on core REST API principles, CRUD operations, and Spring Boot fundamentals. Demonstrates basic controller-service architecture with in-memory data storage and comprehensive API testing.
Project 2: Enterprise E-commerce Application Advanced project implementing authentication, authorization, and security features. Covers Spring Security integration, role-based access control, JPA persistence, and web interface development with Thymeleaf templates.
Project 3: Digital Library HATEOAS API Specialized project demonstrating hypermedia-driven API design following HATEOAS principles. Showcases advanced REST API maturity levels with self-descriptive services and discoverable navigation through hypermedia links.
The projects demonstrate progressive mastery of:
- Architecture: From simple MVC to complex enterprise patterns
- Persistence: In-memory storage to JPA with relational databases
- Security: Basic validation to comprehensive authentication systems
- API Design: Simple REST to HATEOAS-compliant hypermedia services
- Testing: Manual testing to automated CI/CD pipelines
- Professional Practices: Clean code, proper documentation, and deployment readiness
Location: Root directory
A comprehensive full-stack web application demonstrating enterprise-level development practices including authentication, authorization, CRUD operations, and modern web technologies.
- Framework: Spring Boot 3.3.4
- Security: Spring Security 6.x with BCrypt encryption
- Data Access: Spring Data JPA with Hibernate
- Database: H2 in-memory database
- Frontend: Thymeleaf with Bootstrap 5.1.3
- Build Tool: Maven
- Role-based access control (ADMIN/USER)
- Complete product management system
- Form-based authentication with session management
- Responsive web interface with Bootstrap
- RESTful API endpoints with proper HTTP status codes
- Spring Boot Actuator for monitoring
Default Users:
- Admin:
admin/admin123(Full CRUD access) - User:
user/user123(Read-only access)
| Method | Endpoint | Description | Access Level |
|---|---|---|---|
GET |
/products |
View all products | All users |
GET/POST |
/products/add |
Create new product | ADMIN only |
GET/POST |
/products/edit/{id} |
Update product | ADMIN only |
GET |
/products/delete/{id} |
Delete product | ADMIN only |
GET |
/products/api |
Get all products (JSON) | All users |
Complete and fully functional with comprehensive security implementation and user interface.
Location: Creating RESTful endpoints/demo/
A focused REST API project demonstrating fundamental CRUD operations and Spring Boot basics.
- Java 21 with Spring Boot 3.5.5
- Spring Web MVC for REST endpoints
- Maven for dependency management
- In-memory storage with HashMap
| Method | Endpoint | Description | Status |
|---|---|---|---|
GET |
/api/users |
Get all users | Tested |
GET |
/api/users/{id} |
Get user by ID | Tested |
POST |
/api/users |
Create new user | Tested |
PUT |
/api/users/{id} |
Update user | Tested |
DELETE |
/api/users/{id} |
Delete user | Tested |
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}
Learning Focus
REST API design principles, HTTP methods and status codes, JSON serialization, service layer architecture, and comprehensive API testing with Postman.
Project 3: Digital Library HATEOAS API
Location: digilib/
A HATEOAS-compliant REST API demonstrating hypermedia-driven web service design.
Technologies
Java 21 with Spring Boot 3.5.5
Spring Data JPA for persistence
Spring HATEOAS for hypermedia support
H2 Database for in-memory storage
HATEOAS Implementation
Self-descriptive API responses with navigation links
Client discovery of available actions through hypermedia
Richardson Maturity Model Level 3 compliance
Sample Response
json{
"id": 1,
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"isbn": "978-0-7432-7356-5",
"publicationYear": 1925,
"_links": {
"self": {
"href": "http://localhost:8080/books/1"
}
}
}
Sample Data
Pre-loaded with three classic books: The Great Gatsby (1925), To Kill a Mockingbird (1960), and 1984 (1949).
Getting Started
Prerequisites
Java 21+
Maven 3.6+
Git
Running Any Project
bash# Navigate to project directory
cd [project-directory]
# Build and run
mvn spring-boot:run
# Access application
# Project 1: http://localhost:8080
# Project 2: http://localhost:8080/api/users
# Project 3: http://localhost:8080/books/{id}
Professional Development Outcomes
Each project represents a complete, production-ready application showcasing:
Clean architecture and SOLID principles
Comprehensive documentation and testing
Professional git workflow practices
Security-first design considerations
Scalable and maintainable code structures
This repository serves as both a learning record and demonstration of progressive skill development in enterprise Java development and modern web application architecture.
# Spring Boot Streaming Application
A real-time video streaming application built with Spring Boot and deployed live on AWS EC2.
## **LIVE DEMO**
**Try it now:** [http://ec2-54-167-31-37.compute-1.amazonaws.com:8080](http://ec2-54-167-31-37.compute-1.amazonaws.com:8080)
## Features
- ** Real-time Video Streaming** using WebRTC technology
- ** Live Chat** during streams with WebSocket messaging
- ** Room Management** - Create and join streaming rooms
- ** Responsive UI** built with Bootstrap 5
- ** Multi-participant Support** with real-time participant management
- ** AWS Cloud Deployment** on EC2 with proper security configuration
- ** Real-time Communication** via SockJS and STOMP protocols
## Technology Stack
### Backend
- **Spring Boot 3.1.5** - Main application framework
- **WebSocket + STOMP** - Real-time communication
- **Spring Data JPA** - Data persistence
- **H2 Database** - In-memory database for demo
- **Maven** - Build and dependency management
### Frontend
- **HTML5 + CSS3** - Modern web standards
- **Bootstrap 5** - Responsive UI framework
- **JavaScript ES6+** - Client-side interactivity
- **WebRTC** - Peer-to-peer video streaming
- **SockJS** - WebSocket fallback support
### Infrastructure
- **AWS EC2** - Amazon Linux 2023 hosting
- **Java 17** - Runtime environment
- **Systemd** - Service management
- **Git** - Version control
## Project Structure
StreamingApp/ ├── src/main/java/com/demo/streaming/ │ ├── StreamingApplication.java # Main Spring Boot application │ ├── config/ │ │ └── WebSocketConfig.java # WebSocket configuration │ ├── controller/ │ │ ├── StreamController.java # WebSocket message handling │ │ └── WebController.java # Web page controllers │ ├── model/ │ │ ├── StreamMessage.java # Message data model │ │ └── StreamRoom.java # Room data model │ ├── repository/ │ │ └── StreamRoomRepository.java # Data access layer │ └── service/ │ └── StreamingService.java # Business logic ├── src/main/resources/ │ ├── templates/ # Thymeleaf HTML templates │ │ ├── index.html # Home page │ │ ├── create.html # Room creation │ │ ├── stream.html # Streaming interface │ │ └── error.html # Error handling │ └── application.properties # Configuration ├── pom.xml # Maven dependencies └── README.md # This file
## Quick Start - Local Development
### Prerequisites
- **Java 17+** installed
- **Maven 3.6+** installed
- **Git** for cloning
### Clone and Run
```bash
# Clone the repository
git clone https://github.com/corneyc/full-stack-web-development-course.git
cd full-stack-web-development-course/StreamingApp
# Build the application
mvn clean package
# Run locally
mvn spring-boot:run
# OR
java -jar target/streaming-app-1.0.0.jar
Local access: http://localhost:8080
-
Launch Amazon Linux 2023 EC2 instance
-
Install dependencies:
sudo yum update -y sudo yum install -y git maven java-17-amazon-corretto
-
Configure Security Group:
- SSH (22): Your IP or 0.0.0.0/0
- Custom TCP (8080): 0.0.0.0/0
# Clone repository
git clone https://github.com/corneyc/full-stack-web-development-course.git
cd full-stack-web-development-course/StreamingApp
# Build and run
mvn clean package
java -jar target/streaming-app-1.0.0.jar# Run in background
nohup java -jar target/streaming-app-1.0.0.jar > app.log 2>&1 &
# Monitor logs
tail -f app.log- Click "Create New Room"
- Fill in room name and description
- Set maximum participants
- Click "Create Room & Start Streaming"
- Browse active rooms on the home page
- Click "Join Stream" on any room
- Enter your name
- Allow camera/microphone access
- Video Controls: Toggle camera and microphone
- Live Chat: Send messages to all participants
- Participant List: See who's in the room
- Room Management: View participant count and limits
- WebRTC: Direct peer-to-peer video streaming
- WebSocket: Real-time chat and signaling
- Responsive Design: Works on desktop and mobile
- Room Persistence: Rooms stored in database
Key configurations in src/main/resources/application.properties:
# Server Configuration
server.port=8080
# Database (H2 in-memory for demo)
spring.datasource.url=jdbc:h2:mem:streamingdb
spring.jpa.hibernate.ddl-auto=create-drop
# WebSocket
spring.websocket.sockjs.heartbeat-time=25000
# Development Tools
spring.h2.console.enabled=true
spring.thymeleaf.cache=falseFor production deployment, consider:
- External database (PostgreSQL, MySQL)
- HTTPS/SSL configuration
- Load balancer setup
- CloudWatch logging
- Auto-scaling groups
1. Connection Timeout
- Check EC2 security group allows port 8080
- Verify application is running:
ps aux | grep java - Check logs:
tail -f app.log
2. WebRTC Not Working
- Ensure HTTPS for production (WebRTC requires secure context)
- Check browser permissions for camera/microphone
- Verify WebSocket connection in browser dev tools
3. Build Failures
- Verify Java 17+ installed:
java -version - Check Maven installation:
mvn -version - Ensure all source files are present
# Check application status
ps aux | grep java
sudo netstat -tlnp | grep 8080
# View application logs
tail -f app.log
# Test local connectivity
curl http://localhost:8080
# Get public IP
curl http://169.254.169.254/latest/meta-data/public-ipv4- HTTP only (port 8080)
- Open security groups (0.0.0.0/0)
- H2 in-memory database
- No authentication required
- HTTPS/SSL with valid certificates
- Restricted security groups to known IP ranges
- Authentication system for room access
- External database with backups
- WAF protection against common attacks
- Rate limiting for API endpoints
- Application health:
http://your-domain:8080/actuator/health - Database console:
http://your-domain:8080/h2-console
# View application logs
tail -f app.log
# System logs
sudo journalctl -u your-service-name -f- Use CloudWatch for AWS metrics
- Monitor memory and CPU usage
- Track WebSocket connection counts
This project is part of a full-stack web development course. Contributions and improvements are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is created for educational purposes as part of a full-stack web development course.
- Spring Boot framework for rapid development
- AWS for reliable cloud hosting
- WebRTC for peer-to-peer communication
- Bootstrap for responsive UI components
Visit the live application: http://ec2-54-167-31-37.compute-1.amazonaws.com:8080
Create a room, invite friends, and start streaming.