{"id":15825707,"url":"https://github.com/anilsenay/scala-slick-rest-postgresql","last_synced_at":"2026-05-05T14:33:36.009Z","repository":{"id":49341268,"uuid":"512174039","full_name":"anilsenay/scala-slick-rest-postgresql","owner":"anilsenay","description":"First Scala REST Api attempt for learning in a week","archived":false,"fork":false,"pushed_at":"2022-07-25T11:27:52.000Z","size":105,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-06T09:22:12.634Z","etag":null,"topics":["akka","akka-http","akka-streams","docker","docker-compose","postgresql","scala","scala-slick","slick"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anilsenay.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}},"created_at":"2022-07-09T11:57:16.000Z","updated_at":"2022-07-22T19:15:55.000Z","dependencies_parsed_at":"2022-09-08T09:21:01.563Z","dependency_job_id":null,"html_url":"https://github.com/anilsenay/scala-slick-rest-postgresql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anilsenay/scala-slick-rest-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilsenay%2Fscala-slick-rest-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilsenay%2Fscala-slick-rest-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilsenay%2Fscala-slick-rest-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilsenay%2Fscala-slick-rest-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anilsenay","download_url":"https://codeload.github.com/anilsenay/scala-slick-rest-postgresql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilsenay%2Fscala-slick-rest-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["akka","akka-http","akka-streams","docker","docker-compose","postgresql","scala","scala-slick","slick"],"created_at":"2024-10-05T09:22:25.246Z","updated_at":"2026-05-05T14:33:35.993Z","avatar_url":"https://github.com/anilsenay.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scala-slick-rest-postgresql\nFirst Scala REST Api attempt for learning in a week. I used [Akka-Http](https://doc.akka.io/docs/akka-http/current/introduction.html), [Scala Slick](https://scala-slick.org/) as FRM for database connection and [PostgreSQL](https://www.postgresql.org/) with [Docker](https://www.docker.com/). \n\n## Build With\n- [Scala](https://www.scala-lang.org/)\n- [Akka](https://akka.io/)\n- [Akka-Http](https://doc.akka.io/docs/akka-http/current/introduction.html)\n- [Scala Slick](https://scala-slick.org/)\n- [Docker](https://www.docker.com/)\n- [PostgreSQL](https://www.postgresql.org/)\n\n## Getting Started\n### Prerequisites\n- [Scala Version 2](https://www.scala-lang.org/)\n- [Docker](https://www.docker.com/)\n- [Git](https://git-scm.com/)\n\n### Installation\n\n1. Clone the repo and change the directory\n\n```sh\ngit clone https://github.com/anilsenay/scala-slick-rest-postgresql.git\ncd scala-slick-rest-postgresql\n```\n\n2. Run Docker Compose to setup and run PostgreSQL in a Docker container\n\n```sh\ndocker compose up\n```\n\n3. When your docker is running and PostgreSQL is ready, compile and run the project\n\n```sh\nsbt run\n```\n\n### Configuration\n#### _Change database credentials_\nChange credentials in both `docker-compose.yml` and `src/main/resources/application.conf` files\n#### _Change secret key for generating JWT_\nChange `secretKey` in `src/main/resources/application.conf` file\n\n## API REST Interface\n\nDownload Postman Collection: [GDrive](https://drive.google.com/file/d/1RRv9KwE2ULhnhLJ-hcusnSq7Y4sG6j3I/view?usp=sharing)\n\n_You have to be authorized for access some endpoints by adding user's JWT token as Bearer to **Authorization** key in request header._\n\n**AUTH**\n- `POST /api/auth/login`\n- `POST /api/auth/register`\n- `POST /api/auth/validate`\n\n**USER**\n- `GET /api/user`\n- `GET /api/user/{user_id}`\n- `GET /api/user/{user_id}?address=true`\n- `POST /api/user`\n- `PUT /api/user/{user_id}`\n- `DELETE /api/user/{user_id}`\n- `POST /api/user/{user_id}/address`\n\n**ADDRESS**\n- `GET /api/address`\n- `GET /api/address/{address_id}`\n- `POST /api/address`\n- `PUT /api/address/{address_id}`\n- `DELETE /api/address/{address_id}`\n\n**PRODUCT**\n- `GET /api/product`\n- `GET /api/product/{product_id}`\n- `GET /api/product?sort=asc\u0026category=Shoes\u0026min=1000\u0026max=1000\u0026brand=adidas\u0026sort=new\u0026page=2`\n- `POST /api/product`\n- `POST /api/product/{product_id}/photo`\n- `POST /api/product/{product_id}/size`\n- `PUT /api/product/{product_id}`\n- `DELETE /api/product/{product_id}`\n- `DELETE /api/product/product_id/photo/{photo_index}`\n- `DELETE /api/product/product_id/size/{size}`\n\n**CATEGORY**\n- `GET /api/category`\n- `POST /api/category`\n- `PUT /api/category/{category_id}`\n- `DELETE /api/category/{category_id}`\n\n**BRAND**\n- `GET /api/brand`\n- `POST /api/brand`\n- `PUT /api/brand/{brand_id}`\n- `DELETE /api/brand/{brand_id}`\n\n**ORDER**\n- `GET /api/order/{order_id}`\n- `GET /api/order/{order_id}?user={user_id}`\n- `POST /api/order`\n- `PUT /api/order/{order_id}/{status}`\n- `PUT /api/order/{order_id}/cancel`\n- `DELETE /api/order/{order_id}`\n\n## Future plans\n\n- Applying best practices\n- Implement Swagger\n- ~~Implement authentication~~\n- Implement a cache mechanism\n- Better Error messages\n- Create same project by using Akka Play framework \u0026 use Quill instead of Slick\n\n## License\n\nDistributed under the GPL License. See `LICENSE` for more information.\n\n## Contact\n\n[@anilsenay](https://twitter.com/anilsenay)\n\nProject Link: [https://github.com/anilsenay/scala-slick-rest-postgresql](https://github.com/anilsenay/scala-slick-rest-postgresql)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilsenay%2Fscala-slick-rest-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanilsenay%2Fscala-slick-rest-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilsenay%2Fscala-slick-rest-postgresql/lists"}