{"repo":"fractalliter/ktor-postgres-backend","free":true,"listed":false,"github":"https://github.com/fractalliter/ktor-postgres-backend","clone":"git clone https://github.com/fractalliter/ktor-postgres-backend.git","description":"Kotlin Ktor server with Graph implementation of DFS algorithm","language":"Kotlin","stars":40,"topics":["dfs-algorithm","graph","jwt-authentication","kotlin","ktor","ktor-server","postgresql","docker","docker-compose","hikaricp"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Kotlin Ktor and postgres backend Here lays a Kotlin web project with Ktor framework, Postgres database, and JWT Authentication. The project comprises the following ingredients: - Ktor server includes JSON serializers, Authentication, and Testing - Netty web server - Postgres as database - Exposed as ORM - Hikari Connection Pool - Logback for logging purposes - JBCrypt for hashing passwords (No salting yet) There is a simple implementation of DFS algorithm, but if you aim for a solid solution, better go for GUAVA Graph from Google. Project is SQL DB agnostic. You are able to dynamically change Postgres to any other databases that Exposed JDBC supports by changing a couple of variables: - the database driver version in gradle.properties - the database driver dependency in build.gradle.kts - the WEB DB URL variable in .env file Flow 1. deploy the docker compose with docker compose up -d command 2. sign up to /signup route providing a username and password(not hardened enough) 3. log in to with your username and password to get access token /login 4. send POST request with payload and token to /hirearchy to create the hierarchy of the organization 5. send get request with token to /hierarchy/{name}/supervisors to fetch the supervisors of the current user How to use You need root access for docker Go to the root directory of the project where docker-compose.yml is and change the environment variables in .env-example with yours and rename the file to .env then deploy the applicatio","default_branch":null,"files":null,"tree":[],"storefront":"/r/fractalliter","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fractalliter/ktor-postgres-backend/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}