Skip to content

skoda-exe/Web-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Education Platform

Spring Boot education platform for lab work #1.

Highlights

  • REST API for registration, login, course CRUD (create limited to teachers) and "current user" endpoint
  • PostgreSQL + Flyway migrations (users, courses, achievements, course enrollments)
  • MapStruct DTO mapping, Bean Validation, centralized error handler
  • JWT auth with role based access (STUDENT, TEACHER, ADMIN)
  • Optimistic (@Version) and pessimistic (@Lock) locking, explicit transactional propagation/isolation
  • Swagger UI (/swagger-ui.html) + Postman collection (src/main/resources/postman/education-platform.postman_collection.json)
  • Logging/observability via Spring Actuator (/actuator/health, /actuator/info, /actuator/metrics)
  • "First course" achievement is granted on the first enrollment

Run locally

  1. Install JDK 17+ and Maven.
  2. Provision PostgreSQL database education (or edit spring.datasource.url).
  3. Update spring.datasource.username/password plus app.jwt.secret if needed.
  4. Start the app and run migrations:
    mvn spring-boot:run
  5. Use Swagger UI (http://localhost:8080/swagger-ui.html) or the Postman collection.

Quick verification flow

  1. POST /api/auth/register — create ADMIN and TEACHER users.
  2. POST /api/auth/login — obtain each JWT token.
  3. POST /api/courses (teacher token) — create a course.
  4. Register/login a STUDENT and call POST /api/courses/{id}/enroll.
  5. GET /api/users/me — verify the achievement plus role data.
  6. GET /api/courses — confirm it is public while other endpoints require Bearer tokens.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages