
Backend Server - Source Code | https://github.com/stevdza-san/BorutoServer
Android App - Source Code | https://github.com/stevdza-san/BorutoApp
Backend Server - Source Code | https://github.com/stevdza-san/BorutoServer
Android App - Source Code | https://github.com/stevdza-san/BorutoApp
Discover how the Kataura framework, a Kotlin-based coroutine-driven server for APIs, mobile and browser apps, enables modular plugins, serialization, routing, and authentication.
Download and install JetBrains IntelliJ IDEA for your Cater server, choosing Windows, macOS, or Linux and the free community version.
Manually create a Kotlin Ktor project in IntelliJ with Gradle Kotlin DSL, add Netty and Logback dependencies, and expose a hello world route.
Learn to generate a Ktor project with a few clicks using the start.cater.io project generator, selecting build system, server engine, and routing plugins for a backend server.
Compare cater server engines—netty, jetty, tomcat, and coroutine-based io—and contrast engine main with embedded server, including hocon config and code-based setup for testing endpoints.
Learn how to organize a Ktor server into multiple modules using extension functions on the application class, each with its own routes and plugins, such as a /book endpoint.
Explore how plugins extend the request-response pipeline in the cater framework, including routing and call-logging plugins, installed via the install function, with 200 and 404 logs.
Learn to handle requests and responses in a Ktor server by building endpoints, extracting query parameters and headers, and using content negotiation and redirects.
Learn how to serve static content such as html, text, and images using a static function and a resources directory, with optional remote paths like assets.
Auto-Reload feature does not work well. Sometimes it might work and sometimes might not. I've searched for an answer but it appears that this feature is still not stable. My suggestion would be not to use it for now. I'll make a new video however when something changes regarding that issue.
Set up a boruto server backend using the Kata framework, add routing, content negotiation, and Kotlin X serialization, then configure Gradle, Coin DI, and enable auto reload.
Install and configure Ktor plugins, including call logging, content negotiation with json serialization, and routing via application class extension functions, plus coin and default headers with a cache control header.
Create model classes for the backend, including a hero data class and an API response wrapper, to send paginated hero data as json. Annotate with serializable to enable json conversion.
Create a hero repository interface and implementation with get all heroes and search heroes, support pagination across five pages of three heroes each, using an API response model.
Create a root endpoint that returns a welcome message for the burrito api, organize a routes package with a route extension for get /, and test it.
Create the all heroes endpoint for the boruto app using Koin for dependency injection, with a cache-control header, and implement page query validation and API responses.
Develop and test the all heroes endpoint at boruto/heroes, which paginates 15 heroes across five pages using a page query, with page validation and previous/next page calculations.
Create a search heroes endpoint in a Kotlin Ktor server at boruto/heroes/search with a name query, returning matching heroes via the repository. Test the endpoint with Postman to verify results.
Explore how to install and configure the status pages plugin in a Ktor server, map exceptions and status codes to custom responses, including 404 and 500.
I've made an update video in the last section, about migrating from an old withTestApplication() function.
I've made an update video in the last section, about migrating from an old withTestApplication() function.
I've made an update video in the last section, about migrating from an old withTestApplication() function.
I've made an update video in the last section, about migrating from an old withTestApplication() function.
Set up a new Android Studio project with an empty compose activity and configure dependencies for navigation, retrofit, room, and serialization. Outline splash, onboarding, home, search, and detail screens.
Define a sealed screen navigation system with routes for splash, welcome, home, and details (hero id); implement a setup nav graph using a nav controller.
Create a hero entity for room database, with a non auto-generated primary key mapped via hero_table. Serialize backend data to json and cache it as the single source of truth.
Define hero dao with dao and query annotations to read all heroes, fetch by id, and support insert and delete via burrito database using room and paging source.
Create a hero remote key entity with id as non-null primary key. Include nullable previous and next keys in hero_remote_key_table and a Dao for get, insert, and delete.
Configure Dagger Hilt to provide a singleton room database builder across the app with a database module, and annotate the application and main activity for injection.
Switch the status bar color for dark theme and animate splash logo using Jetpack Compose Animatable with remember and launchedEffect to rotate 0–360 degrees in 1s, with a 200ms delay.
Accompanist Pager library has been DEPRECATED. You can check out the last section of this course where I've showcased how to migrate away from that library. If you have any questions, feel free to comment below. :)
Accompanist Pager library has been DEPRECATED. You can check out the last section of this course where I've showcased how to migrate away from that library. If you have any questions, feel free to comment below. :)
Accompanist Pager library has been DEPRECATED. You can check out the last section of this course where I've showcased how to migrate away from that library. If you have any questions, feel free to comment below. :)
Implement data store preferences to persist a boolean onboarding completed flag, read via flow, and drive splash navigation to home or welcome.
Create a repository injecting data store operations, implement two onboarding use cases (save onboarding state and read onboarding state), and provide them via the repository module.
Save the onboarding state when the user finishes the welcome flow. Navigate from splash to home or welcome screens using a welcome view model, Hilt, and use cases.
Designs the home screen top bar with a scaffold and top app bar, featuring an explore title and a search icon, plus theme-aware colors for light and dark modes.
Create the API response model with serializable annotation and implement Boruto API endpoints for getting all heroes with a page parameter and for searching by name.
Okay so here I've made a mistake, instead of using 'TimeUnit.SECONDS', I've used 'TimeUnit.MINUTES'. This mistake will be fixed in lecture under the name of 'Display Shimmer Effect' (#59)
Explore the paging three library for Android, paginate data from room databases or APIs, load pages on scroll, and apply paging config, pager, and map and filter operations.
In this video I've made one mistake. In the provideDatabase() function in DatabaseModule, as a return type, instead of "BorutoDatabase" I've added RoomDatabase. That will be fixed in the 'Create GetAllHeroes Use Case' video. :)
Implement the remote mediator and load() for paging, handling refresh, prepend, and append, while fetching remote keys and caching hero data from the Boruto API.
Implement the get all heroes use case wired to the repository and remote data source, returning a flow of paging data for the home screen.
Design a custom rating widget in jetpack compose and canvas that displays filled, half, and empty stars for a 1–5 rating, using vector path data from SVG.
Design an empty star composable by reusing the filled star code, adjust color alpha to 0.5, and add a preview to visualize the empty star in the three-star rating widget.
Implement a compose function that converts a decimal 1–5 rating into a map of field, half, and empty stars and renders them in a row with configurable spacing.
I have updated the code for Coil, from now on we are no longer using rememberImagePainter, now we are using an AsyncImage composable, which is the part of a Coil library. I've made a video about that update in the last section of this course.
Create and animate a two-tone shimmer loading effect for hero items in an Android app, using compose placeholders, alpha animation, and theme-aware colors.
Implement a lazy column that displays two animated shimmer items during data loading and then renders the hero list when loading completes.
Implement initialize() in the remote mediator to use local cache when data is fresh and trigger a remote refresh after the cache timeout, based on last updated.
Modify the server test function to handle the new last updated field in the api response class, by using actual.last_updated for assertions to avoid time-mismatch errors.
Explain how the server caching header enables the HTTP client to automatically cache data for one year, and demonstrate how cached image URLs persist when the server is down.
Learn to design a search widget and search screen for an Android app, including a top app bar, text field with icons, and a server search paging source.
Hoist the search query into a view model, observe and update it on each keystroke, and navigate from home to a search screen, ensuring the query survives configuration changes.
Here we haven't actually implemented a paging when searching heroes on our backend server. When searching we will receive all hero results in a single page. Because if you recall when sending a response from the server (Search Heroes endpoint), we are not including prevPage/nextPage values. I have decided not to use paging with our endpoint for searching heroes, because in most cases when searching items like that, you just expect to receive a single result matching the query.
However at the end of this course this will be actually your homework. After you complete this whole course you will gather the knowledge necessary to complete this homework, and properly implement paging with our search heroes endpoint as well. The solution will include modifying both server and android app project. It's gonna be fun! I will not upload a solution for that, instead you will have to send that homework directly to me, so I can check it out and maybe give you some hints. :)
By doing this kind of homework you will prove to not just me, but more importantly to yourself that you are capable of resolving this kind of issues directly with the real working projects.
And as I already said, I will make a new video at the end of this course explaining this homework. Best of luck!
Implement a search heroes use case, wire it through the repository and remote data source, and expose paging data of heroes to the search screen via the view model.
Display searched heroes on search screen, reuse list content and empty screen, fetch via search heroes use case from server, and cache results in ViewModel to survive rotation.
SwipeRefresh() composable has been deprecated. I've updated the source code in my Github repository. Check the latest branch (#10).
Demonstrates a details screen that uses a palette API to color the UI from hero images. Builds two custom components: info box and ordered list for a compose-based android app.
Create a reusable ordered list composable that displays a left-aligned title and numbered items, using a string list, a text color parameter, and material typography, with dark theme preview.
Create a local data source and its implementation to fetch a hero by id from Boruto database. Inject it into the repository and provide the get selected hero use case.
Design a bottom sheet content for the details screen in compose, showcasing the logo, hero name, info boxes, about text, and three lists with gesture-based expand and collapse.
Design a background content composable for the details screen that loads a hero image from a base URL with an error placeholder and a top-right close icon.
Implement details screen where the background image height adjusts with the bottom sheet, using a current sheet fraction and a minimum background image height to map collapse and expand states.
Animate the bottom sheet radius with a value tied to the current sheet fraction, applying 40 dp to the top corners when collapsed and 0 when expanded via rounded corners.
Explore the palette API to extract colors into a palette with six profiles. Use swatches, the builder, and color helpers such as body text color and title text color.
Create a palette generator object to convert image URLs to bitmaps and extract vibrant, dark vibrant, and body colors for text, using coil's image loader and the palette API.
Implement color palette extraction from hero images and apply vibrant colors to the details screen, including status bar updates, using a view model, shared flow events, and bitmap color extraction.
Create a fake burrito api to mock backend responses for testing the search heroes paging source, overriding search heroes logic with predefined heroes.
Test the search heroes paging source using a fake burrito API, validating single and multiple results, empty queries, and non existing heroes with JUnit and run blocking tests.
Create a second fake Boruto api for Android tests to support remote mediator testing, implementing get all heroes with paging logic and a calculate function for 1–5 pages.
Test hero remote mediator using an in-memory Boruto database and a fake Boruto api to verify loader results, end-of-pagination behavior, and error handling across three scenarios.
Explore how to write Android Jetpack Compose UI tests for a search widget, using semantics, content descriptions, and assert text input and close button behavior.
Learn how to test a rating widget in Jetpack Compose by adding semantics, creating a compose test rule, and validating empty, half, and filled stars across multiple values.
Explore an alternative backend pagination approach by using a single heroes list and a limit parameter to generate pages with a windowed function, implemented via a hero repository alternative.
Discover how Heroku, a platform-as-a-service, runs apps in managed dynos (web, worker, one-off) and supports Git or GitHub deployment with addons and documentation.
deploy your backend server on Heroku to expose the REST API globally, configure the CLI, Git, and a proc file, and switch from localhost to a public dyno endpoint.
Celebrate completing the course and apply critical thinking by examining the code, giving feedback, and proposing improvements for the project and its ongoing updates.
Clean up the Android app and server, update dependencies, and resolve library conflicts. Refactor the splash screen, fix side effects, and simplify navigation and paging logic.
Update dependencies and clean up code in a modern Android app using Compose, Navigation, Room, and Coil 2.0; migrate deprecated code and replace remember image painter with AsyncImage.
Learn to migrate a Ktor server from 1.6 to 2.0, updating dependencies and imports. Adjust Gradle and tests using testApplication and body as text.
Migrate to the new splash api by removing the old splash screen and implementing a unified splash with two xml files, theme changes, and onboarding-driven start destination.
Migrate from the deprecated accompanist swipe refresh and system ui controller by implementing pull refresh with a refresh state, updating status bar color via activity window, and noting deprecated dependencies.
Update #7 introduces kotlin script (kts) gradle updates, material three integration, and a pull to refresh box replacing swipe to refresh, with coroutine-based refreshing hide and adjusted bottom sheet behavior.
Migrate a Kotlin-based Ktor server to version 3, updating Gradle and Kotlin versions, and adopt new test patterns with the server test host, application blocks, and inject calls.
Hello there and welcome to my course!
This course will be special. Why? Well because I'm going to teach you how to build not just another android application, but also a backend server, your own REST API!
The main purpose of that server will be to provide the data to our Android Application. You will learn how to successfully establish a quality communication between client, or in this case our Android App, and a backend server.
For the backend we will use ktor framework which is built primarily on Kotlin and Coroutines! You will learn everything about that framework, how to create your own endpoints, how to work with client requests, receive query parameters, process that same request on your backend, and finally send a fully prepared response to your clients, or in this case an Android App which we are going to develop as well.
Now, our Android Application will use the newest API's and libraries. For designing our Application layout we will use a modern UI toolkit called jetpack compose. For communicating with our backend we will use a retrofit, and paging 3 library along with remote mediator, so we can automatically store and cache that data from the server into our Local ROOM database. That way we will be able to load the data into our Application, even if we don't have an internet connection.
And that's not all, I will also teach you how to test your Backend Server as well as your Android App. We are going to test all our server endpoints, the most important parts of our Android application and few custom UI components which we are going to build using Jetpack Compose! I'm going to teach you how to create a custom UI component called Rating Widget, using Jetpack Compose, it will look amazing!
Next you will learn how to implement a swipe to refresh functionality in your app, how to implement a palette API so you can display dynamic colors into your layout depending on the image we load into our Screen. And many other different things Bottom Line, there is a lot of work to do, so get ready, because this will be quite of a journey!
So what are you waiting for developers. Let's get started!