Thinking about making my own lemmy client, but I could use some feedback


This entry was edited (1 year ago)
in reply to moseschrute

it should have good moderation implementation and have its markdown synced with lemmy ( like spoilers etc. ).

It should be easy to block, report.

I like the idea of the offline support. Could be cool if you are able to "download" a post for offline reading or just reading through its comments.
<= could be linked with the "favorite" functionality of lemmy.

Thanks for adding another app to the diversity of lemmy.

This entry was edited (1 year ago)
in reply to Rooki

My goal is to store everything offline for a period of time. Likely, it will be more complicated than this, but let’s say for now everything you see will be automatically cached offline for 30 days. Instead of a number of days, I will probably set a max size for the offline cache and drop the oldest data in the cache as new data comes in.

The only issue here is I’m not sure how easy it will be to cache images offline. They will take up more storage, and I’m not as familiar with image caching mechanisms for apps.

Do you know if Lemmy tends to have good alt text for images? That would be easier to cache offline instead of images.

Maybe after the initial version, I can add the ability to pin a post to your cache so it doesn’t get cleaned up automatically.

in reply to Rooki

I assume you mean when my app caches a post, but that post is deleted from Lemmy. That’s a good question. Off the top of my head, I would say as soon as I know a post is deleted, I would likely want to purge it from the cache.

I guess it’s a question of whether I should respect the API saying the post is deleted or act like a temporary archive. I’m open to either. From a technical perspective, it would be simpler to act as an archive.

As far as the type of cache I use, I may use a LRU cache, which will effectively prevent something from being deleted every time you view it. So even if something was cached a long time ago, if you pull up that post again, it will reset the timer.

in reply to Rooki

I agree with that. It’s similar to if someone loads the post in their browser. If the site isn’t actively polling the API to check if the content is deleted, they will continue to see it until they reload the page. The difference is the cache lives longer. I can probably have it poll the API when they reopen a cached article, and if it’s been deleted, purge it from the cache. The result is they may see it flicker as it’s purged quickly, and if they’re offline I wouldn’t be able to poll the API.
in reply to moseschrute

Update on this matter:

I made a feature request for including an image hash with the image_details table but it seems like they will be adding a blurhash field instead, which is unique enough for a temporary cache that will at most probably cache ~100 images at best.

Oh and yeah, you probably should get ready to support blurhash in your client. It both acts as a small hash and a way to show blurry "previews" of the image.

Links:
github.com/LemmyNet/lemmy/issu…

github.com/LemmyNet/lemmy/issu…

in reply to moseschrute

Seems like the image_details table was added in Lemmy v0.19.6. if you are testing it with your current instance (LW), it's still using Lemmy v0.19.3. That's why.

Link: github.com/LemmyNet/lemmy/comp…

in reply to Rooki

Again, I plan to add moderation features. But I am one person with a full-time job. I need to prioritize the features that will please the most users. Prioritizing everything initially could mean lots of bugs in the app, and I would lose users quickly due to a crappy app. I would rather build features slower but correctly.

That being said, if most Lemmy users moderate, then that would make this more of a core feature. But again, I want to also build an app that appeals to incoming Reddit users, and those people won’t be moderators. I’m hoping this will be a tool that can help grow Lemmy.

in reply to moseschrute

That would actually be easier than the offline upvote feature. The issue with offline interactions is if you upvote in one app, but downvote on another, who wins?


Whichever interaction is sent 'last' when connected. No, the user would not have any control over this in the example situation,but to be honest it is a pretty minor issue with no real solution. The same thing could happen in an arbitrary order if you clicked different options on two different browsers at approximately the same point in time because web calls are not instantaneous.

in reply to snooggums

Respectfully, I don’t think it’s that simple. I think it’s one of those problems that appears deceptively simple, but when you dive into it, it becomes a big headache. One big difference between truly offline first and arbitrary web requests is an offline first app imo should let you close and reopen the app without dropping those pending interactions. When you marry this with cross platform, you need a robust database solution on both native and web, which makes the stack more complicated. I will consider making aspects of the app offline first, but I have decided not to make fully offline first a core feature.
in reply to Dariusmiles2123

I kinda want to avoid building a backend for this if I can. That would also mean your app wouldn’t depend on any infrastructure that I own, preventing any centralization around my backend. And it would mean a very low cost for me to maintain this app.

One way to solve sync could be to have a QR code you scan to sync settings. But it might only sync when you scan it and not continually. I can also look into any Apple or Android APIs that might make this possible, but that would leave out web, and I really want feature parity between all platforms.

But this would fall under a nice-to-have feature that I would likely not prioritize. I really want to nail down the core functionality first.

in reply to Dariusmiles2123

Lemmy UI is only one option, although it is the default for most instances. There are a lot of different web clients, some of which will preserve settings:

Voyager

Tesseract

Quiblr

Photon

Mlmym ("old-lemmy")

Alexandrite

in reply to moseschrute

in reply to OpenStars

I need to set some constraints for the project. IMO, going multi-protocol will be too much work. I would rather do one protocol really well than try and satisfy multiple. I also primarily use Lemmy, and a Lemmy-based app is something I myself would actually use. Doing a different protocol would require me to put myself in the headspace of users that I’m not as familiar with. Much of building an app is sympathizing with your user base not just technical.

But I plan on making the app open source, and that means it can always be forked and adapted to a different protocol later. And I’m happy to draw inspiration from other protocols.

I appreciate the idea! I think a multi-protocol app would be great, but again I think for this project and my limited time, doing one thing well would yield a better result.

in reply to moseschrute

