Live data from Hacker News

Web apps in a single, portable, self-updating, vanilla HTML file

hyperclay.com

221–230 of 240 posts

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#221
post #52
post #39

Earlier quoted context omitted.

This all sounds like something from 2001. I was doing pretty much exactly this around 2001, using contenteditable with an IIS/JScript back-end.

I think contenteditable is more akin to a rich-text document, while Hyperclay goes a bit beyond by allowing JS to edit the DOM too. I think Smalltalk images and virtual machines are a closer comparison, but applied to the web. You download the image, with some running code, use it, and persist the whole application state.

> while Hyperclay goes a bit beyond by allowing JS to edit the DOM too.

So revolutionary!! How did they achieve this technical feat!?

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#222

Earlier quoted context omitted.

If you want something actually self contained play with this https://startr.style/modernism/

This thing comes across so pretentiously, but they have some really novel CSS ideas I might try. The idea of making selector based on [style*="--bgc:"] and using that to set background color like style="--bgc: red" is not something that I would have thought of.

Happy you enjoyed it. Most of my creations just build on and with Startr.Style. It's a tight alternative to Tailwind's mess of classes. I especially love how directly it translates to pure styling yet allows us to have responsive design eg add the -md suffix to --bgc to specify background colors for tablets and up.

When I work on Modernism or any of the other experimental pages on https://startr.style I don't do it with any pretension but out of a love and familiarity of code and what the web can be. As child I traded helping out at a local computer store for time exploring Gopher and then Mosaic's window to the web.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#224
post #196
post #170

Earlier quoted context omitted.

I'm still confused - if it requires a NodeJS server, then it wouldn't be a fully self-contained HTML file would it?

It technically doesn't say "self-contained", but it does say "portable" and "self-updating", which I must agree is misleading.

