4ddab34ad171e2bce0c27d91f40b70e5aa53a85c
MyOffice
Layers Frontend <-> Backend <-> Services <-> Repositories <-> Database
1. MyOffice.SPA Frontend layer Angular
2. MyOffice.Web Backend layer ASP Core
3. MyOffice.Data.Services Services layer
5. MyOffice.Data.Models Models
6. MyOffice.Data.Repositories Database layer
7. MyOffice.DbContext AppDbContext EntityFramework Core
8. MyOffice.Migrations.Postgres Postgres Migrations
9. MyOffice.Migrations.Sqlite Sqlite Migrations
DataBase
- SQLite
- PostgreSql
- MS SQL
Develompent
- Local IIS
- Express IIS
Authentication & Authorization
- Identity Server 4
- Custom UserStore
- Login with Google
- Login with Auth0
Build & Deploy
- Build with .bat
- Deploy to Linux
Get started
- create new project dotnet new angular-template.ase.com.ua -p MyProject
- Build (restore nuget and npm packages)
- Run Frontend, in Terminal ".\spa_start.bat" (default http://localhost:4200)
- Set startup project to MyProject.Web
- Select 'IIS Express', Run Backend (F5)
- open in browser http://localhost:4200
add site to IIS
- add Site name:myproject Physical path:...\MyProject\MyProject.Web Port:9100
- Select 'IIS', Run Backend (F5)
Settings
- launchSettings.json
- appsettings appsettings.json appsettings.Development.json appsettings.Production.json
External providers
- Auth0 appsettings ExternalProviders:Auth0
- Google appsettings ExternalProviders:Google
PowerShell scripts
- use 'Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass' to allow run *.ps1
- params.txt 2.1. publish_folder=_Published (folder to publish) 2.2. linux_user=root (linux user) 2.3. linux_host=192.168.1.215 (linux host) 2.4. linux_folder=/var/www/MyProject (folder in linux)
Build
- .\build.ps1 1.1. '.\build.ps1' - build Backend + Frontend 1.2. '.\build.ps1 dotnet' build Backend 1.3. '.\build.ps1 spa' build Frontend
Deploy to linux
- linux_deploy.ps1 1.1. '.\linux_deploy.ps1' - copy to linux and run 1.2. '.\linux_deploy.ps1 copy' copy to linux 1.3. '.\linux_deploy.ps1 run' run at linux
Languages
SCSS
35.4%
C#
32.2%
TypeScript
19.8%
HTML
8.9%
CSS
3.2%
Other
0.3%