.NET Core with Identity & JWT for Authentication, React Hooks with TypeScript and MobX for state management Cloudinary for Image uploads, transformations, ect.
New framework for styling
State Management MobX Developer Tools (Google Chrome)/ terrible at the moment
For api on frontend
Standard Routing
Image Uploads
Drag and drop images for upload
To resize image to perfection before upload
for nice date and time picker
Client side error handling
New form control
For nice user messages
safe access and control of user data
CTRL + . => quick fix menu
ASPNetCoreIdentity & UI User & Role Manager Salt & Hash (Secure) Passwords
Infrastructure folder add Jwt=> System.IdentityModel.Token.Jwt jtw.io => postman for jwt
Api folder add Microsoft.AspNetCore.Authentication.JwtBearer
Authentication/ infrustructure
Design and Security
Security/ Validation
Thin API Controllers => Dependency Injection Application Folder
for light configuration for database
User Secrets 'dotnet user-secrets': Dev Only init, clear, list, remove, set dotnet user-secrets init: DEV in APi folder dotnet user-secrets set "TokenKey" "Super Secret Key"
the "Server" Controls the application /API/Startup.cs => Server dotnet watch run from here in dev
API/Controllers/{RouteName}Controller handles where to send the requests => Application
Business Logic
Activities, Errors, User Fluent Validation (AspCoreNet) => Security/ Validation
DataBase Logic Takes care of context, seeds, data for application
Sqlite => for light configuration for database (To Start)
Entity
Config
Proxies
To Seed, delete db and start project
(Many ways, most efficiant;) add 'Seed.cs' to Persistance folder, create structure to Domain in 'Activity.cs' call the seed in Persistance 'DataContext.cs' command terminal 'dotnet ef migrations add "'update-name'" -p Persistence/ -s API/' Drop DB: dotnet ef database drop -p Persistence/ -s API/ to make new, run from api folder dotnet watch run
For anything needed across all backend folders or dont fit Security JWT
Step 1: creates new class library to work from in main folder 'dotnet new classlib -n Infrastructure' step 2: adding to projects sln 'dotnet sln add Infrastructure/' step 3: add dependencies 'cd Infrastructure/', 'dotnet add reference ../Application/' step 4: finish setting up dependencies 'cd ..' , 'cd API/' , 'dotnet add reference ../Infrastructure/' step 5: Restore project to maintain consistancy 'dotnet restore'
/Application/{API/RouteName}/{Create/edit} : Like models but with middleware handles all the controllers abilities- formats the request for specification
API/Controllers/{RouteName}Controller handles where to send the requests => Application
in api folder, ' dotnet user-secrets set "varName" "varValue" ' dotnet user-secrets list , (to view all user secrets in specified location)
For photo uploads
set catagery within env in api folder using ':' before variable name cd API/ , dotnet user-secrets set "Cloudinary:CloudName" "varValue" dotnet user-secrets set "Cloudinary:ApiKey" "varValue" dotnet user-secrets set "Cloudinary:ApiSecret" "varValue"
dotnet user-secrets list , (to view all user secrets in specified location)
publishing to azure
SQL Server
delete wwwroot, create backend release of frontend; dotnet build Make sure to run: cd client-app/, 'npm run build' then
Delete publish folder in API/ dotnet publish -c Release -o API/publish --self-contained false .NETReact.sln