{"id":13808030,"url":"https://github.com/martenframework/marten","last_synced_at":"2025-04-05T05:09:40.971Z","repository":{"id":61948887,"uuid":"242279238","full_name":"martenframework/marten","owner":"martenframework","description":"The pragmatic web framework.","archived":false,"fork":false,"pushed_at":"2024-05-23T06:28:16.000Z","size":7951,"stargazers_count":390,"open_issues_count":26,"forks_count":17,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-05-23T07:28:38.981Z","etag":null,"topics":["backend","crystal","crystal-lang","crystal-language","framework","http","server","web","web-framework","webapp","webapplication"],"latest_commit_sha":null,"homepage":"https://martenframework.com","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":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-22T04:28:11.000Z","updated_at":"2024-05-28T03:36:22.228Z","dependencies_parsed_at":"2023-10-21T18:24:19.571Z","dependency_job_id":"9705cc27-b537-41d3-8529-38bc96e5fc59","html_url":"https://github.com/martenframework/marten","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martenframework","download_url":"https://codeload.github.com/martenframework/marten/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"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":["backend","crystal","crystal-lang","crystal-language","framework","http","server","web","web-framework","webapp","webapplication"],"created_at":"2024-08-04T01:01:34.003Z","updated_at":"2025-04-05T05:09:40.938Z","avatar_url":"https://github.com/martenframework.png","language":"Crystal","readme":"# Marten\n\n![logo](https://raw.githubusercontent.com/martenframework/marten/main/docs/static/img/hero.png)\n\n[![Version](https://img.shields.io/github/v/tag/martenframework/marten?label=Version)](https://github.com/martenframework/marten/tags)\n[![License](https://img.shields.io/github/license/martenframework/marten?label=License)](https://github.com/martenframework/marten/blob/main/LICENSE)\n[![CI](https://github.com/martenframework/marten/actions/workflows/specs.yml/badge.svg?branch=main)](https://github.com/martenframework/marten/actions)\n[![CI](https://github.com/martenframework/marten/actions/workflows/qa.yml/badge.svg?branch=main)](https://github.com/martenframework/marten/actions)\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord\u0026label)](https://martenframework.com/chat)\n\n---\n\n**Marten** is a Crystal Web framework that enables pragmatic development and rapid prototyping. It \nprovides a consistent and extensible set of tools that developers can leverage to build web applications without \nreinventing the wheel.\n\n## Overview\n\n### Key characteristics\n\n**🎯 Simple** \n\nMarten's syntax is inherited from the slickness and simplicity of the Crystal programming language. On top of that, the framework tries to be KISS and DRY compliant as much as possible to reduce time-to-market.\n\n**⚡ Fast**\n\nMarten gives you the ability to build full-featured web applications by leveraging the bare metal performances of the Crystal programming language. It also tries to optimize for decent compile times.\n\n**🧳 Full-featured**\n\nMarten adheres to the \"batteries included\" philosophy. Out of the box, it provides the tools and features that are commonly required by web applications: ORM, migrations, translations, templating engines, sessions, emailing, authentication, etc.\n\n**🔧 Extensible**\n\nMarten gives you the ability to contribute extra functionalities to the framework easily. Things like custom model field implementations, new route parameter types, session stores, etc... can be registered to the framework easily.\n\n**💠 App-oriented**\n\nMarten allows separating projects into a set of logical \"apps\". These apps can also be extracted to contribute features and behaviors to other Marten projects. The goal here is to allow the creation of a powerful apps ecosystem over time.\n\n**🛡️ Secure**\n\nMarten comes with security mechanisms out of the box. Things like cross-site request forgeries, clickjacking, or SQL injections are taken care of by the framework to avoid common security issues.\n\n### Batteries included\n\nThe tools you need are built into the framework. Database ORM, translations, migrations, templates, sessions, emailing, authentication, and many more can be leveraged right away.\n\n**Design your models easily**\n\nMarten comes with an object-relational-mapper (ORM) that you can leverage to describe your database using Crystal classes and a convenient DSL.\n\n```crystal\nclass Article \u003c Marten::Model\n  field :id, :big_int, primary_key: true, auto: true\n  field :title, :string, max_size: 128\n  field :content, :text\n  field :author, :many_to_one, to: User\nend\n```\n\n**Process requests with handlers**\n\nHandlers are responsible for processing web requests and for returning responses. This can involve loading records from the database, rendering HTML templates, or producing JSON payloads.\n\n```crystal\nclass ArticleListHandler \u003c Marten::Handler\n  def get\n    render \"articles/list.html\", { articles: Article.all }\n  end\nend\n```\n\n**Render user-facing content with templates**\n\nTemplates provide a convenient way to define your presentation logic and to write contents (such as HTML) that are rendered dynamically. This rendering can involve model records or any other variables you define.\n\n```html\n{% extend \"base.html\" %}\n{% block content %}\n\u003cul\u003e\n  {% for article in articles %}\n    \u003cli\u003e{{ article.title }}\u003c/li\u003e\n  {% endfor %}\n\u003c/ul\u003e\n{% endblock content %}\n```\n\n## Documentation\n\nOnline browsable documentation is available at [https://martenframework.com/docs](https://martenframework.com/docs).\n\n## Getting started\n\nAre you new to the Marten web framework? The following resources will help you get started:\n\n* The [installation guide](https://martenframework.com/docs/getting-started/installation) will help you install Crystal and the Marten CLI\n* The [tutorial](https://martenframework.com/docs/getting-started/tutorial) will help you discover the main features of the framework by creating a simple web application\n\n## Authors\n\nMorgan Aubert ([@ellmetha](https://github.com/ellmetha)) and \n[contributors](https://github.com/martenframework/marten/contributors).\n\n## Acknowledgments\n\nThe Marten web framework initially draws its inspiration from [Django](https://www.djangoproject.com/) and [Ruby on Rails](https://rubyonrails.org/). You can browse the [Acknowledgments](https://martenframework.com/docs/the-marten-project/acknowledgments) section of the documentation to learn more about the various inspirations and contributions that helped shape Marten.\n\n## License\n\nMIT. See ``LICENSE`` for more details.\n","funding_links":[],"categories":["Web Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartenframework%2Fmarten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten/lists"}