# Mumblr Development
## 2022-07-27
- [x] Show error message when clicking "This is a shared computer"
- [x] Add "spinner" when checking for user name
- [x] Switch to using DaisyUI's "checkbox"
- [x] Add "green check" inside the input when username is available
- [x] Add "red x" inside the input when username is not available
- [x] Install webnative `0.33.0-alpha-3`
- [ ] We need to not allow the user to Register when they are already registered! We get an error.
- [x] When registration is successful, redirect to "Welcome" screen
- [ ] Greens and reds for success and failure are the wrong color
## 2022-07-20
Webnative App Template
- Svelte + Tailwind + DaisyUI
- Introduce why we're working on this - porting Bear to it.
## 2022-07-13
**Todo:**
- [x] Begin port to Svelte!
- [ ] Replace "Jess's mumblr" static text at top of generated blog with user's name or something more generic
* This will be the first example of user preferences.
* Store these in JSON file in the app's webnative directory?
- [ ] Replace the About text with user's text
- [ ] Move things from this file into GitHub Issues and start using GitHub to track progress
- [ ] Note browser incompatibility
## 2022-07-06
- Future feature ideas
- Document different "publishing" workflows
- Upload markdown files via CLI using the append endpoint
- Fission Drive
- "Show me my files" in Fission Drive
- Teach mumblr to know when "Build" needs to happen
- Based on the content
## 2022-06-29
**High-level goal:** Get the proof-of-concept to the point where non-developers can use it.
**Things to improve:**
- [x] Figure out why main branch and production appear to have diverged
- [x] Remove title - it's not used!
- [x] Automatically write out the `postedAt` date to frontmatter
- [x] Update the UI when a post is successfully published
* When the "Publish" button is clicked
* Disable the "Publish" button
* Replace the text with "Publishing..."
* When the file is successfully published
* Replace the text with "Publish successful!"
- [x] Move the `postedAt` format from date to full timestamp
- [ ] Reconsider the UX around "Build"
## 2022-06-22
It was the "Import Size" extension that was slowing down VS Code!
**Today's goal:**
- [x] Merge Luis' [plug icons PR](https://github.com/jessmartin/mumblr/pull/4)
- [x] Build whenever I click "publish"
- [x] Build the HTML/CSS
- [x] Write the static site to IPFS
- [x] Show a simple IPFS Web Gateway URL where the site can be viewed
## 2022-06-15
- [ ] Build whenever I click "publish"
- [x] Read the most recent directory of Markdown files
- [ ] Build the HTML/CSS (Svelte?)
- [ ] Write the static site to IPFS
- [ ] Show a simple IPFS Web Gateway URL where the site can be viewed
- [ ] Document how to point a DNS entry at some files in IPFS
- [ ] Remove the "Title" field in mumblr
FileContents and FileContentsRaw are not adequately documented in the Fission WebNative docs.
## 2022-06-08
I want a function that I can call from anywhere that will rebuild the site and re-publish.
- [x] Replace "Log In" and "Log Out" with "Connect File System" and "Disconnect File System"
* Permissions are granted TO mumblr BY the user to access the user's file system.
* Much more similar to "connect" and "disconnect" than "log in" and "log out."
- [x] When first going to mumblr.com, if the user does not have permissions, it should show "connect file system"
- [x] When first going to mumblr.com, if the user already has permissions, it should show the correct UI immediately
- [ ] Add a tooltip to show "Connect" or "Disconnect" when hovering over the status indicator.
- [ ] Make the status indicator less prominent and "button"-like.
- [ ] Status indicator should have a "Loading..." state that's animated while attempting to initialize WebNative
- [ ] Disable the hover state on Publish when the button disabled
- [ ] Start a mumblr development blog. A blog, built on mumblr, about mumblr?
- [x] Improve the README for mumblr
- [ ] Buy a custom domain name for mumblr and deploy there
## 2022-06-02
### What does it mean to be logged in or logged out in Fission?
**Logged Out**
The analogue to the traditional "logged out" state is mumblr is not currently connected to a filesystem, or rather doesn't have any active permissions. Either the user has one and hasn't granted permission, or they don't have one yet and need to create one.
- As a user, I want to connect mumblr to (give mumblr permission to access) my files in IPFS
- As a user, I want to create a filesystem in IPFS (I don't yet have one)
**Connecting a different account**
Often login/logout on personal computers are due to needing to access different resources. More sophisticated applications allow you to be "logged in" with multiple accounts simultaneously and switch between them. I think that model fits well with WN.
- As a user, I want to connect to / give permission to mumblr for a _different_ set of files in IPFS (for whatever reason)
**Disconnecting**
Sometimes I want to disconnect this application from accessing my filesystem resources. Either it has lost my trust, or I no longer intend to use it, or something. I want to keep my files, but not allow this application to edit them.
- As a user, I want to disconnect from / revoke permission to mumblr for a set of files in IPFS
**Really, actually logging out**
How do I go about preventing users from coming along and using my keys, on my computer, to do things with my applications? Something like "locking my wallet" could be an answer?
I think I finally see where you're going with eschewing the language of "log in" and "log out." For a shared computer, there is a question of how would I even get my keys onto this device (or off it, more likely) in order to access my personal resources. But that's a key management issue.
## 2022-06-01
* Badger2040
* e-ink device
* The Infinite Room
- [x] Move the "Log out" button to the right place
- [x] Create a "Log in" button when first visiting the app
* "Log In with Fission"
- [ ] Create an About page
- [ ] Separate out the YAML frontmatter around posted at into a separate section
Things to ask about:
- How do I know if the user is already logged in - already has a key to the filesystem?
- How does await work in an async function when I want to wait on the results of a function call before taking the rest of the actions?
## 2022-05-25
- [x] Clean up the code in mumblr-generator
- [x] Ignore the metadata when populating the body of the post (strip it off?)
- [x] Add the ability to mumblr to write yaml frontmatter / postedAt
Things to ask about:
- Would be nice to have a test harness set up to extract functionality and write unit tests around them
- property-based testing
- fuzzing generates many examples
- also use [mocha]() as a test runner (describe, it, expect, etc)
- [Example 1](https://github.com/fission-suite/webnative/blob/4a7311bea1b42aa52da0979d892554cbc788ae44/src/common/hex.node.test.ts#L5-L29)
- [Example with Setting Number of Examples](https://github.com/fission-suite/webnative/blob/1d91cb0f30aec80f1ea94f8cbd924e2d3b67feee/src/common/cid-log.node.test.ts#L94-L113)
- [Example using Ava as the test runner](https://github.com/ucan-wg/ucan-check/blob/78ec880f6e8f38bed2920535c9aa8e9d639aa84d/package.json#L8)
- IPFS startup time is long. Would be nice to have a faster start-up time or take advantage of an IPFS node that's already running? Essentially, want to be able to execute the script more quickly.
- Maybe we should _not_ startup an IPFS node in order to grab files but _instead_ use an IPFS gateway.
- CAVEATS for using an IPFS web gateway:
- Data must be public / unencrypted - no problem!
- HTTP gateways to files stored on IPFS.
- Keep in mind that it's possible to _delay_ when we load the filesystem
- Flag in `initialize` function for whether to load it or not:
```javascript
const { permissions } = wn.initialise({ loadFileSystem: false })
```
- DNS for looking up a DID and for looking up Root CID
- Figure out how to check for `undefined` with the `front-matter` library when it attempts to parse a markdown file that doesn't have frontmatter.
- [Optional Chaining syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining)
- Define our own FrontMatterResult type
-
- How can I get a stable name / URL for a directory and look up the newest content in that directory?
- Here's some documentation that's helpful: https://glass-bear.fission.app/
- Accessing files in a directory: https://ipfs.io/api/v0/ls/${CID}
- [Docs on ls](https://docs.ipfs.io/reference/http/api/#api-v0-ls)
- [Docs on Web3.storage](https://web3.storage/docs/how-tos/retrieve/)
- How should I trigger a build of the new site whenever the files change in IPFS?
- [ ] Log a defect in Drive: going back
- [ ] Learn about IPNS
## 2022-05-18
Blocked by "versions..."
**Today's goal:** Order the posts by "posted at" date.
* Parse the frontmatter using remark-frontmatter plugin
* Swap out the marked parser for remark
* Rip out JSDOM and do a manual find-replace
- [ ] Control the "posted at" date when writing the post
- [x] Order the posts by "posted at"
- [x] Show timestamps next to each post
- [ ] STRETCH: Make timestamps link to a page for each post?
**After stream todos:**
- [ ] Decrease the bitrate for the stream to match YT
## 2022-05-11
**Today's Goal:** Get an end-to-end setup working. Write a blog post in mumblr, view that blog post in an html page on the web somewhere.
- [x] Simple static-site generator from
- [x] Deploy mumblr somewhere on the webz
**Intro**
Welcome to "coding with Jess" - where you code along with me while I build a thing.
- This is going to be a weekly stream, so if you want to get notified / reminded, hit Subscribe.
Why am I building mumblr?
- To learn about decentralized applications
- To learn TypeScript
- I'm not an expert!
- Here's what we know so far:
- Decentralized application architecture.
- Mumblr works!