Code Monkey home page Code Monkey logo

docs's Introduction

Documentation for SAFE Stack.

Build Status

How to build

  1. Install mkdocs - http://www.mkdocs.org/
  2. Install material theme - pip install mkdocs-material
  3. To preview run mkdocs serve
  4. To release run mkdocs gh-deploy

docs's People

Contributors

8 avatar akash-mair avatar alkasai avatar awright18 avatar davedawkins avatar fergusmeiklejohn avatar forki avatar isaacabraham avatar jordanmarr avatar jwthomson avatar kentcb avatar krzysztof-cieslak avatar kunjee17 avatar larocceau avatar mangelmaxime avatar markpattison avatar martinbryant avatar mattgallagher92 avatar mnie avatar mvsmal avatar olivercoad avatar outofscopeia avatar ricosaupe avatar selketjah avatar teknikal-wizard avatar theimowski avatar theprash avatar timlariviere avatar tom-sloboda avatar zaid-ajaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

mkdocs serve issue

C:\C#Projects\SAFE-Stack\docs\docs>mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:

  • template-webpack.md

I am getting this error while running mkdocs serve command. Anybody knows why?

Add migration path from v1 to v2

I think I saw a question during fsharpconf about migration path from v1 to v2.
Although we don't really support "upgrading" story, we might give a short description what other aspects changed between v1 and v2

Explain dev and prod environments

It's not easily clear how to go from dev to prod with SAFE apps - in dev you normally use webpack-dev-server to host the client but at deployment time you pre-compile the js and host in either the server as static content or some other way e.g. blob storage, function etc..

Add lots of recipes

This is a tentative list of "recipes" or "how-to" guides that the docs should offer. Hopefully each should be relatively small and quick to author!

Upgrading from SAFE v1

  • How do I upgrade a SAFE v1 project to SAFE v2?

Hosting

  • How do I host inside Docker?
  • How do I host inside Azure App Service?
  • How do I host inside Amazon Web Service?
  • How do I host inside IIS?
  • How do I host inside Google Cloud Platform App Engine?

Build

  • How should I combine the build outputs from client and server?
  • How do I add a build script to the project e.g. FAKE?
  • How do I remove the use of FAKE?

Package Management

  • How do I add a nuget package to the server?
  • How do I add a nuget package to the client?
  • How do I add an NPM package to the client?
  • How do I ensure NPM and Nuget packages stay in sync?
  • How do I migrate to Paket?
  • How do I migrate to Nuget?
  • How do I migrate to Yarn instead of NPM?

