All Projects → bradymholt → aspnet-core-vuejs-template

bradymholt / aspnet-core-vuejs-template

Licence: MIT license
ASP.NET Core / Vue.js SPA Template App

Programming Languages

C#
18002 projects
Vue
7211 projects
typescript
32286 projects
Jinja
831 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to aspnet-core-vuejs-template

Aspnet Core React Template
ASP.NET Core 3.1 / React SPA Template App
Stars: ✭ 539 (+618.67%)
Mutual labels:  spa, asp-net-core, postgresql-database
ajxnetcore
Its an innovative method to turn an ASP.NET Core Application Into Single Page Application, While enhancing the Software performance both on server and client side.
Stars: ✭ 31 (-58.67%)
Mutual labels:  spa, asp-net-core
Sunengine
SunEngine – site engine with blog, forum and articles sections features support.
Stars: ✭ 130 (+73.33%)
Mutual labels:  spa, asp-net-core
SPA-With-Blazor
Creating a Single Page Application with Razor pages in Blazor using Entity Framework Core database first approach.
Stars: ✭ 27 (-64%)
Mutual labels:  spa, asp-net-core
magento
Free PWA & SPA for Magento
Stars: ✭ 34 (-54.67%)
Mutual labels:  spa
SQRL-For-Dot-Net-Standard
SQRL for the .Net Standard runtimes. Secure Quick Reliable Login is a highly secure user privacy based authentication system that removes the need for users to have more than one password for a global identity https://www.grc.com/sqrl/sqrl.htm for more information of the protocal.
Stars: ✭ 26 (-65.33%)
Mutual labels:  asp-net-core
high-performance-aspnet-core-workshop
Sample application used in the High-Performance ASP.NET Core Workshop
Stars: ✭ 29 (-61.33%)
Mutual labels:  asp-net-core
PressCenters.com
News aggregator for the press releases of the Bulgarian government sites written in ASP.NET Core
Stars: ✭ 91 (+21.33%)
Mutual labels:  asp-net-core
laravel-react-spa
A Laravel-React SPA starter project template.
Stars: ✭ 94 (+25.33%)
Mutual labels:  spa
Awesome-Nuget-Packages
📦 A collection of awesome and top .NET packages sorted by most popular needs.
Stars: ✭ 87 (+16%)
Mutual labels:  asp-net-core
HRMS
░▒▓█ 𝑯𝒖𝒎𝒂𝒏 𝑹𝒆𝒔𝒐𝒖𝒓𝒄𝒆𝒔 𝑴𝒂𝒏𝒂𝒈𝒆𝒎𝒆𝒏𝒕 𝑺𝒚𝒔𝒕𝒆𝒎 𝑷𝒓𝒐𝒋𝒆𝒄𝒕 █▓▒░
Stars: ✭ 33 (-56%)
Mutual labels:  postgresql-database
modern-webpack-starter
🏰 A modern JavaScript starter using Webpack 4. Made in a simple way - good for learning or starting a new project without having to rollout cli-auto-builders.
Stars: ✭ 42 (-44%)
Mutual labels:  spa
prometheus.aspnetcore
Prometheus instrumentation for .NET Core
Stars: ✭ 29 (-61.33%)
Mutual labels:  asp-net-core
vue-admin-better
🚀🚀🚀vue admin,vue3 admin,vue3.0 admin,vue后台管理,vue-admin,vue3.0-admin,admin,vue-admin,vue-element-admin,ant-design,vue-admin-beautiful-pro,vab admin pro,vab admin plus,vue admin plus,vue admin pro
Stars: ✭ 12,962 (+17182.67%)
Mutual labels:  vue-template
parcel-plugin-prerender
No description or website provided.
Stars: ✭ 42 (-44%)
Mutual labels:  spa
MediatR.AspNetCore.Endpoints
No description or website provided.
Stars: ✭ 89 (+18.67%)
Mutual labels:  asp-net-core
ExcelExport
Classes to generate Excel/CSV Report in ASP.NET Core
Stars: ✭ 39 (-48%)
Mutual labels:  asp-net-core
Cake-Shop
A sample Cake Shop Website built with ASP.NET Core (Multi-Page Application)
Stars: ✭ 44 (-41.33%)
Mutual labels:  asp-net-core
ImageResize
Image resizing tool for .Net applications with ability to add text/image watermark, Supports animated images as well.
Stars: ✭ 45 (-40%)
Mutual labels:  asp-net-core
simplehstore
🏪 Easy way to use a PostgreSQL database (and the HSTORE feature) from Go
Stars: ✭ 54 (-28%)
Mutual labels:  postgresql-database

