ktor-api-client is a powerful open-source Kotlin project that demonstrates how to build modern, scalable RESTful APIs using the Ktor framework.
This API client supports both Firebase Firestore and MySQL for data storage, and includes authentication APIs like login, register, and user listing with image upload support.
- ✅ Build production-ready REST APIs in Kotlin
- 🔥 Integrates with Firebase Firestore and MySQL
- 🧪 Fully working Ktor authentication API example
- 📁 User image uploads stored locally in the
/uploads
directory - 💻 Perfect for backend developers learning Ktor + Kotlin + Firestore + MySQL
Authenticate user credentials.
Request Body:
{
"email": "user@example.com",
"password": "password123"
}
Register a new user.
Request Body (multipart/form-data):
name
: Stringemail
: Stringpassword
: StringuserImage
: File
Get a list of all registered users.
📌 Make sure you update your local IP in
Base.kt
before running the project.
-
Clone the repository
git clone https://github.com/your-username/ktor-api-client.git
-
Open in Android Studio or IntelliJ IDEA
-
Change IP in
Base.kt
to your local or hosted server IP -
Run the server
./gradlew run
- 🔐 Learn Ktor authentication
- 🔄 REST API integration with Firebase + MySQL
- 🧰 Use as boilerplate for Kotlin backend projects
- 🧪 Practice handling file uploads and image storage in Ktor
ktor
,kotlin
,kotlin ktor
,ktor rest api
,ktor firebase mysql
,authentication api
,kotlin backend
,ktor client server
,kotlin rest api
,ktor image upload
,kotlin api example
Test all APIs easily using the included Postman collection.
📥 Download Postman Collection
Looking for a mobile application that demonstrates user login and registration using the same Ktor API provided in this project? Check out the companion Android demo app:
🔗 Android Demo App (Login & Register):
https://github.com/KishanViramgama/LoginRegister
This Android project is fully integrated with this API and showcases:
- ✅ User registration flow
- 🔐 User login handling
- 🔗 Ktor client API integration
- 🎨 Jetpack Compose UI (if applicable)
Clone and run the app on your emulator or device to experience the complete authentication flow in action.
Pull requests and issues are welcome! Feel free to fork the project and enhance it.
Follow me on GitHub to stay updated with Kotlin, Ktor, and backend projects! 🌟
If you like this library and want to support my work, consider buying me a coffee.