
Explore how Spring framework auto configuration and REST API support pair with React Native's component-based, one-way data flow to create scalable, hybrid mobile apps.
Learn the architecture of a step-by-step React Native hybrid app with Spring Boot, covering server and mobile sides, MVC patterns, and secure APIs for user and product operations.
Prepare the server-side infrastructure by installing a database service and ensuring its background operation, configure the database workbench with root credentials, and use Intel's g and Java 8.
Explore the server side overview of a Spring Boot app, implementing user, product, and transaction CRUD with Spring Security, in an mvc architecture using Hibernate, Liquibase, and Lombok.
Install a Spring Boot project with Gradle, using Java and Spring Boot version 2.1.7. Add mvc, security, persistence API with Hibernate, rest repositories, and Liquibase for database migrations using MySQL.
Install lombok and configure it, then enable annotation processing in the settings to generate getters and setters for the server side.
Configure server-side properties by setting the Spring application name, data source credentials, and UTC time zone, while enabling automatic database creation and Liquibase change logs for schema updates.
Explore the entity diagram for a product management system, modeling users with role enumeration, products, and transactions that link users to products through many-to-one relations.
Explore how Hibernate maps Java objects to database tables, using entities, columns, and generated ids, defines one-to-one, one-to-many, many-to-one, and many-to-many relationships, and applies eager or lazy fetch strategies.
Create a user model class in the model package for a JPA entity with id, name, password, and a role via a Role class; include getters, setters, equals, and hashCode.
Create a product model class in the model package, map it to the product table as an entity with id, name, and price fields, and implement equals and hashCode.
Create a transaction model class with id, product, user, and purchase date, mapping product to transactions and user to transactions using jpa annotations, with getters, setters, equals, and hashCode.
Describe how Liquibase functions as a migration library for relational databases, using change sets and change logs to apply schema updates with rollback support.
Shows liquibase implementation for the user table (name, first name, role) via a master change log with change sets and a rollback to drop the table.
Create Liquibase change sets for the product and transaction models, including a new product table and test data. Add a transaction table and implement the scripts following an eBay-inspired approach.
Discover how Spring Data JPA repositories deliver generic CRUD operations by extending repository interfaces, using derived queries like findByUsername, and customizing with @Query and @Modifying.
Create a user repository interface that extends JpaRepository with user as the model and Long as the id, enabling Spring Data to handle CRUD and define findByUserName.
Create JPA repositories for product and transaction by extending the JPA repository interface with model and id types, enabling CRUD database methods.
Implement a user service in Spring by creating the interface and implementation, injecting the user repository, and providing save, update, delete, and find methods, with password encoding.
Create a product service with interface and implementation, annotate with service and transactional management, inject the product repository, and implement save product, update sale, lead product, and find all products.
Define and implement a transaction service: create interface, implement with a service class, annotate with service and transactional, connect to repository, and implement save and find all methods.
Explains server-side control by user roles, detailing admin and musician abilities like login, register, profile display, and admin access to view all users and see all products.
Explore how a rest controller handles http requests and responses with get, post, put, and patch mappings, including payloads and request parameters, and return via response entities.
Learn to create rest api methods in Spring using a rest controller and response entity to wrap headers, status, and body, with post, put, and delete mappings and request parameters.
Create a user rest controller in Spring, wire user, product, and transaction services via dependency injection, and map REST API requests for register, get user, purchase, and list products.
Develop an admin rest controller to manage users, products, and transactions by calling respective services for create, update, delete, and find operations, exposing clear API endpoints.
Explore how Spring Security manages login and authentication, including encrypted credentials, server-side decryption, and implementing a user details service with password encryption and access rules.
Implement Spring Security by customizing the default user details service. Create a user details service implementation to load users by username, handle not found cases, and authorize by role.
Learn spring security's default login, logout, and session handling with authorization filters validating credentials via form login or basic headers, and explore customization like public urls and stateless sessions.
Configure Spring security to permit cross-origin requests and login endpoints, secure api with admin role, enable http basic auth, disable csrf, and wire user details service with a password encoder.
Learn how JSON web tokens enable role-based authentication by generating a token on login, sending it via the authorization header, and validating it with server-side filters and expiration checks.
Configure json web token installation by setting a secret key and a one-day expiration in application properties, and implement an authorization header with a transient token in the user class.
Create a JSON web token provider class to generate tokens with username, authorities, and expiry, sign tokens with a robust algorithm, and retrieve authentication from authorization headers while validating expiry.
Create a custom json web token based authentication by extending the basic authentication filter, wiring the jwt token provider, and validating tokens to set the Spring security context.
Test the server side to verify backend functionality and reliability for the step-by-step React Native hybrid app powered by Spring Boot.
Prepare the mobile development infrastructure by installing the React Native command line interface, Android SDK, and an Android Studio emulator, and enable iOS builds on Mac.
Learn React Native basics: project creation via command line and npm libraries, exporting components, managing props and state, and elements like container, text, text input, checkbox, list, and activity indicator.
Learn to build a React Native hybrid mobile app with Spring Boot by creating user and product management UIs, and enabling login, registration, product detail access, and admin authentication.
Install and configure a React Native hybrid mobile app project named mobile product management, install dependencies like axios, react-navigation, react-native-gesture-handler, react-native-elements, react-native-vector-icons, rxjs, base64, and async storage, and link libraries.
debug react native on localhost and build android and ios applications. install android studio and xcode, set up sdk tools, create devices, and run react native run-android or run-ios.
Configure a step by step React Native hybrid app with Spring Boot, set app names, and build templates for login, register, home, product, detail, admin, and user pages.
Create model classes for user, role, and transaction in React Native with Spring Boot project by organizing models folder, defining fields and constructors, and adding a constraints rule class.
Create a user panel navigation menu in a React Native app using stack and side role navigation, wiring home, product, detail, and product list pages with icons.
Learn to build an admin panel navigation in a React Native hybrid app, using stack navigation, a side menu with icons, and routes for home, admin, and user pages.
Create a star shaped component using React Native style sheet, building styles for containers, logos, images, texts, tags, inputs, and buttons with danger and success alerts.
Implement a customizable side menu by creating a rover content component exported by default, using React.PureComponent for shallow state checks, then render via React Native views and a scroll view.
Learn to implement navigation routers in a React Native app, building stack navigators for login and register and separate user and admin flows managed by a router container.
Implement a default exported user service in a React Native app to call server-side REST APIs for login, logout, registration, and product operations, using axios, storage, and a BehaviorSubject.
Implement a login component in a React Native app, calling the user service, handling form changes and submission, showing a loading indicator, and redirecting when a current user exists.
Implement a React Native register component that uses a user service to submit form data, manage input state, and render the registration form.
Create custom header component using native elements, integrate icons and a logout function via user service, and render header with left menu, center title from props, and right logout icon.
Build the home page component for user and admin panels in a React Native app, fetch the current user from async storage, and render headers, logo, and a welcome message.
List products from user service on product page using a flat list with title and price; show loading indicator, use custom header, and navigate to detail page on item press.
Implement a product detail page in a React Native app by rendering product title, image, description, and price, and providing a purchase button with handling of user, messages, and loading.
Implement admin service class (default export) to perform get, post, put, and get all users via rest api endpoints, importing the user service and applying authorization headers for rule-based authentication.
Implement an admin page in the React Native app to list users, fetch data via admin service, and navigate to user details on item press, with a loading state.
Implement a user page component to display and edit user details, using native alert and image components, a custom header, and services to update or delete users.
Test the mobile app by running the server, choosing between direct main class execution or Gradle task, and validating on emulators or real Android devices with native run.
In this course, we will create a multi-platform hybrid mobile application. This application will support many basic concepts.
Our application will be product management system. In this system, we can manage products. Also, we will go on with user components like login, register, user list, user update, user delete...
All system will be implemented step by step so you can easily follow all lectures.
In our application, we will use:
Spring Boot: Spring Security, Model View Controller architecture, Rest Controllers, REST API...
Hibernate: Java Persistence API, Object Relational Mapping...
Liquibase: We won't implement to database changes manually...
MySQL: We will use it but we can migrate to other databases easily.
React-Native: We will use it for mobile application. We will consume server side data on React-Native with API calls.
Our project has two main components, one of them is backend and the other one is mobile side. On the backend, we will use Spring boot and we will serve the application via rest api endpoints. With using these rest api endpoints, we can access the backend code easily. And we can benefit from the functionalities of server side... On the other hand, on the mobile side, we will create a UI and we will display the server side data. To display this data, we will use rest-api. We will fetch the rest api with using http-client frameworks and we will parse them. Finally, we will show them on the mobile UI.