Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This will eventually be a guide entry that documents how to use a combination of a special backup file as well as email account validation to allow for full account recovery, including private files and data.
We're filling out new information here ahead of publishing our dashboard, so links may change or not be live yet. A development alpha version is at https://dashboard-develop.fission.app/
Like all Fission apps -- including the ones made by Fission directly -- you need to give permission to the Dashboard app to access your account info.
The first account management feature in the Dashboard is to show the verification status of your account, and to resend your verification email if it ended up in your spam.
Fission Drive lets you browse public, unencrypted files stored on IPFS.
Fission Drive is currently a preview release of our upcoming file storage and identity system that lets you take your files anywhere, encrypted end-to-end as well as for public hosting of files, websites, and apps.
The Preview release is an exploration of the interface, and currently supports only public files.
You can browse any IPFS directory, not just those hosted on Fission, by entering in the hash, or Content ID (CID), of a directory.
You can use QmbCLefkFuXbhHBWSW7PWmJzBL7W7e8zm41HK4DGJ1RDwV
as an example folder to browse. Visit drive.fission.codes to try it out.
The hash above represents Boris' public files, which you can also see in the default IPFS browser at boris.fission.name.
Preview supports system wide / browser settings for dark vs. light mode and will switch automatically when you change those settings.
Note: ChromeOS does not currently support dark mode.
Clicking on an image will give you a file preview.
Click on the double arrows in the top right hand corner to embiggen the preview to full screen. Hit the X to close the preview.
The "Open in new tab" link will give you a permanent link for sharing the current file, using the Fission IPFS gateway.
Yes, this works on mobile!
Use arrow keys to navigate, enter to open preview.
When you create a Fission Account, whether signing up on the web or using the command line as a developer, it creates a username and email address in our service database, and also a private / public key pair representing that account.
We also create a Fission Web Native File System (WNFS) attached to your account, and given you access to Fission Drive, which lets you browse all your files, access them from any browser, and see which apps are attached to your file system.
We verify your email address, and can use that to help manage aspects of your service with us. You hold access to the keys connected to your account, and sign in happens automatically.
We encourage you to "link" your account to multiple devices -- your desktop and your phone, your home and your work computers, and so on. These devices can then be used to login, or link more accounts. You can read more about Account Linking »
Each device gets their own private key using the WebCrypto API built into modern browsers. Private keys shouldn't be copied around, so instead, we link keys indicating they have access to the same account.
There is no "sign out" for a Fission-powered app. You use your key to do a passwordless login, stored in your local desktop browser, mobile web browser, or your local desktop file system with the command line developer tool.
While your device is linked with a key, Fission apps will check that you have a key with the proper permission, and will just let you right in, without having to remember a password or even a username.
This is like your smartphone: only a single user is "logged in" to their personal phone, and they aren't shared.
A Fission app is more like an app that you download on your phone. When you don't want the app anymore, you delete it.
If you want it again in the future, you download it again, by giving permission to the app store to install it. You then might give permission to access other parts of your phone, like the camera or GPS.
We don't delete the data that the app stored for you, since it's stored in your own Fission File System -- just like data is stored on your phone.
As part of signing into an app, an app will ask for certain permissions. Right now, these are mostly related to access to your file system.
By default, every app needs access to an App Folder. You'll need to at least grant access to an App Folder for the app to function correctly.
Instead of signing out, you may want to revoke -- or delete -- an app's access to your account.
You can even revoke access to the default Drive app, but we'll ask you to make an extra confirmation. You'll need to use another tool or developer API access to manage your Fission File System attached to your account.
Browsers and desktop computers aren't smartphones, and they do get shared. You can unlink a device -- remove your key -- by visiting the Fission Auth page.
You may create multiple Fission accounts, but you'll need a unique email address and username for each one. You'll also need to use Browser Profiles to be able to access them at the same time on the same machine, as the keys that grant access are stored in the browser.
There is a live beta of the development version available at https://dashboard-develop.fission.app/. It might delete your apps or eat your JavaScript.
All of the apps that you have published with your account are listed on the Apps page.
As well as using the Fission CLI to register and publish apps, you can drag and drop a folder of HTML, CSS, and JavaScript files to create and publish your app directly from the browser.
Behaviour between drag-and-drop and the file chooser differs slightly!
If you upload files via drag-and-drop, e.g. by selecting the files index.html
and styles.css
and dropping both, you'll end up with these two files at the root of your app, so e.g. at your-app.fission.app/index.html.
If you upload files via clicking on the drop area, you'll open a directory chooser. There, select the directory that contains all files you want to have served on your app. So, e.g. choose the build
directory that contains the index.html
and styles.css
files.
When you click on an app in your apps list, you get to a page you can update, rename or delete your apps on.
Get your first site up and running with this beginner-friendly guide
With fission
installed, we are ready to set it up on your local machine. If this is your first time using fission
, you will be prompted for a username and an email to confirm your new account.
A private key has been generated for your machine and saved in the ~/.config/fission/key/
directory. This key secures your communication with Fission services and works like using an SSH key to connect to GitHub.
If you already have an account created in a web browser, you can link it on your local machine. See the Fission CLI linking guide to link your account.
Let's publish a simple webpage with Fission! We will write a simple webpage, register it as a Fission app, and publish it to the web.
Create a project directory and an index.html
file.
Add some content to index.html
:
Run fission app register
command to initialize the webpage as a Fission app. You will be prompted for a build directory.
Press enter to set hello-universe
as your build directory, and fission
will initialize your app.
Fission will create a fission.yaml
file with your app configuration.
The url
is where your webpage will be on the web after it has been published, build
tells the fission which directory to publish, and ignore
is a list of files and directories to ignore. See the Fission YAML guide for more details.
Run fission app publish
to publish the webpage.
Copy the URL from the last line and paste it into your web browser to view the webpage live on the web. Nice and simple!
It may take a few minutes for DNS to propagate. If you don't see the webpage live at the URL, come back and try again in a bit. You can also take the URL from the CLI output and view the webpage athttps://ipfs.runfission.com/ipfs/{URL}
right away.
To get setup on different devices or browsers, follow the account linking process
To have access to your account across multiple devices, you need to link them.
When you visit an app on a new device and Sign in with Fission, or if you go directly to the Fission Auth page, you'll be prompted to either create a new account or link an existing one:
If you have an account already, click the sign in button:
The only thing you need to know is your username. Enter it, and hit the link account button:
As you can see, you are now being asked to open the Fission Auth page on your other device. This might be your other computer or perhaps your phone. There is also a short message telling us that this is for the boris0902
username.
Once you open the Fission Auth page on your other device, it will detect the linking request and display a page like this.
The new device you are linking should show the same numbers:
Since we can see the numbers are the same, we can go ahead and hit the "Approve" button, and you'll see this success message.
Switching to the new device you were linking, you'll see this message:
Now you can use either device with full authorization
And yes, this works on mobile too:
The Fission Command Line Interface (CLI)
The Fission CLI is a developer tool for working with apps and managing your account on the Fission platform.
The Fission CLI uses multipart commands with the structure:
Commands group related subcommands into operations on apps or accounts. Options extend functionality or display help information.
Shortcuts combine a command and subcommand into a shortcut command:
The options that would apply to the multipart command also apply to the shortcut.
This guide covers the most commonly used options. More options are available for you to explore and you can always to ask us more about them!
The --help
option displays a quick reference at any command level.
At the top level, fission --help
displays a high-level summary of all commands and shortcuts.
The Fission CLI account management commands
Use fission setup
, fission user whoami
, and fission login
to set up your account, display your username, and link your account in web browser.
The fission setup
command registers your account with Fission or links to your existing Fission account.
When you register a new account, you will be prompted for a username and an email. Fission will send you an email to confirm your account and complete your registration.
The fission setup
command will create a global config.yaml
file in your ~/.config/fission
directory. See the guide for more information about the config.yaml
file.
Use fission user whoami
to display your username.
You can link your Fission account in a web browser to interact with Fission-enabled apps. The fission login
command sets up the CLI to listen for requests to link your account.
The browser window and command line will display confirmation codes. Verify that the confirmation codes match and grant access at the command line.
The browser window will update to show that you have successfully linked your account.
If you are signed into a Fission account in a web browser, you can link your account and use it at the command line.
Use fission setup
to create and link a CLI user at your command line.
When prompted, enter Y
to confirm you have an account and enter your username from the browser window. The auth lobby and CLI will display a confirmation code.
When you have confirmed that the codes match, approve in the browser, and the CLI will complete the setup process and link your account.
You can set up your machine with an existing account if you have the machine_id.ed25519
key. Use --with-key
argument and the path to your key.
Install the Fission command line tools to start publishing from your desktop.
The Fission command line interface (CLI) is the most common way for developers to interact with Fission services.
Note: For Apple Silicon (M1) Macs, we are currently unable to provide native CLI builds. Please follow to run the intel version under Rosetta 2 emulation.
Use the Homebrew recipe to install the CLI on macOS. This taps and installs in one command:
You can also follow the next section for a manual install on macOS.
For Windows users, we currently recommend using Windows Subsystem for Linux 2 (WSL2). WSL1 is not supported. Run these Linux / Manual install instructions in your WSL2 environment.
Head over to our page on Github and download the latest release for your operating system.
Grant execute permissions and move the binary onto to your PATH. For example, on Ubuntu 20.04:
That's it! Double check that it's installed correctly.
If you run into any problems, check that you have libssl1.1
(installed with OpenSSL) and libtinfo5
(or libtinfo6
). Most recent Linux distributions will already have these libraries installed.
On macOS, you will also need libcrypto1.1
installed and linked on your system, which should be available from OpenSSL.
Run fission --version
to check if you are using an old version of the CLI.
To upgrade the CLI on macOS, brew uninstall
and brew untap
to reset brew
.
Reinstall with brew tap
and brew install
.
More information on global and app YAML configuration files.
Fission stores global and app configuration options in YAML files. The global configuration is stored in a config.yaml
file and app configurations are stored in fission.yaml
files.
After you run fission user setup
, you will have a global config.yaml
in your ~/.config/fission/
folder. You can open config.yaml
in a text editor or display it at the command line.
The default global config.yaml
will looks something like this:
In most cases, the only thing you will want to change in this file is the ignore
section. The other sections are managed by the Fission CLI.
Ignore is a list of files you don't want fission app publish
to publish. For example, you might add commonly ignored files and secrets.
Ignore follows the same conventions used in a .gitignore
file.
Username is a name you select for yourself during fission setup
.
The UCAN that was used to link from another device or browser. null
if the account was created on this device.
Server DID is the identity of the Fission server that authenticates your requests when using the Fission CLI.
We configure your machine to directly connect to our servers. The peers are the IP addresses and fingerprints of our servers.
Eventually, we'll have a list of peers around the world.
Timestamp of the last check for an updated version of the CLI.
The path to the key used to sign requests made when using the Fission CLI.
When you create a new app with fission app register
, a fission.yaml
file is created in the directory where you ran the command. The default fission.yaml
file looks something like:
Ignore works the same as the ignore in the global configuration. You can use it to list files that you do not want to publish.
You might use it to ignore a directory like node_modules
or all files with an extension like Photoshop .psd
files.
YAML can specify lists in a couple of different ways, both like this, or as comma-separated list shown in the global config.yaml
example above.
The URL where your app is viewable after it has been published.
Eventually, you will be able to publish different versions of your app -- for example, development, testing, production, etc. -- and use custom domains for your app.
The build directory is the directory the Fission CLI will publish. Use this when you have a build step that produces a production-ready version of your application.
The build directory is set as a relative path from the location of the fission.yaml
file.
If you are using a well-known build directory, the Fission CLI will attempt to detect it the first time you run fission app register
. It will prompt you and ask if you would like to use the directory it detects.
The Fission CLI commands to work with apps
Use the fission app
command and its subcommands to work with apps. The main operations are registering an app, publishing an app, and displaying information about an app.
The fission app register
command initializes a new app and links it to your Fission account.
You will be prompted for a build directory. The Fission CLI will publish your app from the build directory you select.
If you are using a common build directory, the Fission CLI will detect it when you run fission app register
and suggest it. You accept the suggestion or enter another build directory as a relative path from the fission.yaml
file.
The Fission CLI will create a fission.yaml
configuration file with a list of files to ignore, a URL where your app will be viewable after it is published, and a build directory. See the for more information about the fission.yaml
file.
You can also use a custom domain name for your app. See the guide to set up a custom domain name.
The fission app register
command has advanced options:
Use the fission app publish
command to publish your app to the web. Run this command from the directory that contains your app's fission.yaml
configuration file.
The fission app publish
command publishes your app and associates it with the URL in the fission.yaml
file. After your app is published, the Fission CLI will output a success message and the URL for your app.
The fission up
command is a shortcut for fission app publish
.
The fission app publish
command has advanced options:
You can continuously publish your app by adding the --watch
option. The Fission CLI will watch your build directory and publish whenever it detects a change.
This means that as you work in your local development environment, changes are continuously streamed online as you save. Note that some development environments have different code and output options than "production", but this will allow you to quickly and easily share a live online version with other people.
Use fission app info
to display the URL where your app is viewable.
The guide has details on linking accounts used at the command line.
The registration process will also create a for you automatically at the URL YOURNAME.fission.name
using your Fission username.
Open the in a browser window, select "Sign In", enter your Fission username, and select "Link Account".
Open the in a browser window.
On Linux, repeat the listed above, leaving out the installation of the additional libraries.
Fission powers next generation app publishing.
For developers, they can design a user app using only front end and design skills. The web native app can be installed by 10 or 10,000 users, just like mobile or desktop software. Because the app is running on the user's computer, you can focus on finding new users and adding new features, rather than having to learn DevOps or server scaling.
People using apps create a secure identity in their browsers. Every Fission account is linked to a file system, available in any browser. Much like an open source iCloud, users give permissions to apps, and can access their files from anywhere. Users can browse their file system, both public and private, and mix and match which apps they use, just like they're used to with mobile and desktop apps.
Get started by installing the Fission CLI »
Learn more about Fission Accounts, and try one out by installing the Drive app »
Installing the Webnative SDK
You can add the webnative SDK to a project by loading it from a CDN or installing it with a package manager.
For prototyping or experimentation, you can use the latest version of the SDK.
We recommend linking to a specific version in production to avoid unexpected changes.
We recommend installing with a package manager for larger projects that use build tools or bundlers.
Install the SDK with npm
or your preferred package manager.
Import the SDK in your application.
Build Target. Webnative uses cryptographic libraries that rely on BigInt and other modern browser standards. In some cases, you may need to set your build tool or bundler to target es2020
to use webnative.
Paths in the Webnative SDK
Webnative uses directory and file paths built from path segments by path functions.
All webnative SDK methods expect paths created by path functions. See the path API documentation for more path utility functions.
Path Objects. The path functions create objects like { directory: ["public", "some", "directory"] }
or { file: ["public", "some", "file"] }
. We recommend you use path functions because they validate paths to make sure they are well-formed.
A native arm64
version of the Fission CLI is not yet available. When support is ready in the Haskell compiler, we will ship native binaries. In the meantime, the Fission CLI runs under "Rosetta 2" emulation. To get this working:
Ensure Rosetta 2 is installed:
Install the x86_64
version of homebrew:
This will install a separate version of homebrew in /usr/local
for x86_64 tools.
Finally, Install the Fission CLI via:
The Fission CLI will now be available at /usr/local/bin/fission
For convenience you may want to add something like alias ibrew='arch -x86_64 /usr/local/bin/brew'
to your shell configuration for managing Intel formulae using ibrew COMMAND
(e.g. ibrew install fission-suite/fission/fission-cli
).
Instructions for DNS and domain registrar settings to use a custom domain with Fission
Every Fission App gets a free subdomain.
Currently, these look like YOURUSERNAME.fission.name
, but we're migrating to user accounts and attached apps, where every app has YOURAPPNAME.fission.app
.
To use a custom domain of your own, like YOURAPPDOMAIN.com
, you need to make some changes to DNS. There are two methods detailed in the following pages:
- move your nameservers to Fission, we automate everything
- create a CNAME and TXT record and point them at Fission services
Note: custom domains currently require manual confirmation by us. This will be integrated directly into the Fission CLI and be fully automated. For now, if you want to use this feature.
Working with the Webnative File System (WNFS)
The Web Native File System (WNFS) is a file system built on top of the InterPlanetary File System (IPFS). Each Fission user has their own WNFS, and apps store user files and data in it when granted permission.
Each file system has a public tree and a private tree, much like your macOS, Windows, or Linux desktop file system. The public tree is "live" and publicly accessible on the Internet. The private tree is encrypted so that only the owner can see the contents.
All information (links, data, metadata, etc.) in the private tree is encrypted. Decryption keys are stored so that access to a given directory grants access to all of its subdirectories.
WNFS is structured and functions similarly to a Unix-style file system, with one notable exception: it's a Directed Acyclic Graph (DAG), meaning that a given child can have more than one parent (think symlinks but without the "sym").
Every file system action checks if an app has received sufficient permissions from the user. Apps request permissions
when they initialize webnative. The .
Apps request permission for app storage, additional private and public directories, and user apps published with the Platform APIs. For example, a notes app might request these permissions.
The app would have access to its dedicated app storage and public and private Notes directories.
Apps request permissions.app
to store user data in a default app storage directory and other public and private directories. Webnative creates these directories for your app if they do not already exist.
The initialize function will return a NotAuthorised
scenario if one of the UCAN will expire in one day to minimize the likelihood of receiving an expired permissions error. But to be safe, apps should also account for this error.
WNFS exposes a POSIX-style interface:
add
: add a file
cat
: retrieve a file
exists
: check if a file or directory exists
ls
: list a directory
mkdir
: create a directory
mv
: move a file or directory
read
: alias for cat
rm
: remove a file or directory
write
: alias for add
The publish
function synchronizes your file system with the Fission API and IPFS. WNFS does not publish changes automatically because it is more practical to batch changes in some cases. For example, a large data set is better published once than over multiple calls to publish
.
Returns: CID
the updated root CID for the file system.
Remember to publish! If you do not call publish
after making changes, user data will not be persisted to WNFS.
Methods for interacting with the filesystem all use absolute paths.
The FileContent
that WNFS can store includes FileContentRaw
, Blob
, string
, number
, and boolean
. FileContentRaw
is Uint8Array
. In addition, the private file system can store Object
s.
add
Adds file content at a given path.
Params:
path: FilePath
required
content: FileContent
required
Returns: CID
the updated root CID for the file system
Example:
cat
Retrieves some file content at a given path.
Params:
path: FilePath
required
Returns: FileContent
Example:
exists
Checks if there is anything located at a given path.
Params:
path: DistinctivePath
required
Returns: boolean
Example:
get
Retrieves the node at the given path, either a File
or Tree
object
Params:
path: DistinctivePath
required
Returns: Tree | File | null
Example:
ls
Returns a list of links at a given directory path
Params:
path: DirectoryPath
required
Returns: { [name: string]: Link }
Object with the file name as the key and its Link
as the value.
Example:
mkdir
Creates a directory at the given path
Params:
path: DirectoryPath
required
Returns: CID
the updated root CID for the file system
Example:
mv
Move a directory or file from one path to another.
Params:
from: DistinctivePath
required
to: DistinctivePath
required
Returns: CID
the updated root CID for the file system
Example:
rm
Removes a file or directory at a given path.
Params:
path: DistinctivePath
required
Returns: CID
the updated root CID for the file system
Example:
write
Alias for add
.
Params:
path: FilePath
required
content: FileContent
required
Returns: CID
the updated root CID for the file system
Example:
Each file and directory has a history
property, which you can use to get an earlier version of that item. We use the delta
variable as the order index, primarily because the timestamps can be slightly out of sequence due to device inconsistencies.
Requesting many versions with file.history.list
can be slow. The acceptable delay will depend on your application.
Fission Platform APIs
The webnative platform API provides methods to work with the apps associated with users.
The platform API makes it possible to manage user apps and, combined with the webnative filesystem methods, create and manage apps entirely from the browser.
Yes, you can build an app, that creates apps on behalf of the user! This is a way for developers to make use of the Fission Platform to build their own MicroSaaS business, including custom domains and other features for their users.
The API methods are prefixed with apps
.
apps.index
: A list of all of your apps and their associated domain names
apps.create
: Creates a new app, assigns an initial subdomain, and sets an asset placeholder
apps.publish
: Publish a new app version
apps.deleteByDomain
: Destroy an app identified by domain
Apps that use the platform API must request permission to work with a user's apps. Permissions are requested when a user signs in through the Fission Auth Lobby. See the for more on the webnative authentication flow.
Platform API permissions are requested at permissions.platform.apps
in the initialization object.
The value at permissions.platform.apps
can be
"*"
: Grant complete app management access for all of the user's apps
An array of domain names, e.g. [ "an-app.fission.app", "another-app.fission.app" ]
: Grant permission to manage specific apps. Those apps can be published or deleted.
apps.index
Lists all user apps and their associated domain names.
Required permissions: { platform: { apps: "*" } }
full app management permissions
Params: No parameters
Returns: { domain: string }[]
an array of app domains
Example:
apps.create
Creates a new app, assigns an initial subdomain, and publishes a placeholder site.
Required permissions: { platform: { apps: "*" } }
full app management permissions
Params:
subdomain: string
optional
Returns: { domain: string }
the subdomain of the newly created app
Example:
apps.publish
Publishes a new app version by IPFS CID. If the app does not exist yet, create the app first with apps.create
.
Params:
domain: string
required
cid: string
required
Returns: Nothing returned
Example:
Retrieving the CID depends on where you have staged the app code. One convenient way to do this is to publish the app's HTML, CSS, JavaScript, and assets to a public directory in WNFS and retrieve the CID of that directory.
apps.deleteByDomain
Delete an app by domain.
Params:
url: string
required
Returns: Nothing returned
Example:
Become a webnative jedi 🧘
Check the webnative version.
Add the following to your code to enable webnative debug logging.
When webnative makes a change to the user's filesystem, it logs:
Next, webnative links the change to make it available across the web.
When linking completes, the change is published and available to other browsers.
While you are testing an app, you may want to force a logout to check the NotAuthorised
authentication state. The wn.leave()
method will log out and completely remove a user from your app. The user will still be authenticated with Fission, and they can sign back into your app to re-authorize.
WNFS comes with three separate top-level file systems "roots": public, pretty, and private.
Not encrypted. Full metadata support. Starts with /public
.
Not encrypted. No metadata. Represented simply as /p
to be nice and short when creating public URLs like /p/path/to/file.img
. It does not support versioning, use the Public or Private trees for that.
Encrypted. Structured so that file metadata as well as contents are obscured. Starts with /private
.
We initialize WNFS with a set of default private folders, which should be familiar to people from working with desktop operating systems.
TODO: We'll be documenting and versioning these default folders in the webnative Github repo.
Additionally, in apps like Drive or in file pickers, the user sees a top level Public folder, which maps to the Public system root
Can I use my file system in a web worker? Yes, this only requires a slightly different setup.
Since the file system may evolve over time, a "version" is associated with each node in the file system (tracked with semver).
Currently two versions exist:
1.0.0
: file tree with metadata. Nodes in the file tree are structured as 2 layers where one layer contains "header" information (metadata, cache, etc), and the second layer contains data or links. This is the default version, use this unless you have a good reason not to.
0.0.0
: legacy bare file tree of an early version.
Customization can be done using the setup
module. Run these before anything else you do with the SDK.
Warning: Here be 🐉! Only use lower level utilities if you know what you're doing.
You can use one instance for your whole application by doing the following:
By using Cloudflare as your DNS provider and their , you can deploy on Fission but have your content be served by Cloudflare. This will let you use custom domains with your Fission apps while we work to automate the process fully on the platform.
For your domain, YOURAPPDOMAIN.com
, go into your DNS provider control panel and add a CNAME pointing to cloudflare-ipfs.com
.
Since your domain is already hosted with Cloudflare, there's no step two: they'll add SSL support to it automatically, and turn off proxying.
Now, add a TXT record pointing to your app subdomain. Your APPNAME is created when you run fission app register
, and will look something like junior-angular-tulip
. We're creating a link to say that the content from that app should be served up at your domain with a special dnslink record:
That's it, you're done!
Whenever you publish a new version of your Fission app, we update the hash that this special record points to. When you go to YOURAPPDOMAIN.com
, Cloudflare's gateway looks up this _dnslink
record, checks the ipns record, gets the hash, and fetches the content from the global IPFS network. This might even be from your computer directly.
When we initially tested this, the Cloudflare gateway was caching for up to 6 hours. It seems to only take a few minutes at most to show updated content now, but it won't be instant like using Fission directly.
Authentication and Authorization with the Webnative SDK
Users authenticate once per browser in the . If the user is new to Fission, they are prompted to sign up. They may also link an existing account from another browser.
Apps redirect users to the Auth Lobby to sign up and request authorization to use resources. Sign-up only happens once, and each subsequent visit from any app is for authorization only.
Auth in webnative looks similar to an OAuth authentication flow but with an important difference. Webnative stores user credentials in the browser, and authentication through a third-party is not necessary. Private credentials are stored as CryptoKey
s to keep them secure. See the of the Fission Whitepaper for more details.
The Auth Lobby grants apps authorization to access WNFS. Apps request permission to use app-specific storage and additional public and private directories. The Auth Lobby creates a User Controlled Authorization Networks (UCAN) token that reflects the requested permissions.
Webnative checks the UCAN at initialization and returns an auth scenario.
AuthSucceded. The user has just returned from the Auth Lobby, and they granted the requested permissions.
Continuation. The user has already granted permission, and the UCAN has not expired.
AuthCancelled. The user denied the requested permissions.
NotAuthorised. The user has not granted permission yet or the UCAN has expired.
UCANs expire and users must periodically re-authorize apps through the Auth Lobby. All user data is preserved in WNFS across authorizations, including the data stored in App Storage.
More on UCANs. Read more about UCANs in our blog post and in the .
One case where logging out is desirable is on a shared device. Logging out on a shared device can be accomplished in two steps:
Remove the UCAN token from apps that were granted permissions with the webnativewn.leave
function
Fission makes it easy to build and host web apps using only frontend and local development tools with no effort put into servers or deployment workflows.
In this guide, we will use the Fission CLI to publish the elm-pages-starter
to the web.
Install Fission. Please follow the steps in the to install and set up Fission on your machine before proceeding.
Clone the elm-pages-starter
to your local development environment.
Install and build the app.
Once the elm-pages-starter
is built, we are ready to publish it with Fission.
Initialize the project as a Fission app with fission app register
. You will be prompted for a build directory.
Accept dist
as your build directory, and fission
will initialize your app.
Fission has created a fission.yaml
file with your app configuration.
Run fission app publish
to publish the webpage.
Copy the URL into your browser and you will see the elm-pages-starter
live on the web!
It may take a few minutes for DNS to propagate. If you don't see the app live at the URL, come back and try again in a bit. You can also take the URL from the CLI output and view the app athttps://ipfs.runfission.com/ipfs/{URL}
right away.
You can continuously update the hosted version of the app by running fission app publish --watch
. Fission will watch the files in dist
and publish when changes occur.
Where is my app? An app published with Fission runs locally and on the web on top of the InterPlanetary File System (IPFS). When you run fission up
you are saving your app to IPFS on your machine and syncing it with a greater file system distributed across the web. It's like a part of your file system merges with the whole and your app becomes available to everyone with a browser!
We have put the elm-pages-starter
out on the web without setting up a DevOps environment or going through a complex deployment workflow!
At this point your mind might be swimming with a thousand questions. Here are a couple of resources that explain how this all works:
In the next section, we will add Fission auth to the elm-pages-starter
.
Use a custom domain with Fission and keep control of your DNS
By adding a TXT record for your app and a CNAME pointing at our gateway, you can run your DNS elsewhere but still have a custom domain for your Fission app.
For your domain, YOURAPPDOMAIN.com
, go into your DNS provider control panel and add a CNAME pointing to ipfs.runfission.com
.
@ usually represents the "root" or domain apex. Some DNS providers don't support a CNAME for your root, so you'll need to add a CNAME for www
instead.
The process for a subdomain is the same SUB.YOURAPPDOMAIN.com
, but looks a little different. Go into your DNS provider control panel and add a CNAME pointing to ipfs.runfission.com
.
Now, add a TXT record pointing to your app subdomain. Your APPNAME is created when you run fission app-init
, and will look something like junior-angular-tulip
. We're creating a link to say that the content from that app should be served up at your domain with a special dnslink record:
Again, subdomains function the same way, with the _dnslink subdomain, where you're adding the TXT record being "above" the SUB.YOURDOMAIN.com record, which looks like this:
Migration guides for new versions of the webnative SDK
The way paths are used throughout the webnative and filesystem APIs has changed.
In earlier versions of webnative, API calls expected UNIX style paths.
In webnative 0.24, paths are created by for files and directories.
The docs for the remain available for reference.
The URL for loading webnative from UNPKG has changed. In previous versions, webnative was available as index.umd.js
.
In webnative 0.26, webnative is available as index.min.js
.
The URL for loading webnative from UNPKG has changed. In webnative 0.26.0, webnative was available as index.min.js
.
We found that some projects needed the UMD build and brought it back in webnative 0.26.1. We have replaced index.min.js
with index.umd.min.js
.
Use Fission's name servers and we'll automate DNS and domain updates
We can take care of this for you by hosting your DNS for you. This means changing your name servers to the Fission ones. Below are guides for some DNS providers.
ns1.fission.systems
ns2.fission.systems
ns3.fission.systems
ns4.fission.systems
Once this is completed, we'll confirm it and handle any other updates needed automatically.
Go to the domain you want to host on Fission in your Namecheap admin:
Where it says "Namecheap BasicDNS", select "Custom DNS" from the drop down:
Enter in ns1.fission.systems
and ns2.fission.systems
and click the green check mark to save.
Code and app examples for developers to learn Fission, as well as to use as a base to build their own apps.
We're developing a series of example apps, base templates, and code examples to help you get up to speed in building Fission-powered apps. The is also a great place to look for inspiration.
that goes from basic publishing through to adding auth and storage.
The Quotes app is a simple app written in Elm. It features Fission login, and stores quotes data in your personal storage.
Try it live at
Browse the source on Github
Fission Drive is maintained by the Fission team and included with every Fission account. It lets you work with all of the files in your account's file system.
Read more about
Login at
Browse the source on Github
, and also teaches you about using WebAssembly.
Photo Gallery
Notes
Platform permissions. The platform permissions could be left out of this example because this app will not need them. See the for more information on working with user apps.
Paths created by have a FilePath
or DirectoryPath
type. Methods with a DistinctivePath
param accept either a FilePath
or a DirectoryPath
.
Required permissions: Needs either permission for the app domain or full app management permissions. See .
Required permissions: Needs either permission for the app domain or full app management permissions. See .
More about roots. Learn more about roots in the .
This library is built on top of and . If you have already integrated an ipfs daemon or keystore-idb into your web application, you probably don't want to have two instances floating around.
Apps intialize webnative with and permissions. The redirectToLobby
method redirects users to the Auth Lobby, where users grant or deny permission to use their resources. redirectToLobby
takes an optional parameter, a URL that the lobby should redirect back to (the default is location.href
).
In most cases, users will not need to log out of an app or a device. Read more about this part of our vision for Fission-enabled apps in the forum post.
Log out from the Auth Lobby on the reset page ()
The url
is where the app will be on the web after it has been published, build
tells the fission which directory to publish, and ignore
is a list of files and directories to ignore. See the for more details.
talk at Speakeasy JS
This isn't fully automated right now, so you'll need to send us an email support@fission.codes
or drop by our to send us a chat, and we can get things setup on our end.
Record | Type | Value |
_dnslink | TXT | |
Record | Type | Value |
@ (root) | CNAME |
|
Record | Type | Value |
SUB | CNAME |
|
Record | Type | Value |
_dnslink | TXT | |
Record | Type | Value |
_dnslink.SUB | TXT | |
Fission's approach to providing and working with web native building blocks
The foundation of powerful digital applications roughly include three primary building blocks: compute, storage, and identity. Fission's approach is to make use of these building blocks, make them easier to use for developers, and to develop strong default capabilities in each of these areas.
The Fission White Paper can be read for a more technical, specification-style version of our vision and roadmap, including direct links to various sections:
Additional reading and presentations are also available:
User Controlled Authorization Network (UCAN), Auth without a Backend blog post
Presentation to the Berlin Functional Programming Meetup June 2020, A Universal Hostless Substrate: Full Stack Web Apps Without a Backend, and More!
Web Native File System Technical Design Overview, Aug 2020 slide deck and recorded video presentation
Web browsers run on your local desktop, laptop, or mobile device, and use local computer processing unit (CPU) to do work -- to compute things. Your machine provides the work to run apps in your browser. Simple web pages use the browser's built in HTML and CSS capabilities. But many web pages are full blown "apps" that are highly interactive, with a rich user interface (UI). These are typically powered by JavaScript, a programming language that runs in your browser, and uses your local compute.
Web Assembly is a fourth compute environment has been standardized for browsers. It can compute apps that are originally written in many different programming languages, not just JavaScript. We are just starting to see powerful Web Assembly apps being built, like Figma, which provides a PhotoShop-like experience in your web browser.
Fission intends to support Web Assembly, and make it easier to build, host, and scale web native apps that include Web Assembly.
When people think about owning their data, this often reveals that they feel comfortable when they can see and browse the files that an app uses or creates, rather than having to request an export, or not even have access to their data at all.
At Fission, we started by designing a file system that is available to both developers who want to build and host apps, and the people who use these apps.
We have designed what we call Web Native File System, pronounced and written as WinFS. It is built on top of other open protocols, including the InterPlanetary File System (IPFS).
We intend to design and share the WinFS specification in the open, and contribute it as an open standard, with open source implementations that anyone can use.
WinFS is designed to provide an experience like an open source iCloud: available and synchronized across all devices and provide both public and private, encrypted files.
Implementing a login, authentication, and authorization system is challenging to do securely, especially while respecting user privacy, providing end to end encryption, and otherwise balancing ease of use for both developers and customers.
For developers, we wanted to provide a built in way to include logins and authentication without having to struggle to implement it.
For everyone, we wanted it to be easy to login securely, without having to remember passwords, and make that login available on all of their devices.
We built on top of the emerging Decentralized Identifiers (DIDs), which is a working draft of the W3C standards body.
We then designed the User Controlled Authorization Network (UCAN): a way of doing authorization where users are fully in control.
With UCAN, we based it on top of the developer friendly JSON Web Tokens (JWTs) standard, plus Google's Macaroons research paper for more distributed systems.
We combine all of this in the webnative SDK for developers and the Fission platform for app users. In browsers, we use the Web Cryptography API, a W3C standard. The MDN Web Docs include further reading »
We intend to work with existing and emerging authorization and identity standards bodies to contribute our work as open standards.
The Introduction to Web Native Apps post on our blog covers a lot of the same material from a conceptual point of view.
We are inspired by the work of the Ink & Switch research lab, especially their April 2019 publication on Local First Software, which includes their Seven Ideals for local-first Software:
No spinners: your work at your fingertips
Your work is not trapped on one device
The network is optional
Seamless collaboration with your colleagues
The Long Now
Security and privacy by default
You retain ultimate ownership and control
Basic example of how to make a UCAN. Note that the issuer
always has to be your DID, because the UCAN will be signed with your private key.
Desktop and mobile browser support
We are committed to making Web Native and the Fission platform work on desktop and mobile browsers without plugins. This is the list of browsers we aim to support.
Alternative browsers (e.g. Brave, Microsoft Edge) are supported on a best effort basis.
Gmail's guidance on browsers they support states "works best in the newest and last prior version of these browsers", which is also what we'll be aiming for.
Chrome
Firefox
Safari
Chrome
Firefox
Chrome
Firefox
Embedded Webviews in apps may or may not work, as it does differ from Safari.
Fission relies on modern browser API features
Web Cryptography API https://www.w3.org/TR/WebCryptoAPI/
The webnative software development kit offers tools for:
Auth. Users make an account and link their account across devices in the Fission Auth Lobby.
Storage. The webnative file system (WNFS) stores user data for apps.
UCAN and DID tools for working with UCANs and distributed identities
Platform APIs for interacting with user apps
Versions. This guide is versioned for each version of the CLI/Webnative SDK. See the top left above Overview in the sidebar to select the version of CLI or SDK you are working with. Latest represents all versions newer that last numbered version. We will always add a numbered version when a breaking change occurs.
API documentation and code. Read more in the API reference and in the webnative code repository.
Have questions? Come join the Fission Discord server or post your question to the Fission Developer forum. We are here to help!
An introduction to storing WASM modules in web native storage
In this guide, we will show how to store WebAssembly modules in Fission web native storage. Our goal will be to store a WASM module and execute it at a later time.
The code in this guide is available in the fission-stored-wasm-example repository and the example is published at quick-enormous-silicon-dinosaur.fission.app.
We have compiled an add
function from C to a WASM module.
Our example app will make a GET request for add.wasm
and store it in web native storage. We will list the contents of the directory where the module is stored to confirm it is there. Finally, we will load the module from storage and add some numbers!
Our example uses some helper functions to add interactivity. We won't cover calls to dom.reveal()
, dom.hide()
, or dom.updateFirstChild().
If you would like to see what these do, please take a look at the code in the repository.
At the moment, this example will not work in webKit iOS or Safari macOS browsers. If you are familiar with WebAssembly in these browsers, we would love some help with this! See the SyntaxError invalid character in webkit/safari issue for more details.
Before we can store a WASM module, we need to initialize webnative
and ask the user for permission to use their web native file system. This example asks for permission to use app storage and uses fs
as an alias for the file system after we initialize.
We pass fissionInit
to webnative
and get back a state
that tells us if the user has authenticated or not.
In the AuthSucceeded
and Continuation
cases, the user gave our app permission to use their file system. Otherwise, they have not been asked or they declined.
The user may have already stored add.wasm
and used it to add numbers on a previous visit, so we check and display a stored result if we have one.
If the user has not authenticated, we show them a Sign In button that will redirect them to the Fission auth lobby.
After authentication, we are ready to request add.wasm
and store it in web native storage.
We fetch add.wasm
and stream the Response
into an ArrayBuffer
. It will be stored as a Blob
in app storage at the path wasm/math/add.wasm
.
We prepare a path
and blob
, write the blob to the local file system, and publish it to the user's wider file system across the web. After we publish, the module is available on any device where the user has set up web native storage.
Next, we can check to make sure the module has been saved in storage.
This time we prepare a wasm/math
path for the directory and call fs.ls
to list its contents. We take each entry in the directory listing and append its metadata to a table.
Each entry has a name, size (in bytes), last modified time, and a flag indicating whether it is a file or directory.
The module is in storage and we are ready to use it! Each time a user submits lhs
and rhs
numbers, we load add.wasm
and add their numbers.
After some input validation, we prepare the wasm/math/add.wasm
path, make sure a module exists at that path, and read it into a buffer. We instantiate the WASM module and call the add
function off it.
Earlier we mentioned that storing the module makes it available across the web. Why not do the same for our result? We store the result at the path results/add
, and now both the module and the last result are available on any device!
We can delete the module and result from storage to reset our example.
We prepare paths for the module and result and use fs.rm
to delete them. Lastly, we publish the deletion to remove them from the wider file system.
Storing WASM modules and results means you only need to request a module or perform a computation once. The web native file system will sync modules and results across user devices automatically. This opens up many opportunities to simplify your applications and sync app data across user devices.
Reading this guide gives you a taste of how this all works, but extending this example will take you much further! Here are a couple of suggested exercises that will help you to get started with web native.
Add a subtraction operation. We have done addition, adding subtraction would be an easy first step. See Compiling C to WebAssembly without Emscripten for help with compiling WASM modules.
Distributed addition. How about instead of overwriting the result of an addition, we keep a running total across devices?
Build a calculator. A bit more ambitious, but a calculator app that stores state across devices would be so cool!
Record | Type | Value |
@ | CNAME |
|
In this guide, we will add Fission auth to the elm-pages-starter
. We will add a login button to the navbar that redirects users to the Fission auth lobby. After a user authenticates in the lobby, we will log them in and display their Fission username.
All of the code in this guide is available in the fission-elm-pages-starter repository on the auth
branch.
We are updating this example to use the new webnative-elm package! The latest code on the auth
branch includes these changes. While we are updating the guide, please refer to the code linked above which has been tagged as webnative-auth
.
Before authentication, our header has a Fission login button.
After authentication, we show a username next to the button.
We will use the Fission webnative package to authenticate users. Our Elm app will request a login over an outgoing port and subscribe to authentication changes over an incoming port.
Users own their data. All Fission services are designed on the principle that users should own their data. When users own their identity, developers no longer need to maintain user accounts and authentication becomes simple to implement. See Compute, Storage, and Identity Foundations in our guide for more information on identity.
Our login button will be added to Layout.elm
, but we will start by adding our authentication logic and state in Main.elm
.
Let's start by adding a username
to our model.
Note that we always start without a username. We will check for an authenticated user after initialization.
Add a SubmittedLogin
message for when a user clicks the login button and a GotAuth
message to respond to authentication changes.
Add an outgoing login
port and an incoming onFissionAuth
port.
Add a subscription to onFissionAuth
.
We expect JSON that should look something like { username: "fission-username" }
. After decoding the value, we call GotAuth
with a Just username
on success or Nothing
on failure.
⚠️ Nothing on failure? In a real application, we would want to add error reporting and handling. We silently fail here to keep our example simple.
Our model
, update
, and subscriptions
are ready to go! Now let's add the login button to the navbar.
In Main.elm
, pass the SubmittedLogin
message and model.username
to Layout.view
In Layout.elm
, modify view
to accept the new parameter and call it fissionAuth
.
Pass fissionAuth
through header
to a new fissionAuthButton
displayed alongside the Elm docs and GitHub links.
We call SubmittedLogin
when a user clicks the fissionAuthButton
and display their username
if they are logged in.
All of our Elm code is written and we only need a small bit of JavaScript to authenticate users with Fission.
Our desired authentication flow looks like this:
A user clicks on the Fission button
They authenticate in the Fission auth lobby
They are redirected back to our page in an authenticated state
The next time they visit our site, they should already be authenticated
Let's start by installing the webantive
package from npm.
Import it in index.js
.
After our Elm app is initialized, we can bring webnative
together with our login
and onFissionAuth
ports to authenticate users.
Initializing webnative
gives us access to state
which has a state.username
and a state.scenario
. The state.scenario
tells us if the user is authenticated or not.
If a user just returned from the Fission auth lobby, state.scenario
will be webnative.Scenario.AuthSucceeded
. If they authenticated on a previous visit, state.scenario
will be webnative.Scenario.Continuation
. In both cases, we have a state.username
to pass through the onFissionAuth
port.
The login
port calls on webnative
to redirect the user to the Fission auth lobby. When the user returns from the lobby, we will initialize and check authentication status all over again.
That's it! User identity is held by your users in browser storage and you won't need a backend to manage it. A user that has authenticated with Fission also has a webnative
file system where your app can store their data. In the next section, we will show how to use it.
Here are a couple of resources on Fission auth for a deeper dive into how this all works:
In this guide, we will show how to use Fission webnative storage to save user data. Our goal will be to add annotations to blog posts in the elm-pages-starter
.
All of the code in this guide is available in the fission-elm-pages-starter repository on the storage
branch.
When a user has signed in with Fission, an annotation button is displayed at the bottom right corner of the page.
Clicking the button opens a text input box where the user can write their notes.
If a user has not signed in, they do not see the annotation button or text input box.
Annotations are saved to the user's webnative filesystem and will be there when they return or use the app on another device.
We will start off by writing an annotation module. Annotation.elm
is built around an Annotation
type and has a way to create, encode, and view annotations.
An Annotation
can be editable or not. If an annotation is editable, it has a title
and notes
.
We have two ways of creating an annotation. A NotEditing
annotation can be created directly. An Editable
annotation must be created from a Value
that will come over a port.
Our code that interacts with the webnative filesystem will use blog post titles as keys to lookup and save annotations.
Add encode
for storing annotations and encodeTitle
for loading them.
Lastly, we need a way to view annotations. When a user is editing an annotation, we show their notes or the blog post title as a placeholder. When an annotation is not being edited, we show a button with a pencil icon.
Add a view
function with a case for Editable
and NotEditing
annotations.
Now that our annotation module is ready, we can add annotations to the elm-pages-starter
.
We want the user to see the annotation button when they navigate to a page with a blog post. When they click on the annotation button, we load the annotation from their webnative filesystem or an empty annotation if they are starting a new annotation. We replace the button with the notes in a text input box.
We save the annotation to webnative with each keystroke the user makes in the text input box.
Import the annotation module in Main.elm
.
Add an annotation
to the Model
.
We only display one annotation at a time, which means we can replace annotation
when we navigate to a new page or load an annotation.
The annotation starts off as NotEditing
in init
.
Our update
will handle four messages that initialize, load, or store annotations. OnPageChange
sets the annotation to NotEditing
when a user navigates to a new page. LoadAnnotation
calls over a port to load an annotation. UpdateAnnotation
updates the displayed annotation in the input box and stores the annotation. GotAnnotatation
subscribes to annotations that come in over a port after a load.
Our main
function needs a small change to configure the OnPageChange
message. Set the onPageChange
field in the record passed to Pages.Platform.init
to Just OnPageChange
.
Add loadAnnotation
, onFissionAnnotation
, and storeAnnotation
ports.
Add a subscription to the onFissionAnnotation
port.
We create an annotation from the Value
received over onFissionAnnotation
and use GotAnnotation
to update our model with it.
Pass the annotation and two messages to tell it how to load and update annotations to Layout.view
.
In Layout.elm
, the view
displays the annotation at the bottom right corner and in front of the rest of the page. We check if the user is logged in and viewing a blog post. If both are true, we show them the annotation.
Our app is ready for annotations and the last step is adding webnative storage.
Each Fission user has a filesystem that is stored locally and distributed across the web. An app that uses Fission storage asks the user for permission to use their filesystem -- similar to how a native mobile app asks for permission. After the app has been granted permission, it can store user data to their local filesystem and publish it to the distributed filesystem.
Let's start by installing the webnative
package from npm.
Import it in index.js
.
We initialize webnative
with a list of permissions stating what our app would like to use. In our case, we only need to request permission to use the storage associated with our app.
Shared storage: The webnative filesystem also has public and private shared storage that can be accessed across apps. See the webnative paths documentation for more details.
Declare an fs
variable that will be used to access the user's filesystem. Add fissionInit
with a request for permissions
to use app storage by app name and your Fission username.
Replace <username>
with your Fission username.
Next, we initialize webnative
. In the AuthSucceeded
and Continuation
cases, the user has authenticated and granted permission to use the filesystem. We can now set up the filesystem and a way to load and store annotations.
Annotations are stored in app storage in an annotations
subdirectory as JSON. Each annotation is stored as a file using the blog post title and a .json
suffix. For example, an annotation on the blog post "Hello Galaxy 🌠" would be stored on the path annotations/Hello Galaxy 🌠.json
. Paths are case sensitive, spaces are fine, and emoji are welcomed!
Paths are built using fs.appPath
which takes an array of strings that are parts of a path separated by forward slashes.
The numbered references in the code go as follows:
Alias the filesystem from state. We alias state.fs
as fs
to put it onto the global scope.
Create the app directory if it does not exist. A new user will not have a directory for our app. Check if the directory exists and make one if not with fs.mkdir
. Each time we make a change to the local filesystem, we fs.publish
to synchronize with the distributed filesystem.
Load an annotation or send an empty one. When the Elm app sends a message over the loadAnnotation
port, we make check if a file for the annotation exists. If it does, we fs.read
and send it over the onFissionAuth
port into the Elm app. If not, we send an empty annotation value.
Store and publish an annotation to the filesystem. When the Elm app sends a message over the storeAnnotation
port, webnative
saves the annotation to the filesystem with fs.write
. The current implementation uses a transaction queue to handle writes that come in quick succession. See the transaction queue implementation to examine how this works now. An upcoming version of webnative
will handle writes in parallel, and the transaction queue will not be needed.
Everything is in place and users can write their notes about blog posts! Annotations persist across visits to the blog and are available on any device where the user has logged in with Fission.
We haven't covered shared storage in this guide, but you can do much more when user data is not restricted to a single app. With shared private storage, you could write an app that shows users their annotations from multiple apps across the web. With shared public storage, you could convert annotations into a publicly visible comments!
For more information on how Fission storage works, take a look at:
Troubleshooting, work arounds, and known issues.
To check the setup of your DNS for Custom Domains, you can run this dig
command:
The "short" option is still pretty long! We're just looking for the ANSWER section:
You can also check records online using the very handy dnsrecords.io. See this example for _dnslink.bmannconsulting.com
which just shows us the TXT record we're looking for:
We've had a report with uploading large numbers of files using ipfs-deploy
with Fission support that you may need to increase the number of open files that your operating system supports. This could also occur with fission watch
.
For ubuntu, read underyx's article to increase the number of open files allowed.
For Mac OS, Wilson Mar has a one liner:
As described in the article, you'll want to add it to your bash or other shell profile so this change is permanent.
On a Chromebook in the native ChromeOS shell? Yeah, Boris hit this issue too when running large jekyll or gatsby builds:
We've had some hiccups with our brew formula recently. To re-install / reset brew, run the following:
Now re-run the installation instructions, copied here for convenience:
This is related to issue #37.
If you want to see what the Fission CLI is doing under the covers, you can turn on DEBUG mode by calling commands like this:
You'll see that fission up
calls your locally installed ipfs
command to add files to IPFS. We can see that it's using the 0.4.22 version of ipfs, installed using Homebrew in the "Cellar" where brew keeps installed items.
Then, it sends the hash of the entire directory to our web API, which pins it and fetches the files directly from your laptop and any other IPFS nodes that already have copies of those files in the network.
In this case, we can see that after the "Remote pinning Qm…", there is a 504 Gateway Time-out error from our server. This is a known issue, which we're working on to support large files / large quantities of files.
The --verbose
flag can be run on most commands these days. See the CLI docs for working with apps for more info.
The fission CLI installs a managed IPFS node. It runs on port 10235
.
Interplanetary Fission IPFS - Fission Web API as an Heroku Add-on
The Fission Web API is available as a Heroku Add-on. . It is currently in a free beta mode with a "test" plan.
As with all Heroku add-ons, you can also create a new add-on locally using the Heroku CLI tool:
If you create the add-on through the Heroku dashboard, you can find your API credentials in the Settings section of your app, under the Config Vars heading:
These can also be used in your local environment by creating an .env
file.
A particularly good use case for using our Fission IPFS add-on is to combine it with setting up your application in a "Deploy to Heroku" mode.
The Heroku Add-on uses the Web API, appropriate for server side apps written in any language that Heroku supports. You can browse the live docs of the Fission Web API at , or look at our to find a client SDK for your programming language.
This means adding an app.json
file and a few other settings that tell Heroku what add-ons and environment variables your application needs. You can find out more .
We built an , and bundled it together with Deploy to Heroku and the Fission Heroku Add On. You can get started on the hobby tier by clicking the Deploy to Heroku button on Github: