Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What database do you use? Sqlite?

Looks good.

Also how’d you manage making it mobile friendly? That because it’s a progressive web app?



The database is PostgreSQL.

We are using Material UI (https://mui.com/material-ui/getting-started/overview/) on the front end which is what makes the website responsive and mobile friendly. MUI has been great to work with, I highly recommend it.

The Progressive Web App part of things (https://developer.mozilla.org/en-US/docs/Web/Progressive_web...) is what makes Linkidex still mostly work if your internet goes down, and lets users "download" the front end web application to their phone so it behaves like a native mobile app would. For example, users who download Linkidex get an icon on their home screen that opens Linkidex, and the url bar isn't visible when the app is open, despite the downloaded app just being a web page thats opened with your phone's default browser.


Awesome, material UI does look nice.

How is it you can use postgresql as database but your app still works offline? Been looking for a bookmarking app that works offline so that sounds cool


The front end app maintains its own state. The front end fetches all of a given users links when it loads and stores them in application state (memory within the front end application.) If you lose your internet connection, the front end will continue to use the links that it has in its application state.

This isn't how Linkidex works right now, but using Linkidex as an example, the front end could queue up tasks such as "create link abc", "delete link "bcd", and "edit link cde" when offline. Then when your device regains an internet connection, it could send all of its queued up tasks to the back end and reconcile the changes with the database. PWAs make this kind of thing possible, and fairly simple to implement.

I am a huge fan of "The net ninja" on YouTube, and he has a great tutorial on PWAs: https://www.youtube.com/watch?v=4XT23X0Fjfk Note this is 3 years old and front end stuff changes quickly so this may be slightly out of date, but I still recommend this video series. PWAs are awesome.

Edit:

To clarify about linkidex working offline, you can still search your links when offline, assuming you loaded your links before going offline. You can't create, edit, or delete anything though, and if you refresh the app it will fail to reload just like any other web page. Maybe its unfair for me to say it 'mostly' works offline. I'll do a better job communicating this in the future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: