Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Stein – Use Google Sheets as a No-Setup Database (steinhq.com)
296 points by shivensinha4 on July 13, 2019 | hide | past | favorite | 65 comments



You can do this for free today using open source libraries. https://www.levels.fyi/comp.html used to run entirely on a Google Form + Spreadsheet and still backed by one.

Submit form: https://stackoverflow.com/a/37743080

Get data from sheet: https://github.com/jsoma/tabletop

Happy to answer any questions.


Reminded me of the top comment on the "Show HN" of Dropbox, back in 2007: "you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem." ;)

https://news.ycombinator.com/item?id=9224


Instead of as a disparagement of the product, you could see this as a no-judgement PSA for anyone interested in and capable of running such an alternative.

Incidentally I am precisely looking for something like this so for me that’s valuable :)


I didn't "hear" it as suggesting it was a disparagement of the product, more like a "LOL, sure, that's so easy!" sarcasm. "You, too, can do this -- if you are a former astronaut and billionaire. No big!"

A lot of advice that "You can easily do it yourself" presumes a fairly high level of skill and knowledgeable in sometimes multiple domains. That presumption isn't crazy talk for the HN audience. Plenty of people will have the requisite background knowledge to jump on a comment suggesting a DIY alternative.

But that in no way means there isn't a market for the product. Plenty of people may need or want X and not have the capacity to do it themselves, even with some instruction.


I don't see anything in the comment claiming that it's "easy" to do yourself, just "possible". I don't think they'd bother saying "Happy to answer any questions" if they thought that it was trivial to do without help.


I don’t read any of that sarcasm in the comment. And it’s perfectly fine to link a couple Github libraries in a forum full of programmers.

Further down someone has linked a couple other alternatives that are as easy to use as Stein, using a similarly neutral tone.


I think the idea is solid but the reliance on Google (or other provider) might be the weak point. The cloud may be great but still a gamble if you're totally at the whim of a provider that at any point can make changes that leave you out in the rain. And Google is no stranger to this kind of thing.

Dropbox came at a time when people were seeing the downsides of private solutions and the cloud was there to mitigate them. These days people are starting to see the downsides of relying on the cloud and are moving to private solutions.

The main difference is today's "private solution" is likely to be a self-hosted "cloud". So it's not that we're going back in time a decade, it's just choosing a combination of "private" and "cloud" that maximizes the advantages and minimizes the disadvantages.


> These days people are starting to see the downsides of relying on the cloud and are moving to private solutions.

All available evidence is contrary to this point.


I see more and more people noticing the massive privacy (just an example) implications that many of these solutions bring and they're trying to regain control of their data. This is why I said "people are starting to see". Of course I can't see into the future but there's no reason to believe the trend isn't there at all.

But going back to OP's comment above and the link to the Dropbox topic, a decade ago many were not seeing the move to the cloud as anything more than a gimmick compared to the established private solution, not seeing the trend.

P.S. Just to be clear, by "private solution" I don't mean hosting in your own basement. It's retaining control over your solution even if it is hosted in someone's datacenter.


While this is not a good predictor of business success, it's still a viable alternative for some. Arguably, self-hosting is today more important than ever, given the unreliability and shady practices of many cloud solution vendors.


I'm totally expecting from Google to discontinue, restrict or change the API for Google Sheets at one point. It will likely be in the moment when it's hardest for you to timely update your app.


The difference is that your operating system vendor is unlikely to change the file system API to prevent a simple function such as writing files. With GSuite? Who knows.


Well the advantage of free is not just cost but freedom to modify the code, hack it and also privacy advantages. Same goes for Dropbox vs rsync.


Yup, and these days Dropbox seems to be doing their best to show people that they should have just gone with sshfs after all.


Lol I was thinking of that comment and was hoping mine wouldn't sound it like it. I'm actually happy Stein exists and think it'll be useful to a lot of people. Part of the reason I used Google sheets was because it was a 'free' DB and so I was just highlighting the free alternative.


I couldn't help but point out the similarity – but I can see where you were coming from as well!


One huge difference: Dropbox was a mass market product while this is (presumably) for developers who want to iterate fast.


Stein is completely open-source itself, and the documentation includes instructions for self-hosting. It consolidates all such features in a single API.

Find it at https://github.com/SteinHQ/Stein


One benefit of approach I mentioned is that there's nothing to host. All just client-side code. Although I do see the use for hosting: latency for loading data from Google Sheets isn't great and adding a cache helped in my case.


In this case, what have you used for caching?



I have a lambda polling the sheet every 5 minutes and save that to S3. Cloudfront as CDN on top.


Nice side project but risky to consider for commercial product. With google restricting access to its API, it is unreliable to use a free product for commercial purposes.


Unless your company uses GSuite, then this can be a great tool to quickly put together small internal tools.


all commercial ventures with any upside have significant risk.



Off topic but anyone know where to start to build a UI which has the similar look and feel? I already came across websites which almost look like this and making me conclude there is a design pattern/layout/framework which allows it.


This looks like Material Design.


Looks neat! Questions:

- Do updates show immediately (for both directions)?

- What are the limits of read/write queries?

- What are the limits of rows?

- Can I use formulas in the sheet?

- How is the type handling? Does everything get treated as text or are there date and number types?

- Do formatting options for columns (e.g. for number of decimals) survive when I alter things with the API?


- Do updates show immediately (for both directions)?

Yes, changes are apparent immediately.

- What are the limits of read/write queries?

The details are mentioned on https://steinhq.com/pricing.

- What are the limits of rows?

Details available on the pricing page as well. A thing not explicitly mentioned is that you can add any number of rows to a sheet. In append operations, the row limit is not checked.

I'll let you know the other details soon. That's something many have been asking, and I'm deciding what the default behavior should be.


How is the type handling?

Everything is converted to JSON over the API, so it's all just text and numbers.


All the same questions, would love to hear answers to other questions here...


I have contemplated using google sheets as storage for parts of the data that I have. It would allow me to procrastinate on many admin UI things, and it would even feel much more transparent. It just feels too fragile somehow, which isn't really a rational assessment. Does anyone have experience with it in a SAAS context?


You could also host your website or application's images by creating a facebook account and programmatically uploading the images there, and then linking to the CDN image URL from Facebook. It would work, but there are better ways to handle it.

I would just use Postgres as a database, personally.


Looking at the code, it seems tightly coupled to Google's offerings: just for fun, it'd be nice to have it run against NextCloud/OwnCloud.

Sure, if you host those, you might as well host a proper database (you already do), but for quick prototyping might be useful, or as I said, just fun :)


At our company, we use an ETL script to suck all our Google sheets into MySQL then we run queries for reporting. It's pretty nice, we'll probably open source it.

The worst part is that as a database, Sheets is not one-tenth as good as MS Access was. You can't enforce constraints or even disable certain people from editing the format of a cell. There's lots of things you can try but you are just one inadvertent copy-paste away from losing formatting/validation rules you had set.


How does this compare to Airtable?


AT is my go to solution for quick database needs for prototyping. very simple to share “auto created” documentation for external devs to connect via its marvelous api. plus 1200 row free (infinite tables) is good to start


I'm building something with Airtable now, but definitely see the need to move away from it quickly. More than anything, I just like the appeal of the web UX to get started in designing the data model. It allows me to work with an 'excel guy' in order to figure out what we need for our application.

The API, which is very well documented, is far from marvelous. For example, there is no way to use a transaction to update two (or more) tables at the same time. It is also rate limited to a tiny 5 requests per second, even under paid plans. The API also does not allow you to request relational data in one request. You make a request to get the parent id, then all the children, by parent id, in a separate request.

