{"id":13597299,"url":"https://github.com/srid/leptos-fullstack","last_synced_at":"2025-06-30T23:05:09.844Z","repository":{"id":183785188,"uuid":"670760241","full_name":"srid/leptos-fullstack","owner":"srid","description":"A Nix template for full-stack web apps in Rust using Leptos","archived":false,"fork":false,"pushed_at":"2024-09-25T23:14:36.000Z","size":126,"stargazers_count":83,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T16:57:50.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/srid.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":"2023-07-25T19:17:29.000Z","updated_at":"2025-04-10T14:09:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7f7cbb2-aee1-46e6-9f5a-8773885c5265","html_url":"https://github.com/srid/leptos-fullstack","commit_stats":null,"previous_names":["srid/leptos-fullstack"],"tags_count":0,"template":true,"template_full_name":"srid/rust-nix-template","purl":"pkg:github/srid/leptos-fullstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fleptos-fullstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fleptos-fullstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fleptos-fullstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fleptos-fullstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srid","download_url":"https://codeload.github.com/srid/leptos-fullstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srid%2Fleptos-fullstack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864124,"owners_count":23376455,"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":[],"created_at":"2024-08-01T17:00:29.883Z","updated_at":"2025-06-30T23:05:09.803Z","avatar_url":"https://github.com/srid.png","language":"Rust","funding_links":[],"categories":["Rust","Starter Templates"],"sub_categories":["Unofficial"],"readme":"# leptos-fullstack\n\nA Nix template for [full-stack web apps](https://srid.ca/nojs) in Rust using Leptos. Tech used:\n\n- [Leptos](https://leptos.dev/) full-stack framework \n    - [server functions](https://docs.rs/leptos/latest/leptos/attr.server.html)\n    - [ssr + hydration](https://leptos-rs.github.io/leptos/ssr/index.html)\n- [Axum](https://github.com/tokio-rs/axum) as backend framework\n- [Tailwind CSS](https://tailwindcss.com/) for styling\n- Build system\n  - [cargo-leptos](https://github.com/leptos-rs/cargo-leptos)\n  - [Nix Flakes](https://zero-to-flakes.com/) + [crane](https://github.com/ipetkov/crane)\n- Autoformatting using `rustfmt` and `leptosfmt`\n\n## Running locally\n\nEnter the Nix shell, and run:\n\n```\n# To spin up the dev server\njust watch\n\n# To run tests\njust test\n```\n\n## Building\n\n```\nnix build\n\n# To build the rust doccs\nnix build .#leptos-fullstack-docs\n```\n\nYou can also `nix run` the app directly.\n\n## Using as flake-parts module\n\nImport `./nix/flake-module.nix` from this repos as a flake-parts module. For an example project, see [nix-browser](https://github.com/juspay/nix-browser).\n\nIn the future, we might create a standalone flake-parts module for Leptos.\n\n## Notes\n\n### Single-crate model\n\nThis repo uses the single-crate model primarily because the backend-common-frontend split (prior to PR #5; similar to [start-axum-workspace](https://github.com/leptos-rs/start-axum-workspace) template) is not suitable when using [server functions](https://docs.rs/leptos/latest/leptos/attr.server.html) in leptos. Consequently, expect a bunch of `cfg` attributes or macros that make backend-only code conditional upon the `ssr` flag (which is set when compiling the crate for the backend, as opposed to the wasm frontend, which uses `csr`)\n\n## Credits\n\nThe Rust code is largely based on [start-axum](https://github.com/leptos-rs/start-axum). Also, credit goes [to @benwis](https://github.com/benwis/benwis_leptos/blob/928ea7e7c20a86be91ad27e75cf297a2fbef681d/flake.nix#L148-L153) for pointers to how `crane` can be made to work with `cargo-leptos`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fleptos-fullstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrid%2Fleptos-fullstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrid%2Fleptos-fullstack/lists"}