In my perspective, for truly "self-contained", "portable" and "self-updating" and even "un-hosted" web apps, the only option nowadays are prehistoric data-URIs, that are slowly losing abilities anyway (basically can live only as bookmarks or direct URL pastes, and their only persistence option is location #hash that needs re-bookmarking):

    data:text/html;charset=utf-8,#Hello, HN!

Do you like this %E2%9D%9Dun-hosted%E2%9D%9E app?
With persistence%E2%80%A6?

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#225
post #135

I spent a weekend making a self-host twitter alternative. source: https://github.com/est/gitweets/ demo: https://f.est.im/ (renders via github API) Basically it renders its self git repo commit history as a feed timeline. Never lose your data on microblogging service providers again! Clone the repo anywhere anytime, make tweets by "git commit --allow-empty". Everything is placed inside a single-html.

I like the idea very much. The prototype looks good, so simple yet it has a lot of potential leveraging Git.

To login, it asks for read/write permission on all my public repositories. I guess that's necessary to make tweets as commits from the web interface?It's a hard ask from a user wanting to join. Maybe better if it could be limited to a single repo.

> Authorize gitweets to access your GitHub account

> This application will be able to read and write all public repository data. This includes the following:

    Code
    Issues
    Pull requests
    Wikis
    Settings
    Webhooks and services
    Deploy keys

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#226

Earlier quoted context omitted.

I see, so you make edits, the Javascript edits the html, therefore File -> Save Page will download an html file with your changes in it that you can open again. I forget that File -> Save is even a thing for websites.

Note: The TiddlyWiki documentation explicitly advises that File -> Save Page does not work. You have to click a save button in the app, and it will generate a valid copy. However, most users deploy some plugin or software which allows transparent auto-saving.

I used https://github.com/slaymaker1907/TW5-browser-nativesaver, that still works with the current version 5.3.8, though just in Chromium based browsers. You save the file once and from then on, as long as the tab is open, it autosaves itself.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#227

Earlier quoted context omitted.

Note: The TiddlyWiki documentation explicitly advises that File -> Save Page does not work. You have to click a save button in the app, and it will generate a valid copy. However, most users deploy some plugin or software which allows transparent auto-saving.

I used https://github.com/slaymaker1907/TW5-browser-nativesaver , that still works with the current version 5.3.8, though just in Chromium based browsers. You save the file once and from then on, as long as the tab is open, it autosaves itself.

That said, I advise against Tiddly Wiki, after using it for long. It has multiple bugs, which the author won't fix (e.g. div's inside p's), It has a cryptic syntax (e.g. code in attribute values), and tagging is not implemented in a way which makes a wiki scale (well, technically it is, tags can have tags). It is a thing where features are added but nothing outdated gets deprecated, so it is bloated. One will be more productive by using a folder with markdown files, and a browser add-on like Markdown Viewer.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#228
post #135

I spent a weekend making a self-host twitter alternative. source: https://github.com/est/gitweets/ demo: https://f.est.im/ (renders via github API) Basically it renders its self git repo commit history as a feed timeline. Never lose your data on microblogging service providers again! Clone the repo anywhere anytime, make tweets by "git commit --allow-empty". Everything is placed inside a single-html.

I like the idea very much. The prototype looks good, so simple yet it has a lot of potential leveraging Git. To login, it asks for read/write permission on all my public repositories. I guess that's necessary to make tweets as commits from the web interface?It's a hard ask from a user wanting to join. Maybe better if it could be limited to a single repo. > Authorize gitweets to access your GitHub account > This appli…

> I guess that's necessary to make tweets as commits from the web interface?

Yes! Just make your "gitweet" locally and git push. The login button is for lazy person like me to make git commits in the browser via the Github REST API. Sadly the written permission for OAuth apps is either none or all repos.

To use single-repo access, there are three choices

- github app

- deploy key

- fine grained PAT

I think they are too much hassle for non-tech user. The OAuth process is the most simple and smooth one. I hope github could provide repo-selection for OAuth, or allow specify which repo to connect with Github App.

I plan to add deploy-key based auth later. This could be also used for non-github services.

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#229
post #21

I appreciate the storytelling and the nice graphics, but after reading 10 screen lengths of this story I still don't understand what technology they are using to achieve this. Is it a lot of words to talk about localstorage? How exactly are the changes persisted to the HTML file? Is it using FileSystemAPI to overwrite the previous HTML file? How can they implement it seamless for the user without them having to choos…

There's two approaches Hyperclay takes. 1. Hosted: You get a bunch of "HTML Apps" that persist themselves by calling their own /save endpoint. We grab the HTML and overwrite their-app-name.html, making a backup/version along the way. (Each user can edit their own app only, but they can also enable signups so that other people can fork their app. We also have plans to allow them to ship optional updates to forked apps…

Why are you trying so hard to avoid saying that it uses a NodeJS server?

Re: Web apps in a single, portable, self-updating, vanilla HTML file

#230

Earlier quoted context omitted.

This thing comes across so pretentiously, but they have some really novel CSS ideas I might try. The idea of making selector based on [style*="--bgc:"] and using that to set background color like style="--bgc: red" is not something that I would have thought of.

Happy you enjoyed it. Most of my creations just build on and with Startr.Style. It's a tight alternative to Tailwind's mess of classes. I especially love how directly it translates to pure styling yet allows us to have responsive design eg add the -md suffix to --bgc to specify background colors for tablets and up. When I work on Modernism or any of the other experimental pages on https://startr.style I don't do it w…

I appreciate your efforts :)

I think what gets me is there's 6 paragraphs in a row that either start with "Modernism" or have it in the first sentence, and it comes along with words like "transcends", "echoes", "essence", "exude", "crafts." They're good paragraphs by themselves and make good points, I just think that together they come out a little breathless, and maybe some consolidation is in order :)

I notice from your profile that you haven't submitted your site to HN, I think you should do so, I think it would generate some interesting discussion.

Post reply on HN