How abderrahmanec/notizenmaster works
The NotizenMaster project is a full-stack web application that is neatly divided into two primary components: a frontend implemented with ReactJS (using Material UI for the design) and a backend built with Spring Boot (using Java 17). The application’s purpose is to allow users to create, edit, and delete notes—with additional support for attaching images, tags, and handling a secure login mechanism using Spring Security combined with JWT for authentication.
Main Components
• Frontend Component:
• This part is built with ReactJS and uses Material UI for styling.
• It handles all user interface aspects such as note creation, editing, deletion, user registration/login, and viewing notes.
• It communicates with the backend via Axios for sending API requests.
• Backend Component:
• Implemented with Spring Boot, structured under packages for controllers, services, repositories, security, and models.
• It exposes RESTful APIs to manage notes, users, and images.
• Components such as AuthController, NoteController, ImageController, and corresponding services (AuthService, NoteService, ImageService) represent separate layers that manage requests, business logic, and data persistence.
• Security is enforced using Spring Security and JWT tokens (with dedicated classes like JwtAuthenticationFilter and JwtService).
• (Optional) Database:
• Although the file tree doesn’t explicitly detail the database configuration, the presence of repository interfaces (UserRepository, NoteRepository, ImageRepository) implies that a relational database is in use. You might show the database as an external component that stores users, notes, and images.
• Docker Containers:
• The project includes configuration for Docker and docker-compose, which encapsulate the frontend and backend into isolated containers. This is important for deployment and environment consistency.
Relationships and Interactions
• Users interact with the frontend (ReactJS), which renders UI components like Login, Register, NoteList, AddNote, etc.
• The frontend makes HTTP requests (using Axios) to the backend’s REST API endpoints.
• The backend forwards these requests to appropriate controllers, which then engage the service layer to perform business logic (e.g., authentication, note management).
• The service layer communicates with repository classes to query and update the database.
• Security filters (like JwtAuthenticationFilter) manage JWT authentication for protecting API endpoints.
• Optionally, the Docker layer orchestrates both frontend and backend containers, ensuring that the two systems operate together smoothly.
Architectural Patterns and Design Principles
• Separation of Concerns: Notice the clear separation between frontend and backend, as well as layered (MVC-like) structures in the backend (controllers, services, repositories).
• RESTful API Design: The backend exposes clear endpoints for various operations, while the frontend consumes these using API calls.
• Containerization: The use of Docker for packaging both components hints at a microservice-friendly environment, albeit here the services are packaged as two primary containers.
Relevant Technologies, Frameworks, and Libraries
• Frontend: ReactJS, Material UI, Axios.
• Backend: Java 17, Spring Boot, Spring Security, JWT, and Maven as the build tool.
• Database: While not explicitly specified, Spring repository layers indicate use of a relational database (likely configured within application.properties).
• Docker: Dockerfiles in both frontend and backend directories, along with a docker-compose.yml file, structure the deployment.