Client / server communication

  • How do I add support for Fable Remoting?
  • How do I add support for SignalR (https://shmew.github.io/Fable.SignalR)?
  • How do I add support for GraphQL?
  • How do I add a POST endpoint?
  • How do I add a GET endpoint?
  • How do I handle server errors on the client?
  • How do I share types between client and server?
  • How do I share code between client and server?
  • How do I add Server to Client communication with WebSockets?
  • What are my serialization options for HTTP communication?
  • How do I enable Server Side Rendering?
  • How do I configure Thoth to work with Decimals and other types?
  • How do I serve a file from the back-end?
  • How do I upload a file from the client?
  • How do I show server errors on the client?

Developing and Testing

  • How do I test my client application?
  • How do I test my server application?
  • How do I use hot reloading?
  • How do I debug my SAFE apps?
  • How do I add support for the remote container extension in VS Code?
  • How do I do logging in SAFE apps?

Fable

  • How do I reference an NPM module?
  • How do I use a third-party React package?

UI

  • What is the difference between Fable React and Feliz?
  • How do I add Bulma support?
  • How do I use different Bulma styles?
  • How do I add use raw CSS styles?
  • How do I add support for Feliz?
  • How do I add support for font awesome?
  • How do I use SASS with SAFE apps?
  • How do I migrate from a CDN stylesheet to an NPM package?

Server

  • How do I use Giraffe instead of Saturn?

Other Platforms

  • How do I share code between Web and Console applications?

WebPack

  • How do I add support for older browsers?

Other

  • How do I add application configuration?
  • How do I add environment specific configuration?

Security

  • How do I add oauth authentication to the Server?
  • How do I perform a standard login flow across my application?
  • How do I do authentication and role-based authorization using Azure AD?

Update documentation on registering an app on Azure for deployment

cc @isaacabraham

Currently the documentation uses the legacy application registration within Azure AD but there is no mention that you should use the legacy creation flow. We have 2 options for how to fix this

  1. We can change the wording to refer to App Registration (Legacy)
  2. We can look into how to use the new App Registration, this would likely need some changes
    • Screenshots will need updating
    • The new app registration has got rid of the idea of native apps and so we'd need to change this
    • A new app registration will by default only be available to users in the same tenant. If no tenant is supplied in the authenticate device function then an error is returned (AADSTS50059)

Use hot reload recipe not correct

In the hot reload recipe it says that you need to add the devServer to the webpack.config.js for the minimal template, this is not true. The devServer is already configured.

Update the website

I've been looking at giving the website a refresh. I think that we have a few options:

  1. Do nothing.
  2. Keep the site theme and tech (mkdocs) the same. Create a new static landing page, or simply incorporate it onto the docs home page.
  3. Migrate the site to a new tech e.g. hugo learn? Create a new static landing page, or simply incorporate it onto the docs home page.
  4. Create a new site that has a proper landing page and also a documentation area in it. I'm thinking of something along the lines of the actual Hugo site https://gohugo.io/, which has a proper landing page but integrated docs site with full search.

Keeping the site is the cheapest option but we're going to need to add / remove a lot of content anyway once v2 of the template drops. I strongly think that the current landing page should be replaced, although this could just be a static page that we chuck in as a one-off.

What do people think? Is anyone available to support with this?

Client / Server Communication

This is now outdated as of the latest SAFE template which uses Fable 2 and Thoth. I'm not even sure what the "correct" way to do this is.

  1. What should we replace the sample calls with fetchAs in the docs with?
  2. What needs changing on the server side? I assume that the section Turning on Fable's JSON Converter is now outdated and should be changed to use Thoth as well?
  3. What are the options, pros / cons, when should you use "full" Thoth or Auto decoding etc.?

cc: @MangelMaxime @theimowski @Krzysztof-Cieslak @alfonsogarciacaro.

Document interacting between client and server: return unit

When you return a unit from the server, Thoth.Json gives you this error:
Cannot generate auto decoder for Microsoft.FSharp.Core.Unit. Please pass an extra decoder.

There are a couple of known workarounds, it would be nice to have these known exceptions documenten somewhere.

Security / Auth

Discuss auth / security, explaining use of JWTs etc. and optionally Azure App Service turn-key auth.

Femto docs: should run inside Client rather than root directory

Femto docs mention that step 2 (analyse dependencies) should run in the root directory. That is not the case, you should either be inside the Client directory to run femto or point Femto to where the client directory is:

# Analyse dependencies
dotnet femto ./src/Client

# Resolve package requirements
dotnet femto ./src/Client --resolve

Please try it out locally to make sure it works too.

I just published Femto v0.8.7 and it should work ootb when instrumenting locally installed paket

Another thing to add if you working on the docs for Femto is to explain femto install because it abstracts nuget/paket and does automatic resolution of potentially required npm package (you can even use it for the Server project)

Explain webpack template

A short article explaining the different elements of the webpack template would be very useful, similar to the FAKE script documentation that we already have.

Docs build is broken

@theimowski I've had a look, seems that it happened a month ago or so... any idea what happened? I can't figure it out, something about a missing svg icon?

links broken on template overview page

the links to fulma templates are 404 ing on the template overview page :

none: don't add any CSS framework.
fulma-basic: adds Fulma basic template (default).
fulma-admin: adds Fulma with the 'Admin' Bulma template.
fulma-cover: adds Fulma with the 'Cover' Bulma template.
fulma-hero: adds Fulma with the 'Hero' Bulma template.
fulma-landing: adds Fulma with the 'Landing' Bulma template.
fulma-login: adds Fulma with the 'Login' Bulma template.

Error 404 when deployed through AspNetCoreModule

Hello,

just tried to deploy a quick start project to IIS using AspNetCoreModule (but I have to say that HttpPlatformHandler yelds the same results).

Project has been published as a framework-independent app which means that the whole .NET Core Framework gets published to support server where .NET Core hosting bundle had not previously installed.

So basically you create an image to publish like this:

dotnet publish --self-contained -r win-x64

That has been moved to server which is actually using Windows Azure Pack which is something similar to Azure AppService (in facts, I believe they are the same technology).

web.config file has been configured like this:

`

<system.webServer>

  <handlers>

    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />

  </handlers>

  <aspNetCore processPath=".\Server.exe" stdoutLogEnabled="true" stdoutLogFile=".\stdout.txt" />

</system.webServer>

`

So what it seem to happen is that server.exe starts and IIS proxies request to the process but once it does that, 404 is returned for root (/) request.

It seems the process (and not IIS) is handling the requests and returning a 404 as pet AspNetCoreModule log file.

'
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]

  Azure Web Sites environment detected. Using 'C:\home\ASP.NET\DataProtection-Keys' as key repository; keys will not be encrypted at rest.

Hosting environment: Production

Content root path: C:\home\site\wwwroot

Now listening on: http://127.0.0.1:30146

Application started. Press Ctrl+C to shut down.

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]

  Request starting HTTP/1.1 GET http://safedemo.eu-w.cloudapps.enterprisehost.biz/  

info: Microsoft.AspNetCore.Hosting.Diagnostics[2]

  Request finished in 67.5888ms 404 

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]

  Request starting HTTP/1.1 GET http://safedemo.eu-w.cloudapps.enterprisehost.biz/favicon.ico  

info: Microsoft.AspNetCore.Hosting.Diagnostics[2]

  Request finished in 1.7730000000000001ms 404 

'

Any hint ? Onto the file system contents of the server folder has been published to wwwroot folder while Shared and Client have been placed into the appropriate parent folder to the actual file system layout is:

C:\home\site\Client <---- Client folder contents here
C:\home\site\Shared <---- Shared folder contents here
C:\home\site\wwwroot <---- Server folder contents here

Any hint ?

Thanks.

Core documentation

Migrated from SAFE-Stack/SAFE-Stack.github.io#11

  • Introduction
    • Why SAFE?
  • Getting up and running
    • Quick start
    • SAFE Dojo
    • Example repositories
    • Feedback & Testimonials
    • Support and Training
  • SAFE Stack overview
    • Server Side programming in SAFE
    • Cloud Platform - Azure (AWS + GCP to come?)
    • Fable
    • Elmish
  • Mobile SAFE

Normalize links

We receive many issues about not working links, e.g. #187 #189 #191
If you look at how we create the links - sometimes it's an absolute and sometimes it's a relative reference.
We should use one single, normalised convention for the links and ideally automate checking that none of the links are "dead"

Add instructions on how to add packages

Hello,

As a newcomer to dotnet and F# ecosystem it would be very helpful if you added instructions on how to add dependencies to the project. Simply typing paket add PACKAGE, which is the instructions on nuget, is not enough. You have to do paket add PACKAGE --project Server/Server.fsproj for backend dependencies and paket add PACKAGE --project Client/Client.fsproj for frontend.

Travis not deploying latest SAFE-docs

Hey @theimowski!

It looks like for the last few merges into master the build has not been triggered since the Owner SAFE-Stack does not have enough credits.
Before that there seems to be an error of Abuse Detected for the following PR - Added 'SQLProvider SQL Server SSDT' to the Data recipes

Resources:

If you need anything else please let me know :)

Further simplify installation

I apologise in advance this is probably the wrong repo for this suggestion

Is it possible to install the prerequisites with a package like:

choco install dotnetsafe
brew install dotnetsafe
apt install dotnetsafe

Feels like we could lower the first barrier to entry by doing so

Update 'Handling "unit" calls' section

