Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

A basic template for a SAFE stack application, managing secure URLs and APIs via JWT authentication. Based on SAFE 1.18.0

Notifications You must be signed in to change notification settings

Freymaurer/LogIn-SAFE-Template

Repository files navigation

ARCHIVED

Please check out a more up to date exmaple here.

SAFE Template

This template can be used to generate a full-stack web application using the SAFE Stack. It was created using the dotnet SAFE Template. If you want to learn more about the template why not start with the quick start guide?

Install pre-requisites

You'll need to install the following pre-requisites in order to build SAFE applications

  • The .NET Core SDK
  • FAKE 5 installed as a global tool
  • The Yarn package manager (you an also use npm but the usage of yarn is encouraged).
  • Node LTS installed for the front end components.
  • If you're running on OSX or Linux, you'll also need to install Mono.

Additions to SAFE-Template

Added Dependencies to work with Asp.Net Identity Framework and EntityFramework

nuget Microsoft.AspNetCore.Identity.EntityFrameworkCore
nuget Microsoft.AspNetCore.Identity.UI 3.0.0
nuget Microsoft.EntityFrameworkCore.InMemory
nuget Microsoft.EntityFrameworkCore.SqlServer
nuget Microsoft.EntityFrameworkCore.Tools 3.0.0

This allows to either use and InMemory storage of users or to use an Sql Server. If you don't want to use the Sql Server you can delete the EFIdentityDummyProject.

Use Asp.Net Identity with an Sql Database

The EFIdentityDummyProject is used to create the databases used by the Identity framework. To accomplish this, open the solution in Visual Studio -> Tools -> Nuget Package Manager -> Package Manager Console und navigate to the EFIdentityDummyProject - folder (use dir to check current location and cd ThisCouldBeYourPath\EFIdentityDummyProject to navigate to the folder containing the Startup.cs file) then type Update-Database -Project EFIdentityDummyProject -StartupProject EFIdentityDummyProject and the necessary databases will be build. (source)

Work with the application

To concurrently run the server and the client components in watch mode use the following command:

fake build -t Run

SAFE Stack Documentation

You will find more documentation about the used F# components at the following places:

If you want to know more about the full Azure Stack and all of it's components (including Azure) visit the official SAFE documentation.

Troubleshooting

  • fake not found - If you fail to execute fake from command line after installing it as a global tool, you might need to add it to your PATH manually: (e.g. export PATH="$HOME/.dotnet/tools:$PATH" on unix) - related GitHub issue

About

A basic template for a SAFE stack application, managing secure URLs and APIs via JWT authentication. Based on SAFE 1.18.0

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published