Your development machine will need to have the following installed.
- .NET Core SDK 2.1
- Webpack 4+
- Node.js
- PostgreSQL or SQL Server
- Visual Studio Code (or a similar text-based editor like Sublime)
The easiest way is to install via Yeoman
npm install generator-toucan
yo toucan
The alternative is to Git clone the project to a local folder and then follow steps below ...
Update and build the .NET Core projects by switching to to ./src/server and running
dotnet build
Update and build the TypeScript UI project by switching to ./src/ui and running
npm install
npm install webpack -g
npm install typings -g
typings install
webpack --config webpack.config.js
The first step in configuration is to decide what backing database to use. You can then ensure it is properly configured, and following that invoke scaffolding tools to generate initial data migrations.
For proper localization support ensure the server defaults are set to create
- new databases with a character set that supports unicode strings (ie. UTF8)
- client connections with default timezone set to 'UTC' for (via postgresql.conf)
Above steps may require a restart of the service/daemon. You can then proceed to
- update data:connectionString configuration key inside src/server/app.development.json*
- update
ConfigureServices()
method in src/server/startup.cs*, and uncomment the code block startingservices.AddDbContext<NpgSqlContext>
- update ./src/server/ContainerRegistry.cs, and uncomment the line stating
For<DbContextBase>().Use<NpgSqlContext>();
- add the same connection string details to src/data/npgsql.json* (required for EF tooling)
- (optional) add a database schema name to src/data/npgsql.json*
- scaffold migrations by switching to src/data* and running
dotnet ef --startup-project ../server migrations add Initial -c NpgSqlContext
- update data:connectionString* configuration key inside src/server/app.development.json*
- update the
ConfigureServices()
method in src/server/startup.cs*, and uncomment the code block startingservices.AddDbContext<MsSqlContext>
- update ./src/server/ContainerRegistry.cs, and uncomment the line stating
For<DbContextBase>().Use<MsSqlContext>();
- add the same connection string details to src/data/mssql.json* (required for EF tooling)
- (optional) add a database schema name to src/data/mssql.json*
- create migrations by switching to src/data* and running
dotnet ef --startup-project ../server migrations add Initial -c MsSqlContext
The system by default enables users to create a local login account using a signup page, which stores their credentials in the database.
It also enables users to login via an external authentication provider, using the OAuth 2.0 Implicit grant workflow.
Most external providers will required https support. This is covered off fairly well by Setting up HTTPS for development in ASP.NET Core
The project currently provides support for
To configure the
- Google Provider - edit
const GOOGLE_CLIENT_ID
key in google-provider.ts file, andclientId
in app.development.json - Microsoft Provider - edit
const MICROSOFT_CLIENT_ID
key in microsoft-provider.ts file, andclientId
in app.development.json
To remove a provider from appearing the UI, edit externalProviders
class property in login.ts
Run the project by switching to ./src/server and running
set ASPNETCORE_ENVIRONMENT=Development
set ASPNETCORE_URLS=https://localhost:5001
dotnet run -p server.csproj
You should now be able to load the site at https://localhost:5001/