I'll also say that the company feels a bit dead. You look at the changelog and they add a couple features here and there, while other features, such as barcode scanning (probably a weekend hackathon feature) languish by the wayside. They respond quickly to support requests with answers like 'we will add that to the long list of things we want to do'... riiigght...


They just raised $100M last November, I wouldn't consider them dead... Probably busy hiring :)

https://www.crunchbase.com/organization/airtable#section-fun...


So many discontinued services and people still invest their time to Google APIs.


I have been doing this for a year or so using the python libraries. Created lookup calls etc.

The only issue in large sheets is sometimes you get time outs.

The setup of the sheet and the sharing has to be done using the api key


This is what I did for a webpage I made about books I read. Just have to add a row to the sheet to update the page. Also I should read more books. https://mnky9800n.github.io/booklist/


I see you're enjoying Tom Clancy like I did back then in 2005. Good read bro.


I have an addiction and I can't help myself. I think the strangest thing about Tom Clancy is his politics. He clearly wants an egalitarian meritocracy, a laudable goal imo, then suddenly he's talking about the importance of gender roles or how government handouts are bad. I think his early books are better simply because they seem to be much better researched.


Why is it called "Stein"? (Yes, that happens to be my last name...)


Keep them guessing ;)


Or a FUSE filesystem that stores data entirely within base64 encoded binary chunks in hierarchies of Reddit shadowbanned submissions and comments. Cloud-based, personal, secure!


I’m looking for a invoicing solution in google sheets. Currently I have invoices using templates in sheets, but I also need statements.


This is both a terrible idea and very cool.


Nice! Using spreadsheets as a DB are trend now. Also Spreadsheets are pretty good CMS as well, so people can use it to create websites without code. I made an app called https://Sheet2Site.com which takes your spreadsheet of items/objects and translates it into an app, with filters.


isn't there like a google sheets user cap that severely limits this for production?


This is exactly the approach we're using for hackerpet (hackerpet.com)


ah like glideapp.io but more cross platform!


What is the performance of this?


Data seems to be mirrored to a mongoDB instance on the server where it's served. So my guess is that performance is great.


> You need to enable JavaScript to run this app.

Why are people referring to html+script as apps?


How do you define app? Is there a clear boundary that you can define between a true app and not an app?


Well, let's see.

Begins with:

    <!doctype html>
Has a 3K character script:

    <script>!function(c){function e(e) ... </script>
I'd say that's a web page.


That's a definition of webpage, but you don't explain why webpages aren't a subset of apps. I saw your comment pre-edit, which said that an app has to be downloaded to a user's device to run, but that also doesn't exclude webpages since an HTML document and its scripts also have to be downloaded to a device to run. Is it something that has to be pre-compiled? Is an html and javascript page embedded in a binary an app? I'm only trying to point out that the word "app" is too ambiguous. We can agree that a book isn't an app, but beyond that the definition is purely subjective.


App is short for application. Web pages with scripting existed for years before anyone called anything an app.

Maybe it's just semantics. But it comes off, to me, as pretentious.


Sorry for coming off as pretentious, but that's just the default message that comes with create-react-app. And I conveniently disregarded the idea of making a change!


Hey, thanks :)

Now I know why I've been seeing that error so much.


> No-JavaScript solutions for the web with Stein Expedite

> Handlebars

    <!--- Replace the data-stein-url value with your API URL --->
    <div
      data-stein-url="http://api.steinhq.com/v1/storages/5cc158079ec99a2f484dcb40/Sheet1"
    >
      <div>
        <h1>{{title}}</h1>
        <h6>By {{author}}</h6>
        <p>
          {{content}}
        </p>
        <p>Read on <a href="{{link}}">Medium</a></p>
      </div>
    </div>

Is there now some built-in HTML templating functionality I wasn't aware?

Since when is this no-JS?!

NO JS means NO JAVASCRIPT and not no need to write JavaScript.


I mentioned No-JS because you don't need to write it yourself. But you do need to import a pre-built script in your HTML.

No HTML templating wizardry!




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: