{"id":25707865,"url":"https://github.com/chitralverma/schnapps","last_synced_at":"2025-06-11T18:04:42.531Z","repository":{"id":45042797,"uuid":"273936108","full_name":"chitralverma/schnapps","owner":"chitralverma","description":"Schnapps is a precise toolkit to rapidly develop production-grade, secure and self-contained WebApps and REST APIs over HTTP and WebSockets.","archived":false,"fork":false,"pushed_at":"2022-11-16T01:46:54.000Z","size":178,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T08:54:41.920Z","etag":null,"topics":["authentication","authorization","http","microservices","rest","rpc","scala","web","websocket"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chitralverma.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":"2020-06-21T15:51:45.000Z","updated_at":"2021-12-10T04:13:58.000Z","dependencies_parsed_at":"2023-01-22T01:45:41.485Z","dependency_job_id":null,"html_url":"https://github.com/chitralverma/schnapps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chitralverma/schnapps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitralverma%2Fschnapps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitralverma%2Fschnapps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitralverma%2Fschnapps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitralverma%2Fschnapps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chitralverma","download_url":"https://codeload.github.com/chitralverma/schnapps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitralverma%2Fschnapps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259312071,"owners_count":22838855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["authentication","authorization","http","microservices","rest","rpc","scala","web","websocket"],"created_at":"2025-02-25T08:54:44.475Z","updated_at":"2025-06-11T18:04:42.504Z","avatar_url":"https://github.com/chitralverma.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Schnapps](logo.png)\n====\n\n![Maven Publish Snapshots](https://github.com/chitralverma/schnapps/workflows/Maven%20Publish%20Snapshots/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/chitralverma/schnapps/branch/master/graph/badge.svg)](https://codecov.io/gh/chitralverma/schnapps)\n\n\n\u003e A clever exaggeration of apps-in-a-snap.\n\u003e\n\u003e _Noun_:  A type of alcoholic beverage that may take several forms.   \n\u003e _Origin_: derived from the colloquial German word Schnaps [/ʃnɑːps/](https://en.wikipedia.org/wiki/Help:IPA/Standard_German)   \n\nSchnapps is a precise toolkit to rapidly develop production-grade, self-contained WebApps and RESTful services over HTTP and WebSockets.\nIt is completely written in `Scala` and is compatible with `Java` as well.  \n\nBackend developers spend a big chunk of their precious time on redundant activities across projects like app \nconfiguration \u0026 its management, connectivity to external systems, integration of auth mechanisms, app packaging, etc. \nThey get bound to excessively complex tools/ frameworks, and eventually, these tools drive the development and not the other way around. \n\nSchnapps provides the boilerplate code for all these activities so that developers can focus on what matters the most - **Application Logic**.  \n\n## Features\n - Standardized JSON-based project configuration out-of-the-box \n - Allows embedded servers (built on [Apache Dubbo](https://dubbo.apache.org/)) that hosts _mostly managed services_\n - Inbuilt authentication and authorization using [Apache Shiro](https://shiro.apache.org/)\n - Allows synchronous/ asynchronous web applications and services over HTTP and RPCs\n - Managed connectors to external systems like LDAP, JDBC, etc.\n\n## ~~Quick~~ SchnappStart\nGetting started with Schnapps is as straight-forward as it can get, as exactly 3 things need to be done,\n - Get it \n - Configure it\n - Use it \n\n### Get Schnapps\nTo get Schnapps, you need to add its dependency according to your build tool.\n\n - For Maven-based projects, add the following repository and dependency to your `pom.xml`\n     ```$xslt\n      \u003crepositories\u003e\n         ...\n         \n         \u003crepository\u003e\n            \u003cid\u003eossrh\u003c/id\u003e\n            \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots/\u003c/url\u003e\n         \u003c/repository\u003e\n   \n         ...\n      \u003c/repositories\u003e\n     ```\n \n    ```$xslt\n     \u003cdependencies\u003e\n        ...\n   \n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.github.chitralverma\u003c/groupId\u003e\n            \u003cartifactId\u003eschnapps-core\u003c/artifactId\u003e\n            \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n        \u003c/dependency\u003e\n        \n        ...\n     \u003c/dependencies\u003e\n    ```\n\n### Use Schnapps\nDepending on whether you use Schnapps in `Scala` or `Java` project, the usage syntax changes ever so slightly.\n\n##### Configuring the project\nUse the minimum configuration template available [here](schnapps-examples/src/main/resources/rest-services-min-config.json) and pass the \nlocation of the JSON config file as the first argument to the program. To initialize the config, follow the steps below,\n\nIn `Java` projects,\n```$xslt\nConfiguration config = ConfigParser.parse(args); \n```\n\nIn `Scala` projects,\n```$xslt\nval config: Configuration = ConfigParser.parse(args);\n```\n\n**Note:** \n - `Configuration` is a singleton. That means, once it's parsed, you can refer to it anywhere in the code statically \nby `ConfigParser.getConfiguration()`.\n - A complete config template is available [here](schnapps-examples/src/main/resources/rest-services-full-config.json).\n\n##### Writing your first service\n\nFor `Java` projects, the examples are available [here](schnapps-examples/src/main/java).\n\nFor `Scala` projects, the examples are available [here](schnapps-examples/src/main/scala).\n\n##### Running the Server\nAfter the configuration has been successfully initialized (see [here](#configuring-the-project)), boot up the server(s)\nas following,\n\nIn `Java` \u0026 `Scala` projects,\n```$xslt\nServer.bootUp(config);\n```\nThis will load the different entities mentioned in the configuration like Application information, Service Registry, Protocols\nand Services. To await the server(s) till they are given an explicit termination signal, do,\n\nIn `Java` \u0026 `Scala` projects,\n```$xslt\nServer.await();\n```\n\n### Advanced Topics\n\nYou can head over to the [Wiki](https://github.com/chitralverma/schnapps/wiki) for more advanced topics like,\n - Configuring Authentication\n - Configuring the Server\n - Configuring the Externals\n - Service Discovery \u0026 Load Balancing\n - Implementing Custom externals \n \n### Contributing\n\nI'm interested in building a community and would welcome any thoughts, suggestions and/ or patches. \nYou can reach me [@here](mailto:chitralverma@gmail.com).\n\n\n### License\nCopyright 2020 Chitral Verma\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchitralverma%2Fschnapps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchitralverma%2Fschnapps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchitralverma%2Fschnapps/lists"}