How abdulalimswe/contestplatform works
• Frontend: Represented by the "frontend" directory containing ReactJS code, assets, and components. Note the usage of Ant Design for UI elements.
• Backend: Represented by the "src/main/java/main" package where controllers, services, repositories, entities (model), and configuration (e.g., SecurityConfig, WebMvcConfig) reside. Highlight that the backend follows Spring Boot conventions.
• Additional Components:
• Compiler Module: There is a dedicated compiler component in the frontend ("frontend/src/compiler") and a CompilerController plus CompilerService in the backend.
• Authentication & Authorization: With Spring Security and JWT, mark this as a key middleware and secure service.
• Views/Static Content: Note that front-end templates inside "src/main/resources/templates" are used alongside React for rendering certain pages.
Establish the Relationships and Data Flow
• API calls for user authentication, problem submission, code testing, and contest management.
• Backend controllers to their respective services, which in turn call the repositories to interact with the MySQL database.
• Connections from the backend’s compiler endpoints to the compiler service that probably performs code compilation and testing.
• Authorized endpoints that require JWT validation (through Spring Security’s filters).
Architectural Patterns and Design Principles
• MVC Pattern in Backend:
• Controllers (e.g., CompilerController, MainController, and various controllers for user and contest functionalities).
• Service Layer (e.g., CompilerService, contestListService, CustomUserDetailsService).
• Data/Repository Layer (e.g., ProblemRepository, UserRepository).
• Singleton Design Pattern: Noted in the README, emphasize its usage in specific components if applicable.
• Component-Based Frontend Design: The frontend uses a modular component structure (e.g., separate folders for Header, Footer, Pages).
Relevant Technologies, Frameworks, and Libraries
• Frontend Technologies: ReactJS, Ant Design, with supporting files like package.json and the public assets.
• Backend Technologies: Spring Boot (using Java 21), Spring Security with JWT, and MySQL.
• Build Tools: Maven (noted by pom.xml and .mvn directory) and package-lock.json for the React dependencies.
• Email Verification and Password Recovery functionalities may be noted as part of the authentication flows.
• To the right, represent the Backend where you split the different layers (Controllers, Services, Repositories) in separate compartments. Show how controllers like CompilerController, MainController, and various user controllers connect to specific services.
• Backend with the Database (MySQL) through the repositories.
• External elements such as email services for verification or password recovery if they are present though implied.
• Security-related flows showing that all incoming REST calls are preceded by JWT authentication and filtered by the security components.