{"id":15063619,"url":"https://github.com/rubum/flex_web_framework","last_synced_at":"2026-01-02T20:13:29.780Z","repository":{"id":248867599,"uuid":"830086239","full_name":"rubum/flex_web_framework","owner":"rubum","description":"A lightweight, flexible web framework for Elixir","archived":false,"fork":false,"pushed_at":"2024-07-22T08:03:34.000Z","size":54,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T04:08:12.785Z","etag":null,"topics":["elixir","web"],"latest_commit_sha":null,"homepage":"https://flexweb.dev","language":"Elixir","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/rubum.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":"2024-07-17T15:01:28.000Z","updated_at":"2025-02-26T17:59:31.000Z","dependencies_parsed_at":"2024-09-25T00:15:29.227Z","dependency_job_id":null,"html_url":"https://github.com/rubum/flex_web_framework","commit_stats":null,"previous_names":["rubum/flex","rubum/flex_web"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubum%2Fflex_web_framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubum%2Fflex_web_framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubum%2Fflex_web_framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubum%2Fflex_web_framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubum","download_url":"https://codeload.github.com/rubum/flex_web_framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243778922,"owners_count":20346635,"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":["elixir","web"],"created_at":"2024-09-25T00:04:58.279Z","updated_at":"2026-01-02T20:13:29.750Z","avatar_url":"https://github.com/rubum.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flex\n\n\u003cp align=\"center\"\u003e\n  \u003csvg width=\"100\" height=\"100\" viewBox=\"0 0 200 200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n    \u003crect x=\"40\" y=\"40\" width=\"80\" height=\"80\" fill=\"#3B82F6\" transform=\"rotate(15 80 80)\"/\u003e\n    \u003crect x=\"80\" y=\"80\" width=\"80\" height=\"80\" fill=\"#60A5FA\" transform=\"rotate(-15 120 120)\"/\u003e\n  \u003c/svg\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA lightweight, flexible web framework for Elixir\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hex.pm/packages/flex_web\"\u003e\n    \u003cimg src=\"https://img.shields.io/hexpm/v/flex_web.svg\" alt=\"Hex version\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hexdocs.pm/flex_web\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/hex-docs-brightgreen.svg\" alt=\"Hex Docs\"/\u003e\n  \u003c/a\u003e\n  \u003c!-- \u003ca href=\"https://github.com/rubum/flex_web/actions\"\u003e\n    \u003cimg src=\"https://github.com/rubum/flex_web/workflows/CI/badge.svg\" alt=\"CI Status\"/\u003e\n  \u003c/a\u003e --\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nFlex is a lightweight and flexible web framework for Elixir, designed to make web development a breeze. Inspired by the simplicity of Flask and powered by the robustness of Elixir, Flex provides developers with an intuitive API for building scalable web applications quickly and efficiently.\n\n## Features\n\n- **Intuitive Routing**: Define your routes with a clean, expressive syntax\n- **Blazing Fast**: Leverages the power of the BEAM VM for high performance\n- **Hot Code Reloading**: Enjoy seamless development with automatic code reloading\n- **Flexible Structure**: Organize your code the way that makes sense for your project\n- **Templating**: Built-in support for EEx templates with layouts\n- **Static File Serving**: Easily serve static assets\n- **Plug Integration**: Seamless integration with the Plug ecosystem\n- **Extensible**: Easy to extend with custom modules and plugins\n\n## Installation\n\nInstall Flex with:\n```elixir \nmix archive.install hex flex_web\n```\n\n## Quick Start\n\nCreate a new Flex project:\n\n```elixir\nmix flex.new my_app\ncd my_app\nmix deps.get\n```\n\nStart your Flex server:\n```elixir\nmix flex.server\n```\n\nVisit `http://localhost:4000` in your browser to see your Flex application in action!\n\n## Usage\n### Defining Routes\n\n```elixir\ndefmodule MyApp.Controllers.HomeController do\n  use Flex.Controller\n\n  defroute :index, \"/\" do\n    _ = params\n    html_response(conn, \"home.html.eex\", %{message: \"Welcome to Flex!\"})\n  end\n\n  defroute :about, \"/about\" do\n    _ = params\n    html_response(conn, \"about.html.eex\", %{})\n  end\n\n  defroute :api_example, \"/api/example\", methods: [:get] do\n    _ = params\n    json_response(conn, %{message: \"This is a JSON response\"})\n  end\nend\n```\n\n### Templates\nFlex uses EEx for templating. Templates are located in the `lib/templates` directory.\n\nYou can use base html templates like the `app.html.eex` generated in the `lib/templates/base` folder. \nFor the content from other templates to be placed inside the base template, ensure the `@main_content`\nexists in the base, like:\n\n```elixir\n\u003cmain\u003e\n  \u003c%= @main_content %\u003e\n\u003c/main\u003e\n```\n\nExample template (`lib/templates/home.html.eex`):\n\n```elixir\n\u003ch1\u003eWelcome to Flex\u003c/h1\u003e\n\u003cp\u003e\u003c%= @message %\u003e\u003c/p\u003e\n```\n\n### Configuration\n\nConfigure Flex in your `config/config.exs`:\n\n```elixir\nconfig :flex_web,\n  port: 4000,\n  static_path: Path.join(File.cwd!, \"priv/static\"),\n  templates_path: Path.join(File.cwd!, \"lib/templates\")\n```\n\n## Contributing\n\nWe welcome contributions to Flex! Please see our CONTRIBUTING.md for details on how to get started.\n  1. Fork the repository\n  2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n  3. Commit your changes (`git commit -am 'Add some amazing feature'`)\n  4. Push to the branch (`git push origin feature/amazing-feature`)\n  5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See [LICENSE](https://github.com/rubum/flex/blob/main/LICENSE) for more information.\n\n##\n\n\u003cp align=\"center\"\u003eMade with ❤️ by the Flex Web Team\u003c/p\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubum%2Fflex_web_framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubum%2Fflex_web_framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubum%2Fflex_web_framework/lists"}