{"id":16696515,"url":"https://github.com/zblesk/zblesk-web-template","last_synced_at":"2025-03-14T02:40:42.866Z","repository":{"id":78858651,"uuid":"459341261","full_name":"zblesk/zblesk-web-template","owner":"zblesk","description":"A .NET 6 + Vue 3 + lots of other things template.","archived":false,"fork":false,"pushed_at":"2022-04-12T09:35:21.000Z","size":322,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T02:46:37.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zblesk.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-14T22:08:59.000Z","updated_at":"2022-02-14T22:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"12cca6d7-4730-45ab-92d7-fe303958e787","html_url":"https://github.com/zblesk/zblesk-web-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zblesk%2Fzblesk-web-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zblesk%2Fzblesk-web-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zblesk%2Fzblesk-web-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zblesk%2Fzblesk-web-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zblesk","download_url":"https://codeload.github.com/zblesk/zblesk-web-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243513330,"owners_count":20302929,"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-10-12T17:43:53.695Z","updated_at":"2025-03-14T02:40:42.841Z","avatar_url":"https://github.com/zblesk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue 3 + .NET 6 + Bulma + others\n\nThis is a template/sample/skeleton of an application that bundles what I wanted to use as a basis for a few web apps. As is often the case with modern web development, getting all of the components to play together can be a big hassle, if you're not using a stack that's directly supported by first-party toolchains. When I finally got it the way I wanted it, to build the [Obskurnee book club app](https://zblesk.net/blog/tag/obskurnee-book-club/), I thought I might as well extract the base from it and re-use it. \n\n**This is not a complete/polished app, and it won't be. It's just the desired components set up and wired to be used together.** Most (but not all) of the features are demonstrated in the code in one way or another. You could either fork the code and start modifying it, or just copy-paste pieces of config if you're trying to set up a stack of your own. \n\nA lot of the heavy lifting was done by others: I have relied heavily on [VueCliMiddleware for dotnet](https://github.com/EEParker/aspnetcore-vueclimiddleware) and Alexandre Malavasi's work. \n\nBy default, the app runs on SQLite with Entity Framework Core. EF makes it really easy to switch out the database backend - I've used this with MariaDB and Postgres and in both cases I only needed to reference the appropriate Nuget, configure the connection in the `Setup` class and everything else worked automatically.\n\n[![Build Status](https://bzzz.zble.sk/api/badges/zblesk/zblesk-web-template/status.svg)](https://bzzz.zble.sk/zblesk/zblesk-web-template)\n\n# The stack\n\nThese parts are already set up and should just work: \n\n## Frontend\n\n- **Vue 3** for the frontend\n  - With **Vuex**\n  - Routing with **vue-router**\n  - Localization with **vue-i18n**\n  - **Single-file components**\n  - ... with **Sass**\n\n- **Mitt** as an event bus (mostly for notifications)\n- **vue-toaster** for displaying toast notifications\n- **Bulma** styles **with customization**\n- **SignalR** for real-time, bi-directional client-server communication\n- The obvious **Axios** for requests\n\n## Backend\n\n- **.NET 6**\n  - With the **hierarchical config** set up\n  - and dependency injection, attribute routing, attribute auth \n  - **Localization** of server-side strings\n- **Entity Framework Core 6** for the data layer\n  - With **automatic migrations** on app startup\n- **Authentication**\n  - Works with **claims, roles, and role-claim assignments**.  \n  - An example of **resource-based authorization + related policy** also available\n  - With **JWT**\n  - SignalR hub also authenticated\n  - **No cookies.** Tried that first, couldn't make it work with Axios and SignalR \n  - Hint: The first user to register will be an Admin ℹ\n  - So you don't have issues with creating your first user, the min password length has been set to 1. I suggest changing it to at least 13 in `appsettings.json`. ⚠\n\n- **SQLite** by default; easy to switch to other DBs supported by EF\n- **Serilog** for logging\n  - With **request logging enrichments**\n\n- **VueCliMiddleware** for Vue support\n- **NewtonsoftJson** for handling the response deserialization, as System.Text.Json has issues with possible circular refs\n- The excellent **Markdig** for Markdown rendering support; it's also easy to modify the generator. It's not a part of this template, but **[here](https://zblesk.net/blog/adding-spoiler-support-to-markdown-with-markdig/)** is how to add 'spoiler' support.\n\n## Integrations \u0026 the rest\n\n- Basic **Matrix** connection - made for sending notification to a room\n- **Mailgun mailer** \n  - with a fake mailer service that's turned on in the config by default - which just logs any sent emails to the log sink \n- **Backup service** that periodically make a snapshot of your SQLite DB\n- **Docker** file included. Based on **Alpine**. Build and run easily.\n- **Drone** config also included; just fill in the credentials and Drone will build and publish to Docker Hub. Look, it even has a badge. [![Build Status](https://bzzz.zble.sk/api/badges/zblesk/zblesk-web-template/status.svg)](https://bzzz.zble.sk/zblesk/zblesk-web-template)\n\n# Check it out\n\nIf you want to take a look without bothering with a build, you can do a\n\n```bash\ndocker run --rm -p 8080:8080 zblesk/zblesk-web-template\n```\n\nThen browse to http://localhost:8080/ .\n\n# Building\n\nIt's a standard .net project. If you open it in Visual Studio 2022, all you need to do should be to hit 'run'. \n\nIn case of issues, you can go to `zblesk-web\\ClientApp`, run `npm install`, then try the dotnet build again.\n\n## Docker\n\nFor Docker, just `docker build -t zbleskwebtemplate .`\n\nTo run it, `docker run --rm -p 8080:8080 zbleskwebtemplate`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzblesk%2Fzblesk-web-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzblesk%2Fzblesk-web-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzblesk%2Fzblesk-web-template/lists"}