Building a Serverless Website(Unhosted App) with JavaScript Only--Powered by ΦFAI Browser

Recommended Posts

Building a Serverless Website(Unhosted App) with JavaScript Only--Powered by ΦFAI Browser

 Φ FAI (Free Anonymous Internet) is a decentralized p2p content sharing system with web browser GUI.

With FAI, websites or apps can be built by JavaScript only and run serverless /unhosted.


 The key points for a FAI browser to achieve this magic are:

1. Duplication of Φ DB in every node/client instead of storing on server. 

2. Φ Domains (empowered by Φ DNS) of website point to Φ DB instead of to server.

3. Account created by users instead of registration on server.

4. All operation commands signed by users and saved in Φ DB.

5. Powerful API enables web pages to access the Φ DB instead of interaction with server.

6. Web pages have been authorized full access to Internet.



The built-in FAI Shop is a very good example to show how the magic works:

1. Seller creates its account. 

2. Seller publishes a product by signing a transaction with product data with its account. The product data will be stored in the Φ DB and copied to every user.

3. Buyer views the product in Φ Shop web page by searching through ΦDB.

4. Buyer places an order by signing a transaction with Φ coins sent to seller and purchase information such as product link, quantity, shipment address, etc. This purchase transaction will be stored in the ΦDB and copied to every user.

5. The seller receives the purchase transaction by searching through the Φ DB. (Delivery of order is not a problem.)

6. Moreover, seller and buyer can chat via serverless Φ messenger. And digital products can be delivered by Φ messenger too.


How to build a serverless website:

1. Download and install ΦFAI browser. (www.f-a-i.net)

2. Program in html, css and JS with Φ APIs. The ΦAPI file (fai-api.js) can be found at <datadir>/appdata/browser/js folder.

3.  Publish to ΦDB. 

3.1 Get some FAI coins. Currently gathering coins to publish an app only needs one computer mining for 1 day. You may also buy or ask for coins from others.

3.2 Publish all files of app to Φ DB. There's a batch-publish function in Φ publisher.

3.3 Make and publish the package file. It's a list of blockchain links of files in the app, in JSON format. (Example: <datadir>/appdata/browser/package.json )(The links of files can be found on 'my page')

3.4 Register a domain and redirect it to the blockchain link of package file.

3.5 Optionally, do some promotions on FAI system. (Send as many contents as you want: txt, picture, video, etc)


Where to download: http://www.f-a-i.net

Please feel free to send questions to fai03a6@gmx.com





Share this post

Link to post
Share on other sites

Interesting concept, even though you can host a lot of stuff for free nowadays, but I get the appeal in FAI. I was actually considering at some point to not bother with marketing for my main game project and only offer it on the dark-web to go against the typical flow. Would need to get rid of any PHP for this it seems and not exactly sure how I would deal with turn-based multiplayer (ideally p2p as well), any suggestions? I wonder if the API would be able to deal with that, because usually p2p multiplayer is prone to cheating, but this could have the potential to be bitcoin-like, having all player moves be distributed through the network like in a block-chain and hopefully checked for cheating (if it's even possible, not sure).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.