{"id":14977757,"url":"https://github.com/frees-io/freestyle","last_synced_at":"2025-04-12T14:19:21.105Z","repository":{"id":57716405,"uuid":"71404763","full_name":"frees-io/freestyle","owner":"frees-io","description":"A cohesive \u0026 pragmatic framework of FP centric Scala libraries","archived":false,"fork":false,"pushed_at":"2019-08-13T06:52:17.000Z","size":8946,"stargazers_count":614,"open_issues_count":34,"forks_count":50,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-12T14:19:10.768Z","etag":null,"topics":["architectural-patterns","cassandra","free-monads","freestyle","functional-programming","kafka","monads","redis","rpc","scala","spark","tagless-final"],"latest_commit_sha":null,"homepage":"http://frees.io/","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/frees-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-19T22:31:44.000Z","updated_at":"2025-03-27T05:53:39.000Z","dependencies_parsed_at":"2022-08-26T12:33:18.360Z","dependency_job_id":null,"html_url":"https://github.com/frees-io/freestyle","commit_stats":null,"previous_names":["47deg/freestyle"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frees-io%2Ffreestyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frees-io%2Ffreestyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frees-io%2Ffreestyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frees-io%2Ffreestyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frees-io","download_url":"https://codeload.github.com/frees-io/freestyle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578875,"owners_count":21127714,"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":["architectural-patterns","cassandra","free-monads","freestyle","functional-programming","kafka","monads","redis","rpc","scala","spark","tagless-final"],"created_at":"2024-09-24T13:56:15.943Z","updated_at":"2025-04-12T14:19:21.081Z","avatar_url":"https://github.com/frees-io.png","language":"Scala","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"\n[comment]: # (Start Badges)\n\n[![Build Status](https://travis-ci.org/frees-io/freestyle.svg?branch=master)](https://travis-ci.org/frees-io/freestyle) [![codecov.io](http://codecov.io/github/frees-io/freestyle/coverage.svg?branch=master)](http://codecov.io/github/frees-io/freestyle?branch=master) [![Maven Central](https://img.shields.io/badge/maven%20central-0.8.2-green.svg)](https://oss.sonatype.org/#nexus-search;gav~io.frees~frees*) [![Latest version](https://img.shields.io/badge/freestyle-0.8.2-green.svg)](https://index.scala-lang.org/frees-io/freestyle) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/frees-io/freestyle/master/LICENSE) [![Join the chat at https://gitter.im/47deg/freestyle](https://badges.gitter.im/47deg/freestyle.svg)](https://gitter.im/47deg/freestyle?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![GitHub Issues](https://img.shields.io/github/issues/frees-io/freestyle.svg)](https://github.com/frees-io/freestyle/issues) [![Scala.js](http://scala-js.org/assets/badges/scalajs-0.6.22.svg)](http://scala-js.org)\n\n[comment]: # (End Badges)\n\n\u003ca href=\"http://frees.io\"\u003e\u003cimg src=\"http://frees.io/img/poster.png\" alt=\"A Cohesive \u0026 Pragmatic Framework of FP centric Scala libraries\" width=\"100%\"/\u003e\u003c/a\u003e\n\n# Documentation\nFull documentation available at [http://frees.io](http://frees.io)\n\n# Build purely functional applications and libraries\nBuild stack-safe purely functional applications and libraries that support parallel and sequential computations where declaration is decoupled from interpretation.\nFreestyle encourages programs built atop [Free algebras](http://frees.io/docs/core/algebras/) that are interpreted at the edge of your application ensuring effects are localized and performed in a controlled environment.\nApplications built with Freestyle can be interpreted to any runtime semantics supported by the interpreter target type.\n\n```scala\nimport freestyle.free._\n\n@free trait Database {\n  def get(id: UserId): FS[User]\n}\n\n@free trait Cache {\n  def get(id: UserId): FS[User]\n}\n\n@module trait Persistence {\n  val database: Database\n  val cache: Cache\n}\n```\n\n# Automatic Dependency Injection\n\nFreestyle includes all the implicit machinery necessary to achieve seamless dependency injection of [`@free`](http://frees.io/docs/core/algebras/) and [`@module`](http://frees.io/docs/core//modules/) Algebras.\nSimply require any of your `@free` or `@module` trait as implicits where needed.\n\n```scala\ndef storedUsers[F[_]]\n    (userId: UserId)\n    (implicit persistence: Persistence[F]): FreeS[F, (User, User)] = {\n  import persistence._\n  for {\n    cachedUser \u003c- cache.get(userId)\n    persistentUser \u003c- database.get(userId)\n  } yield (cachedUser, persistentUser)\n}\n```\n\n# Ready to use integrations\nFreestyle ships with [ready to use algebras and convenient syntax extensions](http://frees.io/docs/integrations/) covering most of the application concerns such as persistence, configuration, logging, etc.\nIn addition Freestyle includes commonly used FP [effects](http://frees.io/docs/effects/) stack such as `option`, `error`, `reader`, `writer`, `state` based on the capabilities of\nthe target runtime interpreters.\n\n```scala\ndef loadUser[F[_]]\n  (userId: UserId)\n  (implicit\n    doobie: DoobieM[F],\n    logging: LoggingM[F]): FreeS[F, User] = {\n    import doobie.implicits._\n    for {\n      user \u003c- (sql\"SELECT * FROM User WHERE userId = $userId\"\n                .query[User]\n                .unique\n                .liftFS[F])\n      _ \u003c- logging.debug(s\"Loaded User: ${user.userId}\")\n    } yield user\n}\n```\n\n## Modules\n\n+ [freestyle](http://frees.io/docs/) - Core module including building blocks for boilerplate free FP programs and apps over Free monads and cats.\n\n+ [effects](http://frees.io/docs/effects/) - MTL style effects such as reader, writer, state, error, and more modeled as free algebras.\n\n+ [logging](http://frees.io/docs/patterns/logging/) - A purely functional logging algebra over Verizon's Journal.\n\n+ [cache](http://frees.io/docs/effects/Cache/) - A generic cache with in memory and redis based implementations.\n\n## Integrations\n\n+ [fetch](http://frees.io/docs/integrations/fetch/) - Integration with the Fetch library for efficient data access from heterogenous datasources.\n\n+ [fs2](http://frees.io/docs/integrations/fs2/) - Integration to run fs2 Streams in Freestyle programs.\n\n+ [monix](http://frees.io/docs/integrations/monix/) -  Instances and utilities to interpret to `monix.eval.Task`.\n\n+ [slick](http://frees.io/docs/integrations/slick/) - Embedding of DBIO actions in Freestyle programs.\n\n+ [doobie](http://frees.io/docs/integrations/doobie/) - Embedding of Doobie ConnectionIO actions in Freestyle programs.\n\n+ http - Adapters and marshallers to run the Freestyle program in endpoint return types for [akka-http](http://frees.io/docs/integrations/akkahttp/), [finch](http://frees.io/docs/integrations/finch/), [http4s](http://frees.io/docs/integrations/http4s/) and [play](http://frees.io/docs/integrations/play/).\n\n## Freestyle Artifacts\n\nFreestyle is compatible with both Scala JVM and Scala.js.\n\nThis project supports Scala 2.11 and 2.12. The project is based on [scalameta](http://scalameta.org/).\n\nTo use the project, add the following to your build.sbt:\n\n```scala\naddCompilerPlugin(\"org.scalameta\" % \"paradise\" % \"3.0.0-M11\" cross CrossVersion.full)\n```\n\n[comment]: # (Start Replace)\n\nFor Scala.jvm:\n\n```scala\n// required\nlibraryDependencies += \"io.frees\" %% \"frees-core\"               % \"0.8.2\"\n\n// optional - effects and patterns\nlibraryDependencies += \"io.frees\" %% \"frees-effects\"            % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-async\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-async-cats-effect\"  % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-async-guava\"        % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-cache\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-config\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-logging\"            % \"0.8.2\"\n\n// optional - integrations\nlibraryDependencies += \"io.frees\" %% \"frees-cache-redis\"        % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-doobie\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-fetch\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-akka\"               % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-finch\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-http-client\"        % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-http4s\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-monix\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-play\"               % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-slick\"              % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %% \"frees-twitter-util\"       % \"0.8.2\"\n```\n\nFor Scala.js:\n\n```scala\n// required\nlibraryDependencies += \"io.frees\" %%% \"frees-core\"              % \"0.8.2\"\n\n// optional - effects and patterns\nlibraryDependencies += \"io.frees\" %%% \"frees-effects\"           % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-async\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-async-cats-effect\" % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-async-fs2\"         % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-async-monix\"       % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-cache\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-http-client\"       % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-logging\"           % \"0.8.2\"\n\n// optional - integrations\nlibraryDependencies += \"io.frees\" %%% \"frees-fetch\"             % \"0.8.2\"\nlibraryDependencies += \"io.frees\" %%% \"frees-monix\"             % \"0.8.2\"\n```\n\n[comment]: # (End Replace)\n\n## Freestyle Examples\n\n* [todolist-lib](./modules/examples/todolist-lib).\n* [todolist-http-http4s](./modules/examples/todolist-http-http4s).\n* [todolist-http-finch](./modules/examples/todolist-http-finch).\n* [slick-example](.modules/examples/slick-example).\n\n## Commercial Support\n\n47 Degrees offers commercial support for the Freestyle framework and associated technologies. To find out more, visit [47 Degrees' Open Source Support](https://www.47deg.com/services/open-source-support/).\n\n[comment]: # (Start Copyright)\n# Copyright\n\nFreestyle is designed and developed by 47 Degrees\n\nCopyright (C) 2017-2018 47 Degrees. \u003chttp://47deg.com\u003e\n\n[comment]: # (End Copyright)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrees-io%2Ffreestyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrees-io%2Ffreestyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrees-io%2Ffreestyle/lists"}