{"id":27300136,"url":"https://github.com/saasba-se/micron","last_synced_at":"2025-04-12T00:56:29.287Z","repository":{"id":257820394,"uuid":"867052894","full_name":"saasba-se/micron","owner":"saasba-se","description":"Build web apps fast. Repeat.","archived":false,"fork":false,"pushed_at":"2025-04-01T09:19:37.000Z","size":591,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T00:56:23.613Z","etag":null,"topics":["boilerplate","framework","rust","web"],"latest_commit_sha":null,"homepage":"https://saasba.se/micron","language":"Rust","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/saasba-se.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-03T11:17:45.000Z","updated_at":"2025-04-01T09:19:41.000Z","dependencies_parsed_at":"2024-10-10T10:45:56.078Z","dependency_job_id":"e6f358f6-bc65-411b-9a20-d149c083aef8","html_url":"https://github.com/saasba-se/micron","commit_stats":null,"previous_names":["adamsky/saasbase","saasba-se/micron"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasba-se%2Fmicron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasba-se%2Fmicron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasba-se%2Fmicron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasba-se%2Fmicron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saasba-se","download_url":"https://codeload.github.com/saasba-se/micron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501878,"owners_count":21114683,"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":["boilerplate","framework","rust","web"],"created_at":"2025-04-12T00:56:28.789Z","updated_at":"2025-04-12T00:56:29.270Z","avatar_url":"https://github.com/saasba-se.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## \u003cimg src=\"assets/micron.png\" width=\"300\"\u003e\n\n[![Static Badge](https://img.shields.io/badge/discord-server-blue)](https://discord.gg/Q3CzGTEHaC)\n\n\u003c!-- cargo-rdme start --\u003e\n\n*Build web apps fast. Repeat.*\n\n`micron` provides a range of functionality useful for building *micro* web\napplications *n times*, where *n is greater than a dozen*.\n\nThe library covers a wide range of functionality useful in different kinds\nof applications, e.g. user management, auth, mailings, posts, comments,\npayments, invoice generation and more.\n\nIt is quite opinionated and channels decisions made based on core\nmotivations: simplicity, extendability and development speed.\n\nIt focuses on the\n[hypermedia-based approach](https://htmx.org/essays/hateoas/) with\nserver-side generated html, champions embedded key-value databases for data\nstorage and targets a deployment model of single all-in-one binary per\napplication.\n\n\n### Data model\n\nAt the most basic level, `micron` library defines a concrete data model\nthat can be used directly in the context of small applications.\n\nIf you were building a saas application, for example, you could make\nimmediate use of ready-made types to handle your `User`s, `Product`s,\n`Order`s, `Payment`s, subscription `Plan`s and more.\n\nYou can implement application-specific types *on top*, leading to\nrelatively consise codebases with as little repetition across\napplications as possible.\n\n\n### Common logic\n\n`micron` provides an extensive set of operations for working with\napplication state as defined with the data model.\n\nThis logic is referred to as *common* as it remains fully\nweb-framework-agnostic. It can be found in the respective top-level\nmodules.\n\n\n### Framework-specific logic\n\n`micron` takes it upon itself to provide building blocks for use with\nselected web frameworks. This includes middleware, extractors and\nready-made endpoints.\n\nFramework-specific functionality is provided in respective feature-gated\nmodules. Note that currently only the `axum` web framework is supported.\n\nIn terms of provisioned endpoints, you'll find that most of the\nfunctionality that doesn't need a custom html response is included. That's\neverything from `/login` form submit to common `/api` operations. Pages as\nwell as html parts to be injected dynamically must be created by library\nuser. See the `examples` directory for example usage.\n\n\n### Geting started\n\nThe fastest way to get started is to build and run the provided examples.\nClone the repo, navigate to any of the examples in the top level `examples`\ndirectory and simply do `cargo run`.\n\nThe chosen example should now be accessible at `localhost:8000`. If that\nport is unavailable on your machine simply modify the `address` field of\nthe `./examples/{example}/micron.toml` file.\n\nFor an example of a more involved application using `micron` see the\n[`ruda` project](https://github.com/adamsky/ruda).\n\nExamples showing off particular aspects of the library are also provided\ninside `lib/examples`.\n\nWhile you already have the repository cloned you can try running the\n`micron-cli` tool. Navigate to `./cli` and do `cargo run`. With\n`micron-cli` you'll be able to inspect and mutate application state,\neither on-line or off-line.\n\n\n#### Pulling the library\n\nPull in `micron` dependency into your project, putting the following into\nyour `Cargo.toml` `[dependencies]`:\n\n```toml\nmicron = \"0.1.0\"\n```\n\nAs `micron` tends to be opinionated and encourages employing certain\nsolutions for the sake of efficiency, the default feature set is meant to\nbe sensible for most use-cases.\n\nThat said, crate features can provide additional and/or alternative\nsolutions in some cases (for example different storage engines). Feel free\nto make use of them as needed.\n\n```toml\nmicron = { version = \"0.1.0\", default-features = false, features = [\"axum\", \"redb\"] }\n```\n\n\n#### Using the library\n\n`micron` is organized into modules based on type of functionality they\nprovide.\n\nCommon usage pattern involves defining a configuration (or loading it from\nfile) and using it to generate a `micron` router to be merged with the\nmain application router.\n\nAssets and templates should be provided alongside Rust code. Assets can\neither be read from the filesystem at runtime or embedded into the\napplication binary to enhance portability.\n\n\n#### Deploying\n\nDeployment of a `micron`-based application can be as easy as compiling\ndown to a single binary and exposing the web server listener to the outside\nworld. They only requirement on the system is a Rust installation and\na network connection.\n\n\u003c!-- cargo-rdme end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaasba-se%2Fmicron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaasba-se%2Fmicron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaasba-se%2Fmicron/lists"}