Git Product home page Git Product logo

walletauth's Introduction

WalletAuth App Template

Built by FISSION Built by FISSION Discord Discourse

ODD UI Screenshot

The ODD App Template is a clone-and-go template for building a web application using ODD WalletAuth, fast. Clone, customize, and deploy to have a running distributed app in mere minutes.

❗️The ODD SDK is alpha software.

We recommend you do not develop production applications using the WalletAuth App Template at this time. We're working on making it reliable, fast, and awesome, but we're not there yet!

πŸ€” What's The ODD SDK?

The ODD SDK empowers developers to build fully distributed web applications without needing a complex back-end. The SDK provides:

ODD applications work offline and store data encrypted for the user by leveraging the power of the web platform. You can read more about the ODD SDK in Fission's ODD Guide.

πŸ“¦ What does this template give me?

πŸ₯° Silky-smooth end-user flows

The WalletAuth App Template provides a silky-smooth user experience out of the box. Creating an account and linking a second device feels familiar, comfortable, and obvious. The ODD SDK authentication is key-based rather than password-based, so we've focused heavily on the authentication flows, borrowing language and screens from two-factor auth flows.

🧱 Built with a modern web stack

The app template is built with modern web technologies:

πŸ‘©β€πŸ« A simple ODD demo to learn from

WNFS Image Gallery Screenshot

The app template includes a functioning application: an image gallery. Check out the image gallery code to learn how an ODD application handles things like file uploads, directories, etc.

πŸš€ Getting Started

You can try out the template yourself here.

Ready? Let's go.

Prerequiste: ensure you are running Node 16.14 or greater, but not Node 17 (18 is fine though!).

  1. Clone the repository:

    git clone [email protected]:oddsdk/walletauth.git
  2. Install the dependencies.

    npm install
  3. Start the local developmentΒ server.

    npm run dev
  4. Navigate to http://localhost:5173 in your web browser.

πŸ›  Customize your app

The app template is designed to be easy for you to make it your own. Here's how:

  1. Rename your application.

    In /src/lib/app-info.ts:

    • Change appName to the name of your app.
    • Change appDescription to a simple, 1-sentence description of your app.
    • Once you deploy your app, change appURL to the production URL.

    In package.json, change name to your application's name.

  2. Customize your app's logo.

    • App Logo SVG can be customized in /src/components/icons/Brand.svelte. Target an image that is 35 pixels high.
    • Replace the favicon files in /static by following the instructions in this blog post
    • Generate a Twitter/Social Media Embed image.
      • In /src/lib/app-info.ts, change appImageURL to match the URL of your embed image.
      • In /src/routes/+layout.svelte, update og:image:width and og:image:height to the size of your embed image.
  3. Customize the look and feel.

    The app template is built using Tailwind and DaisyUI. You can customize basic theme colors by editing /tailwind.config.css. Check out the DaisyUI Theme Generator to play around with theme colors or read the customization guide to customize the component appearance.

  4. Clear out the app's home page.

    The home page content is in /src/routes/+page.svelte. Delete everything in the file (but don't delete the file!) to start over with a blank home page.

  5. Remove the image gallery demo app code.

    If you're not building an image gallery, you don't need the gallery demo code, except perhaps to learn from. To get rid of it, delete:

    • /src/routes/gallery
    • the initializeFilesystem function in /src/lib/auth/account.ts creates directories used by WNFS. Change those to what you need for your app or delete them if you're not using WNFS.

πŸ‘ You're ready to start adding custom functionality! πŸš€

Check out the ODD SDK Guide for ODD SDK questions or UCAN.xyz for UCAN questions.

🧨 Deploy

Any static hosting platform should be supported. The ODD WalletAuth Template is currently deployed on:

Fission App Hosting

Try out WalletAuth App Template on Fission

An ODD application can be published to IPFS with the Fission CLI or the Fission GitHub publish action.

To publish with the Fission CLI:

  1. Install the CLI
  2. Run fission setup to make a Fission account
  3. Run npm run build to build the app
  4. Delete fission.yaml
  5. Run fission app register to register a new Fission app (accept the ./build directory suggestion for your build directory)
  6. Run fission app publish to publish your app to the web

Your app will be available online at the domain assigned by the register command.

To set up the GitHub publish action:

  1. Register the app with the CLI
  2. Export your machine key with base64 ~/.config/fission/key/machine_id.ed25519
  3. Add your machine key as a GH Repository secret named FISSION_MACHINE_KEY
  4. Update the publish.yml with the name of your registered app

See the Fission Guide and the publish action README for more details.

Netlify

Netlify Status

In order to deploy your ODD application on Netlify:

  1. Create a new Netlify site and connect your app's git repository. (If you don't have your application stored in a git repository, you can upload the output of a static build.)
  2. Just click Deploy. Netlify takes care of the rest. No Netlify-specific configuration is needed.
  3. There is no step 3.

Static Build

Export a static build.

npm run build

The build outputs the static site to the build directory.

walletauth's People

Contributors

avivash avatar icidasset avatar matheus23 avatar

Stargazers

Vladimir Popov avatar Andrejs Agejevs avatar Chai Phonbopit avatar Jonathan Gan avatar Orpheus Lummis avatar nein avatar Boris Mann avatar

Watchers

 avatar  avatar

Forkers

depatchedmode

walletauth's Issues

"Failed to create fission user" error

If I try to connect to the walletauth demo with metamask, I get an error: "Failed to create Fission user"

Error: Failed to create Fission user
    pn Immutable
session-a06b67b3.js:2:4433
    Ei Immutable

Rename to walletauth-template?

I get confused just looking at the ODD repos trying to figure out the difference between odd-walletauth and this walletauth repo.

I think this should be walletauth-template -- a template for making walletauth-powered ODD apps -- and the other one is the SDK / library.

Tweaks to READMEs of both, I also have #19 filed here, which should really be in the other repo. Where we explain "next steps for WalletAuth", which is basically "this can work on native mobile, we wait for 5630 before it works widely".

Connect WalletAuth to the FEVM chain

We'd like to participate in the ETH Global Space Warp hackathon later this month by demoing a WalletAuth <-> FEVM integration.

In theory this should be fairly straightforward, but to test things out we will first need to either run an FEVM node locally or connect to a hosted one. Once that is done, we will record a demo of our WalletAuth template connecting to that chain and running through all the WalletAuth template features

Don't pop up MM immediately on page load

Load the page, give us an opportunity to explain that this only works with MM (and Brave!), link to odd-walletauth SDK, etc.

Add a button that is "Connect MetaMask" at the bottom of that text.

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.