K-Learn is a modern web-based platform for learning Korean language with comprehensive 4-skill training (Listening, Speaking, Reading, Writing). Built with Spring Boot 3.2.5 and Thymeleaf.
Key Features:
- 📚 Structured course system (4 levels: Beginner I-II, Intermediate I-II)
- 🎮 Gamification (XP, Badges, Streaks)
- 🗣️ Speaking practice with pronunciation scoring
- 📱 Responsive design with dark mode
- 🏫 Community study rooms (WebSocket)
- 🏆 Leaderboard system
| Layer | Technology |
|---|---|
| Backend | Spring Boot 3.2.5, Spring Data JPA, Spring Security |
| Frontend | Thymeleaf, HTML5, CSS3, Vanilla JavaScript |
| Database | MySQL 8.0+ (UTF-8mb4) |
| Build | Maven 3 |
| Testing | JUnit 5, Mockito |
| Java Version | Java 17+ |
- Java 17+
- Maven 3.8+
- MySQL 8.0+
-
Clone the repository
git clone <repository-url> cd project-k-learn-se2a
-
Configure MySQL Database
mysql -u root -p CREATE DATABASE klearn CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -
Update Database Credentials Edit
src/main/resources/application.yml:spring: datasource: username: root password: your_password
-
Build the Project
mvn clean install
-
Run the Application
mvn spring-boot:run
The app will start at:
http://localhost:8088
src/
├── main/
│ ├── java/com/klearn/
│ │ ├── config/ (Configuration classes)
│ │ ├── controller/ (REST & MVC controllers)
│ │ ├── dto/ (Data Transfer Objects)
│ │ ├── exception/ (Custom exceptions)
│ │ ├── model/ (JPA entities)
│ │ ├── repository/ (Data access layer)
│ │ ├── security/ (Authentication & Authorization)
│ │ └── service/ (Business logic)
│ └── resources/
│ ├── application.yml (Main configuration)
│ ├── application-{dev,test,prod}.yml
│ ├── schema.sql (Database initialization)
│ ├── logback-spring.xml (Logging config)
│ ├── templates/ (Thymeleaf templates)
│ └── static/ (CSS, JS, images)
└── test/
└── java/com/klearn/ (Unit tests)
- dev: Development (ddl-auto: update, logging: DEBUG)
- test: Testing (ddl-auto: create-drop, test database)
- prod: Production (ddl-auto: validate, HTTPS enabled)
Run with specific profile:
mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=dev"For production:
export SPRING_DATASOURCE_USERNAME=klearn_user
export SPRING_DATASOURCE_PASSWORD=secure_password
export SSL_KEYSTORE_PASSWORD=keystore_passwordKey tables:
- user: User accounts with XP, level, streaks
- course: Learning courses
- lesson: Individual lessons
- exercise: Practice exercises (listening, reading, etc.)
- user_progress: Track user progress per lesson
- user_badge: Earned badges
- lesson_result: Results of completed lessons
- Session-based Authentication via Spring Security
- CSRF Protection enabled
- Secure Password Hashing with BCrypt
- Input Validation with Bean Validation (@Valid)
- SQL Injection Prevention via parameterized queries
Run all tests:
mvn testRun specific test class:
mvn test -Dtest=CourseServiceTestCurrent test coverage:
- ✅ XpServiceTest
- ✅ StreakServiceTest
- ✅ BadgeServiceTest
- ✅ CourseServiceTest
All errors are handled globally via GlobalExceptionHandler:
- Validation errors (400)
- Resource not found (404)
- Internal server errors (500)
Error templates: templates/error.html, templates/404.html, templates/500.html
- ✅ Updated MySQL Connector (8.0.33 → 8.2.0) - Fixed CVE-2023-22102
- ✅ Migrated
application.properties→application.ymlwith profiles - ✅ Added environment-specific configurations (dev/test/prod)
- ✅ Implemented Global Exception Handler with custom exceptions
- ✅ Created error templates (404, 500, error)
- ✅ Added request validation DTOs (RegisterRequest, LoginRequest)
- ✅ Created comprehensive unit tests (Streak, Badge, Course services)
- ✅ Added structured logging with Logback
- ✅ Created KLearnProperties config class
- Performance optimization (caching, indexing)
- REST API enhancement
- Frontend improvements
- Speech recognition integration for speaking exercises
- Automated writing exercise evaluation
- Profile picture upload functionality
- Password reset via email
- User progress export/reports
- Mobile app version
- Docker containerization
CourseService: Course and lesson managementXpService: XP and level calculationStreakService: Daily streak trackingBadgeService: Badge earning logicAuthService: Authentication handling
Public:
GET /- Home pagePOST /auth/login- LoginGET /auth/logout- Logout
Protected:
GET /dashboard- User dashboardGET /courses- List coursesGET /courses/{id}- Course detailsGET /courses/{id}/lessons- Course lessonsGET /flashcards- FlashcardsGET /quiz- QuizGET /leaderboard- LeaderboardGET /profile- User profile
- Create a feature branch
- Make changes with tests
- Ensure all tests pass
- Submit pull request
This project is part of SE2 course at [University Name]
- Database Design: [Team]
- Backend Development: [Team]
- Frontend Development: [Team]
For issues and questions:
- GitHub Issues: [Link to issues]
- Email: support@klearn.local
Last Updated: April 14, 2026