
Explore the full stack architecture for a Spring Boot and React app, detailing MVC-based server structure, repositories, services, controllers, and Hibernate ORM with authentication and role-based API access.
Install Java 11 as the course’s supported long-term version, explain why over newer releases, and detail downloading from Oracle and installing with default settings.
Install the sdk by googling, opening the community launch page, downloading for your operating system, and installing, while noting credential rules and using a password for future access.
Install IntelliJ and explore alternatives to set up your development environment for building a restful API with Spring Boot and React.
Install and configure Lombok, enabling annotation processing in settings to use its methods on the server side.
Install Postman to build, test, and modify API calls; learn to send HTTP requests, set headers, use JSON body, and convert calls to code.
Explore the Lombok library for Java to generate getters and setters, equals and hashCode, and immutable classes with @Data, @Value, and constructor annotations like @NoArgsConstructor and @AllArgsConstructor.
Discover how Spring implements dependency injection to decouple services from repositories, apply the dependency inversion principle, and use constructor, setter, and field injections with component annotations and Spring Boot configuration.
Explore how the @RequestParam annotation extracts query and form parameters (and headers) in Spring Boot, customize parameter names, set required flags, and provide default values in REST APIs.
Explore how the PathVariable annotation extracts template values and maps them to method parameters for rest APIs. Understand naming and how to make variables optional or required in Spring.
Understand how the @RequestBody annotation maps the HTTP request body to a Java object using Spring's HttpMessageConverters, with content types such as application/json and libraries on the classpath enabling conversion.
Implement a rest api using spring boot with get, post, put, and patch methods, secure user roles with spring security, and map database tables with hibernate for clean mvc architecture.
Create a Spring Boot backend project with Gradle and Java, import to IntelliJ, enable Lombok annotation processing, and configure dependencies like web, security, JPA, rest repositories, Lombok, validation, and MySQL.
We chose Gradle for easier configuration and better performance than Maven, highlighting incremental builds that skip unchanged tasks and parallel multi-module builds to shorten build times.
Configure application.properties to set data source credentials, utc timezone, create database if not exist, enable public key retrieval for sha-256 password with hibernate ddl auto create, update, or validate.
Learn how Hibernate maps objects to relational databases using entity, table, column, id, and generated value annotations, and model one-to-one, one-to-many, many-to-one, and many-to-many relationships with eager or lazy fetching.
Define a Spring Boot user model entity with id, name, userName, password, and a role enum. Use Lombok data to generate boilerplate, and auto-create the user table on run.
Explore JPA and Hibernate primary key generation strategies, including default auto, identity, sequence, and table generators, with practical examples and repository tests.
Explore how Java Persistence API (JPA) repositories extend with an entity and id. Derive queries from method names like findByUsername and use @Query and @Modifying for updates.
Create a user repository interface that extends JpaRepository, placed in a repository package, and define find by user name and find by password to enable Spring Data JPA CRUD operations.
Create a spring user service with interface and implementation in a package. Inject the user repository, configure password encoder, and implement methods to find by username and list all users.
Explore how Spring Security secures login, encrypts authentication headers and passwords, and enforces authorized access by configuring a user details service and access rules.
Explore the basic authentication flow in Spring Security, from http headers to the authentication manager, providers, security context, and authorization.
Implement a custom user details service in Spring Security, loading users by username from a repository, authorizing roles with granted authorities, and returning a secure user for authentication.
Explore Spring Security's default configuration, including form login, basic authentication, session handling, CSRF protection, and how to customize access rules and cross-origin settings.
Explore how spring security authenticates via filters and basic authentication. See how the provider manager delegates to authentication providers and loads the user from the database to verify credentials.
Explore authorization architecture in Spring Security, mapping permissions and roles to access decisions, and using voters with default, consensus, or unanimous strategies to grant secured resources.
configure a spring security setup with a security config class, cors rules, and stateless basic authentication to publicly expose error and login endpoints.
Explore how the spring rest controller handles requests and responses using get, post, put, and patch mappings, with request parameters and response entities to control payloads.
Create a user data transfer object with validation, organize it in a detail package, use Lombok for getters, and convert the DTO to a user model.
Learn how to build Spring REST API methods using ResponseEntity, which bundles HTTP headers, status, and body, and implement post, put, and delete mappings.
Create a user controller with a post mapping for registration, using request body to pass user data, inject a user service, and handle unique usernames with appropriate http responses at the api users endpoint.
Learn login authentication and get mappings in a Spring Boot REST API, leveraging security principal for authorized requests, basic authorization in headers, and testing endpoints with Postman.
Learn put mapping to update a user's role via a put request, and test the api/users endpoint with Postman.
Implement an admin controller with get all users and delete user endpoints, wired to a user service via dependency injection, and secure them with admin-only basic authorization.
Create a centralized exception handler for Spring rest controllers using controller advice, map validation errors to http status responses, and test the setup with Postman.
Learn how to reach backend services from the frontend by consuming REST API endpoints with HTTP requests and handling backend data in a React frontend.
Install node.js from the downloads page, download the latest stable version for your operating system, and install it with default configurations.
In this lesson, we install the react command line interface, using available resources found via Google, and complete the installation.
Explore core JavaScript concepts like var, let, and const, and compare their scope; harness destructuring for arrays and objects; and distinguish loose equality (==) from strict equality (===).
Learn how to set up and run React projects with npm and Create React App, manage components, props, and state, and understand basic rendering and lifecycle concepts.
Create a React client project with Create React App, name it appropriately, and run it with npm start to prepare for consuming the Supreme Court REST API data.
Explore the React project structure from package.json to index.js and index.html, and learn how React renders a single-page application with ReactDOM and StrictMode.
Configure the React project by installing Axios for HTTP requests, react-router-dom for routing, Bootstrap for styling, and Font Awesome icons, and describe their integration on the index page.
Explore building React page templates using class and functional components with hooks, defining public, user, and admin pages, plus login, register, profile, home, and error routes.
Configure React routing with browser, hash, and memory routers, map routes to login, register, profile, and home pages, and implement switch and redirect for a 404 page.
Explore how React Router handles links by comparing anchor tags, Link, and NavLink, focusing on active class names, strict and exact props, and trailing slash behavior.
This lesson builds 404 not found and 401 unauthorized error pages in a react app, using bootstrap containers, centered messages, and react-router link for smooth navigation.
Create a client side user model in React with constructors, organize it in the model package, and implement a role class for user and admin roles.
Explore observables in React as asynchronous data streams, showing how observers subscribe, handle next, error, and complete events, and how a session user can be shared across components with RxJS.
Learn how to fetch server data in a React app using axios, manage HTTP requests with promises, and organize data access through injectable service components.
Install RxJS npm package to enable observables in the app, since React does not include RxJS in newer versions, and we will install it.
Implement the user service as a default export with REST API calls for login, logout, and role changes. Track current user with a behavior subject and store in local storage.
Protect React components with an authentication guard that enforces role-based access for admin pages, showing unauthorized messages or redirecting as needed; implement a generic guard wrapper using props.
Implement an authentication guard in a React app to protect restricted routes, using a user service to check current user and roles, redirecting to login or unauthorized pages as needed.
Design a reusable template page with a bootstrap navigation bar for component pages, enabling left-side home and right-side sign up and sign in, with active links and login state handling.
Implement a React login page that wires the form to authentication service, manages input state, shows error messages, and redirects to profile on success, with a font awesome user icon.
Implement a login form in React using standard HTML inputs with bootstrap styling, manage state, handle validation, prevent default submission, and route to profile or registration.
Implement the register page by wiring the user service to submit a new user via a form. Include full name, username, and password fields, validation, loading states, and error handling.
Implement a profile page with user details using a user service, checking existence and redirecting to login if absent, and enabling role toggling (admin/user) with bootstrap-based ui.
Implement an admin service with authenticated get, post, and delete REST calls, using authorization headers from local storage and JSON content type to fetch users via the admin all API.
Implement the home page by fetching all users via services and displaying them in a bootstrap table, with error and info messages, and a lead action button.
We will create a new project in this course.
And we will implement this project with using Spring Boot, React, and MYSQL.
In our project, we will implement CRUD operations. And these CRUD operations will be requested from React.
Then This requests will be handled from Spring Boot.
Our project goes on User operations.
Our main operations will be user login, register, profile and user list.
Also, we will go on with role based application.
And this all things will be provided with secure way in both React and Spring Boot side.
We will have two main components to implement our project.
These are server side and client side.
In Server Side:
Spring Boot will be main thing.
Model View Controller structure will be implemented with using Spring Boot.
Our MVC structure will work like that:
First of all, the entity classes will be created under model package.
Later, if model class is permanent, we will create a repository for it.
Then we will call repository from services.
Finally, we will call services from from controllers.
In Spring Boot, Data will be presented to client as API call so Spring Rest Controller will be used to handle it.
We will use MySQL as Database.
We will also use Object Relational Mapping with Java Persistence API and Hibernate.
You know, We can map our database tables to objects with hibernate.
We will use JPA Repository and Crud Repository in Spring Boot.
So these repository templates will handle common database operations like save, update, find, delete.
With Spring Boot, we will also use Lombok library to clear code.
You know that we don't want to implement getter, setter, equals and hash code. So we can escape it using Lombok @Data or @Value annotation.
We will use Gradle To handle all dependencies on server side.
That's all about Server side.
Let's talk about Client Side.
React will be the main client controller.
React works on nodeJS.
In react, we will consume server side data with api calls.
To do it, we will create service classes.
In service: We can connect to server side and we can send requests or we can get responses from server side with http.
Then, we will call service data from components and we will render them.
Our User interface panel is contructed from admin operations and user operations.
In user operations:,
First of all, we will display test product data on home page. And these products can be purchased by users.
Secondly, we will implement login, register and profile pages for users.
In admin operations:,
We will implement user CRUD operations.
And of course, we will implement authentication and authorization for admin operations.