On this page, there is a section dedicated to Handling "unit" calls.

Today, I released a new versions of Thoth.Json(.Net) which add support for unit. Could someone from the SAFE stack test it and see if it's working correctly?

If yes, then we should add a mention that since Thoth.Json 3.4.0 and Thoth.Json.Net 3.6.0 users can now use unit in their server response.

Updating docs for V3 template

Hey guys!

I've put together a list of pages on the SAFE documentation that will need to be updated/added for the latest template

  • Introduction(wording .net core -> .net)

  • Quick Start

  • SAFE Stack Overview

  • Components of SAFE

    • Learn about Fable
  • The SAFE Template

    • The FAKE script
    • Overview(table at bottom)
  • How do I...

    • Upgrade from V2 to V3

    • Build

      • Remove FAKE from my project
      • Add build automation
      • Package my SAFE app for deployment
      • Support older browsers (LOW PRIORITY)
      • Create a docker image
    • Dev / Test

      • Test the Client
      • Test the Server
      • Debug a SAFE app
    • Client/Server

      • Perform roundtrips with MVU
      • Handle server errors on the client
      • Upload file from the client
      • Serve a file from the back-end
    • UI

      • Add FontAwesome support
      • Add Bulma support
      • Add Feliz support
    • Package Management

      • Migrate to Yarn from NPM
  • FAQ

    • Moving from dev to prod
  • Moving current docs into a Legacy V2 section (NEW)

  • Removing Legacy v1

  • Compare the generated sitemap with the current sitemap.xml

If I've missed something let me know :)

Electron Integration

Is there any support or guidance on how to integrate all this great work with an electron client application?

Inconsistency in SAFE's "S"

If you start at https://safe-stack.github.io/ and click Read the Documentation, and click Next two times, you end up on at SAFE Stack components, which tells you "S" is for Saturn.

But if you go back to https://safe-stack.github.io/ and click Read More About Safe, you end up at an announcement, which says that "S" is for Suave.

My guess is that the confusion is caused by an announcement that has become out of date. Either it should be updated, or the Read More About Safe link should point to a living page, rather than a fixed blog post.

Broken links in feature-clientserver-bridge.md

On the website: https://safe-stack.github.io/docs/feature-clientserver-bridge/

In the second paragraph the links "stateful APIs in Saturn" and "model-view-update pattern" are broken both on the website and in the Markdown source.

The website links are pointing to sub-resources (e.g. docs/feature-clientserver-bridge/component-saturn) instead of resources on the same level (e.g. docs/component-saturn).

The Markdown links don't work without the .md extension.

The previous commit seems to also be about broken links: 9edaf15

And this other issue: #158

Yarn required?

I've installed the most recent version of the SAFE stack template, and tried to follow the instructions from the quick start: https://safe-stack.github.io/docs/quickstart/

I have npm installed, but not yarn. When I tried to run fake build --target run, I received the following error:

Script reported an error:
-> yarn was not found in path. Please install it and make sure it's available from your path. See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info

After I installed yarn, it worked without issue. Should the language be changed to require yarn, instead of "yarn or npm"? If so, I'm happy to submit a PR.

Clarify stance on Suave

Right now the docs says that there is an issue with the Suave license. From what I can gather from the discussion at SuaveIO/suave#704 it seems like there is no Suave licensing issue but rather something else. Perhaps writing that SAFE stack is focusing on .net core in order to not cause undue confusion.

Start a list websites that use Fable

Start a list of websites/projects that use fable. This can show some places where fable is used in production. This would be useful for: introducing people to SAFE Stack; learning, especially in the case of open-source projects; and seeing what kind of things the community is using Fable for, especially for closed-source websites that can't be found by searching GitHub.

My thoughts are:

This list should ideally feature "real world" sites that use F# for a non-trivial part of the front-end. Demos like SAFE Search and documentation sites built with Fable such as the Feliz docs may still be useful to include in a section but should not be the focus.

Each listing should include a name, link, and a brief description of the extent that F# is used on the front-end and whether F# is also used on the back-end, if applicable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.