First Run
Clone Repo
git clone https://github.com/webinex/starter-kit
First Run
Ask Azure administrator for Service Bus connection string and topic name
Set them in:src/StarterKit/StarterKit.App.Api/appsettings.Personal.json
src/StarterKit/StarterKit.Identity/appsettings.Personal.json
{
"ConnectionStrings": {
"ServiceBus": "<your-service-bus-connection-string>"
},
"Cap": {
"TopicPath": "<your cap topic name>"
}
}Ask team lead for SendGrid access key
Set it in:src/StarterKit/StarterKit.Identity/appsettings.Personal.json
{
"SendGrid": {
"Key": "<your-sendgrid-key>"
}
}Create attachments folder
CreateD://starter-kit-attachments
folder or override attachments folder withsrc/StarterKit/StarterKit.App.Api/appsettings.Personal.json
{
"Attachments": {
"BasePath": "<your-fully-qualified-path-to-attachments-folder>"
}
}Create
starter-kit
database
If you'd like to use another database, you need to addappsettings.Personal.json
files in:src/StarterKit/StarterKit.App.Api
src/StarterKit/StarterKit.App.Migrations
src/StarterKit/StarterKit.Identity
src/StarterKit/StarterKit.Identity.Migrations
with:
{
"ConnectionStrings": {
"Default": "<your-connection-string>"
}
}Apply migrations
Go tosrc/StarterKit/StarterKit.App.Migrations
and rundotnet run -- migrate
Go tosrc/StarterKit/StarterKit.Identity.Migrations
and rundotnet run -- migrate
Setup SQL Server distributed cache
dotnet tool install --global dotnet-sql-cache
dotnet sql-cache create "Data Source=localhost;Initial Catalog=starter-kit;Integrated Security=True;" dbo DistributedCache
Run projects
Opensrc/StarterKit/StarterKit.sln
and run projectsStarterKit.Identity
andStarterKit.App.Api
Opensrc/StarterKit/StarterKit.App.Api/ClientApp
and runyarn install && yarn start
Sign Up
Open http://localhost:3000/sign-up and finish registration. Follow instructions in emailGive existing users admin permissions
declare @roleId uniqueidentifier = NEWID();
insert into Roles
values (@roleId, 'Admin');
insert into RolePermissions
values (@roleId, 'users.read'),
(@roleId, 'users.write'),
(@roleId, 'roles.read'),
(@roleId, 'roles.update'),
(@roleId, 'roles.create'),
(@roleId, 'roles.delete');
insert into RoleUsers (RoleId, UserId)
select @roleId, Id
from Users