ASP.NET Core / Vue.js SPA Template App

This app is a template application using ASP.NET Core for a REST/JSON API server and Vue.js for a web client.

Overview of Stack

  • Server
    • ASP.NET Core
    • PostgresSQL
    • Entity Framework Core w/ EF Migrations
    • JSON Web Token (JWT) authorization with OpenIddict
    • Docker used for development PostgresSQL database and MailCatcher server
  • Client
    • Vue.js
    • Webpack for asset bundling and HMR (Hot Module Replacement)
    • CSS Modules
    • Fetch API for REST requests
  • Testing
    • xUnit for .NET Core
    • MailCatcher for development email delivery
  • DevOps
    • Ansible playbook for provisioning (Nginx reverse proxy, SSL via Let's Encrypt, PostgresSQL backups to S3)
    • Ansible playbook for deployment

Setup

  1. Install the following:
  2. Run npm install && npm start
  3. Open browser and navigate to http://localhost:5000.

Scripts

npm install

When first cloning the repo or adding new dependencies, run this command. This will:

  • Install Node dependencies from package.json
  • Install .NET Core dependencies from api/api.csproj and api.test/api.test.csproj (using dotnet restore)

npm start

To start the app for development, run this command. This will:

  • Run docker-compose up to ensure the PostgreSQL and MailCatcher Docker images are up and running
  • Run dotnet watch run which will build the app (if changed), watch for changes and start the web server on http://localhost:5000
  • Run Webpack dev middleware with HMR via ASP.NET JavaScriptServices

npm run migrate

After making changes to Entity Framework models in api/Models/, run this command to generate and run a migration on the database. A timestamp will be used for the migration name.

npm test

This will run the xUnit tests in api.test/ and the Vue.js tests in client-web.test/.

npm run provision:prod

Before running this script, you need to create an ops/hosts file first. See the ops README for instructions.

This will run the ops/provision.yml Ansible playbook and provision hosts in ops/hosts inventory file. This prepares the hosts to recieve deployments by doing the following:

  • Install Nginx
  • Generate a SSL certificate from Let's Encrypt and configure Nginx to use it
  • Install .Net Core
  • Install Supervisor (will run/manage the ASP.NET app)
  • Install PostgreSQL
  • Setup a cron job to automatically backup the PostgresSQL database, compress it, and upload it to S3.
  • Setup UFW (firewall) to lock everything down except inbound SSH and web traffic
  • Create a deploy user, directory for deployments and configure Nginx to serve from this directory

npm run deploy:prod

Before running this script, you need to create a ops/hosts file first. See the ops README for instructions.

This script will:

  • Build release Webpack bundles
  • Package the .NET Core application in Release mode (dotnet publish)
  • Run the ops/deploy.yml Ansible playbook to deploy this app to hosts in /ops/hosts inventory file. This does the following:
  • Copies the build assets to the remote host(s)
  • Updates the appsettings.json file with PostgresSQL credentials specified in ops/hosts file and the app URL (needed for JWT tokens)
  • Restarts the app so that changes will be picked up

Development Email Delivery

This template includes a MailCatcher Docker image so that when email is sent during development (i.e. new user registration), it can be viewed in the MailCacher web interface at http://localhost:1080/.

Visual Studio Code config

This project has Visual Studio Code tasks and debugger launch config located in .vscode/.

Tasks

  • Command+Shift+B - Runs the "build" task which builds the api/ project
  • Command+Shift+T - Runs the "test" task which runs the xUnit tests in api.test/ and Mocha/Enzyme tests in client-web.test/.

Debug Launcher

With the following debugger launch configs, you can set breakpoints in api/ or the the Mocha tests in client-web.test/ and have full debugging support.

  • Debug api/ (server) - Runs the vscode debugger (breakpoints) on the api/ .NET Core app
  • Debug client-web.test/ (Mocha tests) - Runs the vscode debugger on the client-web.test/ Mocha tests

Credit

The following resources were helpful in setting up this template:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].