in reply to OpenStars

That makes sense. I appreciate the history lesson. You’re right, my account is very new, and I’m new to Lemmy. Maybe the protocols you mentioned are more compatible than I realize. I would imagine that if Lemmy.world migrates, what they migrate to will be more similar to Lemmy than something like AT Protocol. So it might be okay to run with Lemmy for now and then adapt later depending on where most users wind up.

I still would like to keep the project’s scope smaller, but if there was a mass migration from Lemmy, I would absolutely reconsider. Let me also read up on the similarity of the protocols. If interoperability is easy to do, I’ll consider interoperability from day one.

in reply to moseschrute

in reply to OpenStars

Interesting. If you have any talks or articles, I would love to learn more. Without knowing anything about PieFed vs Lemmy, I will say I do think it’s important with any product to nail down its core functionality first. Trying to please everyone can degrade the overall quality of the product. Is it possible Lemmy is focusing on core functionality first? Like it’s interesting that PieFed includes some features but lacks more basic features.

Swapping out API calls shouldn’t be too difficult, but if the schema of the data is very different, it could get difficult. If PieFed was a superset of Lemmy in the sense that it returned the same schema with additional information, then it becomes easier. AT Protocol is a good example of having a completely different schema, making it more difficult to implement interoperability - I know people are working on interoperability, so I’m not saying it’s impossible.

I know nothing about PieFed, so that may sound ignorant on my part, but I will do more research.

in reply to moseschrute

I have nothing to do with PieFed, beyond liking it and so I joined the flagship instance as a regular user, which gives me only small insight into the day-to-day usage experience:-).

That said, the main developer has given several talks - e.g. this one and see
also Rimu's YouTube channel.

in reply to moseschrute

FYI, its not true the 80 percent of users are on lemmy.world see here (total number of active users) and here (number of lemmy.world active users).

Also piefed as far as i know does not really support multireddits , you can't define a feed of groups of communities as a user. piefed topics are configured by admins or the developers .

in reply to Nothing4You

This entry was edited (1 year ago)
in reply to OpenStars

at least the image resizing topic has recently been fixed in lemmy, thumbnails sizes are limited (at the time of thumbnail creation) in the latest release. I'd have to look closer at the other stuff, the api part is unlikely to have changed and will affect all frontends, but js part should differ depending on the front end. some instances already use other frontends by default and there is also a replacement for lemmy-ui being worked on (lemmy-ui-leptos), but I don't know how they compare. either.

it should be taken into account though how much of this is cacheable as well, as it will then typically only affect the first load for the static files.

I can totally understand the issues in general though, I've been living with a 64kbps uplink for several years in the past.

in reply to Nothing4You

in reply to Docus

In that case, it would have been better if OP had offered the type of functionality that they wanted (e.g. cross-platform support, better responsiveness to tablet screens, etc.) to Voyager, as in like make a fork of Voyager and add in the new desired features. Elsewhere in this thread OP acknowledges that this would have been preferable... yet they are going to do their own thing regardless. Which isn't nothing imho, even if something else might have been more ideal.
in reply to MrMakabar

Wow, I totally missed that. However, it does feel like the web was tacked on as an afterthought. It feels like navigation hasn’t been optimized for larger screens (see screenshot below). A sidebar would be much more usable on larger screens than this stretched bottom tab bar.

That being said, it would probably be easier for me to contribute to Voyager than to build my own app. But I also kinda want to build my own app, lol. But I might also consider contributing to voyager if they are interested in optimizing their interface for larger screens.

in reply to fmstrat

Tamagui + One (built on React and React Native), tanstack for querying and list virtualization, flash list for native list virtualization, maybe Zustand, Dayjs. It will be 100% TypeScript. I will likely use no Server Side Rendering with React. I would like it to be possible to host the site via GitHub pages for free so the project can easily be forked. Beyond that I’m still deciding.
This entry was edited (1 year ago)
in reply to moseschrute

Good luck then, with that stack you'll likely be working alone as contributors typically drive forwards Flutter these days. But it sounds like you're doing this to learn anyway, which is great.

Personally I use Thunder and added the two column view for tablet, had considered PRing a web and/or desktop compilation to see how it looks, but realized I never used it. I don't even have a standard web UI up ony server all the time.

in reply to fmstrat

in reply to moseschrute

React Native is big because ot was first. Stats I've seen show new apps leaning towards Flutter since Dart compiles native, unlike RN. RNs native parts are written in Java, and personally I've found Flutter to solve all the issues I had with RN.

For instance, large image galleries were simple in Flutter, and required all kinds of memory management in RN.

That being said, I still like RN a lot, so don't take this as me bashing on it.

in reply to moseschrute

This entry was edited (1 year ago)
in reply to Raphael

in reply to Raphael

in reply to Raphael

it feels like FOSS alternatives would be 20 years in the future if put worked together on 2-3 alternatives instead of 20-30 disparate projects.


Honestly having 20-30 separate projects is awesome if merging in the creative bits from each were merged into the more popular ones more often. Sometimes there is a foundational difference that makes that a lot harder than plug and play, but to be honest not developing with being modular in mind is one of the biggest issues with any kind of development.

in reply to moseschrute

Great idea! Just here to offer support. I don't think voyager existing matters much, diversity is the name of the game for the fediverse.

Feature wise, I'd love to see something that embedded youtube videos and similar media with the url given but I'm not sure of the feasibility. Making something forward thinking that can eventually be integrated with other activity pub services would be a good idea but I'm certain that brings up the workload as well.

Keep us updated and make a sub when you have a name!