{"id":37425586,"url":"https://github.com/laetuz/ktor-notes-api","last_synced_at":"2026-01-16T06:13:19.368Z","repository":{"id":307322189,"uuid":"1028991318","full_name":"laetuz/ktor-notes-api","owner":"laetuz","description":"A note taking backend sample app built with Ktor, Koin, JWT Auth, and Exposed with Postgresql.","archived":false,"fork":false,"pushed_at":"2025-08-20T11:33:26.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-20T13:27:34.787Z","etag":null,"topics":["backend","backend-api","exposed","jwt-authentication","koin","kotlin","kotlin-notebook","ktor","ktor-server","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laetuz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-30T11:07:36.000Z","updated_at":"2025-08-20T11:33:29.000Z","dependencies_parsed_at":"2025-08-20T13:26:04.177Z","dependency_job_id":null,"html_url":"https://github.com/laetuz/ktor-notes-api","commit_stats":null,"previous_names":["laetuz/notes-api","laetuz/ktor-notes-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laetuz/ktor-notes-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laetuz%2Fktor-notes-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laetuz%2Fktor-notes-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laetuz%2Fktor-notes-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laetuz%2Fktor-notes-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laetuz","download_url":"https://codeload.github.com/laetuz/ktor-notes-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laetuz%2Fktor-notes-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","backend-api","exposed","jwt-authentication","koin","kotlin","kotlin-notebook","ktor","ktor-server","postgresql"],"created_at":"2026-01-16T06:13:18.916Z","updated_at":"2026-01-16T06:13:19.342Z","avatar_url":"https://github.com/laetuz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ktor Notes API\n\nThis repository contains the backend for the [CMP Notes Client](https://github.com/laetuz/CMP-Notes-Client), \na multiplatform app built with Compose. \nIt's a modern and secure RESTful API for managing notes, \ndeveloped with Ktor, Kotlin, and Exposed for type-safe database access.\n\nA modern, robust, and secure RESTful API for managing notes,\nbuilt with Kotlin and the Ktor framework. This project serves \nas a powerful backend foundation, demonstrating best practices in API development, \nauthentication, and database interaction.\n\nVisit the client side repo: [CMP Notes Client](https://github.com/laetuz/CMP-Notes-Client)\n\n---\n\n## ✨ Features\n\n* **User Authentication**: Secure user registration and login using **Basic Authentication** and **BCrypt**.\n* **CRUD Operations for Notes**: Full Create, Read, Update, and Delete functionality for user-specific notes.\n* **Dependency Injection**: Clean, decoupled architecture powered by **Koin**.\n* **Modern Database Access**: Type-safe ORM using **JetBrains Exposed**.\n* **Asynchronous by Design**: Built on Kotlin Coroutines for high-performance, non-blocking I/O.\n\n---\n\n## 🛠️ Technology Stack\n\n* **Framework**: [Ktor](httpshttps://ktor.io/)\n* **Language**: [Kotlin](https://kotlinlang.org/)\n* **Authentication**: Ktor Basic Auth with BCrypt hashing\n* **Database**: [PostgreSQL](https://www.postgresql.org/)\n* **Database Access**: [JetBrains Exposed](https://github.com/JetBrains/Exposed)\n* **Dependency Injection**: [Koin](https://insert-koin.io/)\n* **Serialization**: [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)\n\n---\n\n## 🚀 Getting Started\n\nFollow these instructions to get a copy of the project up and running on your local machine for development and testing.\n\n### Prerequisites\n\n* **JDK 17** or higher.\n* **PostgreSQL** database server installed and running. or\n* **Docker Desktop** dto run the docker script for the postgresql setup.\n* An IDE like IntelliJ IDEA is recommended.\n\n### Setup \u0026 Installation\n\n1.  **Clone the repository:**\n    ```bash\n    git clone [https://github.com/laetuz/ktor-notes-api.git](https://github.com/laetuz/ktor-notes-api.git)\n    cd project\n    ```\n\n2.  **Set up the PostgreSQL Database:**\n    * Open docker-compose.yml and run services. \n    This will automatically setup the container for postgres.\n    * Connect to your PostgreSQL instance.\n    * Create a new database for the project (e.g., `notes_db`).\n    * The necessary tables will be created automatically by Exposed when the application starts for the first time.\n\n3.  **Configure Environment Variables:**\n    This project uses environment variables to manage sensitive data like database credentials. You can set these in your IDE's run configuration or export them in your terminal.\n\n    | Variable            | Description                                        | Example Value                                  |\n        | ------------------- | -------------------------------------------------- | ---------------------------------------------- |\n    | `DATABASE_URL`      | The JDBC URL for your PostgreSQL database.         | `jdbc:postgresql://localhost:5432/notes_db`    |\n    | `DATABASE_USER`     | The username for your database.                    | `postgres`                                     |\n    | `DATABASE_PASSWORD` | The password for your database user.               | `your_secure_password`                         |\n\n4.  **Run the Application:**\n    Use the Gradle wrapper to build and run the server.\n    ```bash\n    ./gradlew run\n    ```\n    The server will start, typically on `http://localhost:8081`.\n\n---\n\n## 📖 API Endpoints\n\n* I have provided the API documentation in a notebook format  [here](https://github.com/laetuz/ktor-notes-api/blob/main/src/main/resources/ApiDocs.ipynb)\n* or you could go to **/notes/src/main/resources/ApiDocs.ipynb** in this project scope. \n\n---\n\n## 📂 Project Structure\n\nA brief overview of the key directories in the project. ~later lah ya i will update.\n\n---\n\nVisit our website: [Neotica](https://neotica.id)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaetuz%2Fktor-notes-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaetuz%2Fktor-notes-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaetuz%2Fktor-notes-api/lists"}