{"id":22430525,"url":"https://github.com/martenframework/marten-db-session","last_synced_at":"2025-07-26T05:11:18.359Z","repository":{"id":62005633,"uuid":"487337929","full_name":"martenframework/marten-db-session","owner":"martenframework","description":"A database session store for the Marten web framework.","archived":false,"fork":false,"pushed_at":"2024-08-07T01:02:48.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-07T03:35:44.595Z","etag":null,"topics":["crystal","db","framework","marten","session","web"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/martenframework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-04-30T17:20:03.000Z","updated_at":"2024-08-07T01:02:51.000Z","dependencies_parsed_at":"2024-04-10T01:41:04.292Z","dependency_job_id":"5b67e4e4-452d-4748-b8c4-fa6ad43c495b","html_url":"https://github.com/martenframework/marten-db-session","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-db-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-db-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-db-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-db-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martenframework","download_url":"https://codeload.github.com/martenframework/marten-db-session/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228371009,"owners_count":17909389,"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":["crystal","db","framework","marten","session","web"],"created_at":"2024-12-05T21:08:46.136Z","updated_at":"2024-12-05T21:08:46.710Z","avatar_url":"https://github.com/martenframework.png","language":"Crystal","funding_links":[],"categories":["Marten shards"],"sub_categories":["Sessions"],"readme":"# Marten DB Session\n\n[![Version](https://img.shields.io/github/v/tag/martenframework/marten-db-session)](https://github.com/martenframework/marten-db-session/tags)\n[![License](https://img.shields.io/github/license/martenframework/marten-db-session)](https://github.com/martenframework/marten-db-session/blob/main/LICENSE)\n[![CI](https://github.com/martenframework/marten-db-session/workflows/Specs/badge.svg)](https://github.com/martenframework/marten-db-session/actions)\n[![CI](https://github.com/martenframework/marten-db-session/workflows/QA/badge.svg)](https://github.com/martenframework/marten-db-session/actions)\n\n**Marten DB Session** provides a database [session store](https://martenframework.com/docs/handlers-and-http/sessions#session-stores) for the Marten web framework. \n\n## Installation\n\nSimply add the following entry to your project's `shard.yml`:\n\n```yaml\ndependencies:\n  marten_db_session:\n    github: martenframework/marten-db-session\n```\n\nAnd run `shards install` afterward.\n\nOnce installed you can configure your project to use the database session store by following these steps:\n\nFirst, add the following requirement to your project's `src/project.cr` file:\n\n```crystal\nrequire \"marten_db_session\"\n```\n\nSecondly, add the following requirement to the top-level `manage.cr` file in order to make Marten DB Session Store migrations available to your project:\n\n```crystal\nrequire \"marten_db_session/cli\"\n```\n\nThen, add the `MartenDBSession::App` app class to your project's `installed_apps` setting and ensure that your `sessions.store` setting is set to `:db`:\n\n```crystal\nMarten.configure do |config|\n  # Other settings...\n\n  config.installed_apps = [\n    MartenDBSession::App,\n    # Other apps..\n  ]\n\n  config.sessions.store = :db\nend\n```\n\nFinally, run the `marten migrate` command in order to install the DB session entry model.\n\n_Congrats! You’re in!_ From now on, your session data will be persisted in a `marten_db_session_store_entry` table.\n\n## Authors\n\nMorgan Aubert ([@ellmetha](https://github.com/ellmetha)) and \n[contributors](https://github.com/martenframework/marten-db-session/contributors).\n\n## License\n\nMIT. See ``LICENSE`` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten-db-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartenframework%2Fmarten-db-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten-db-session/lists"}