[HN Gopher] Show HN: Mathesar - open-source collaborative UI for... ___________________________________________________________________ Show HN: Mathesar - open-source collaborative UI for Postgres databases Hi HN! We just released the public alpha version of Mathesar (https://mathesar.org/, code: https://github.com/centerofci/mathesar). Mathesar is an open source tool that provides a spreadsheet-like interface to a PostgreSQL database. I was originally inspired by wanting to build something like Dabble DB. I was in awe of their user experience for working with relational data. There's plenty of "relational spreadsheet" software out there, but I haven't been able to find anything with a comparable UX since Twitter shut Dabble DB down. We're a non-profit project. The core team is based out of a US 501(c)(3). Features: * _Built on Postgres_ : Connect to an existing Postgres database or set one up from scratch. * _Utilizes Postgres Features_ : Mathesar's UI uses Postgres features. e.g. "Links" in the UI are foreign keys in the database. * _Set up Data Models_ : Easily create and update Postgres schemas and tables. * _Data Entry_ : Use our spreadsheet-like interface to view, create, update, and delete table records. * _Data Explorer_ : Use our Data Explorer to build queries without knowing anything about SQL or joins. * _Schema Migrations_ : Transfer columns between tables in two clicks in the UI. * _Custom Data Types_ :: Custom data types for emails and URLs (more coming soon), validated at the database level. Links: CODE: https://github.com/centerofci/mathesar LIVE DEMO: https://demo.mathesar.org/ DOCS: https://docs.mathesar.org/ COMMUNITY: https://wiki.mathesar.org/en/community WEBSITE: https:/mathesar.org/ SPONSOR US: https://github.com/sponsors/centerofci or https://opencollective.com/mathesar Author : kgodey Score : 100 points Date : 2023-03-02 18:34 UTC (4 hours ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | cadbox1 wrote: | Nice work! It looks like Sequel Pro for Postgres. | | This might be the first free, user-friendly interface for | Postgres out there. Closest would be TablePlus but it's paid. | phamilton wrote: | https://github.com/beekeeper-studio/beekeeper-studio is pretty | decent. | [deleted] | minusf wrote: | tableplus is freemium like. in the free version can have 2 tabs | open. it also works with way more than postgres. | kgodey wrote: | Thank you! I was pretty surprised that nothing like Mathesar | existed already. | | Unlike SequelPro and TablePlus, we're a web application | (although we do want to do a desktop version eventually). And | Mathesar works even if you don't have an existing DB to connect | to - you can set up a DB from scratch during installation. | kgodey wrote: | Our live demo is having trouble keeping up with traffic; we're | spinning up a load balancer right now and the server will be down | temporarily. I'll edit this post when it's fixed. | | EDIT: demo server is back up. | hummus_bae wrote: | [dead] | jtr1 wrote: | This is super cool! I really dig the way airtable makes | relational databases accessible to non-developers, but I've been | looking for open source alternatives. Going to give this a spin | this weekend :) | seancolsen wrote: | Thanks! We have taken a lot of inspiration from Airtable -- but | we've deliberately avoided calling ourselves an "Open Source | Airtable alternative" because we are actually trying to stay | more true to the concept of "relational data" than Airtable | does. Airtable sweeps a lot under the rug. Primary keys and | foreign keys are heavily abstracted in Airtable, giving rise to | some surprising behavior for anyone more accustomed to actual | databases. | | In Mathesar, we want the abstractions to be as thin as | possible, while still giving non-technical users the capability | to model and edit their data. You can point Mathesar and an | existing Postgres database and, as long as all the foreign keys | are in place, you should be able to use it a lot like Airtable. | But when you set up a new relationship between tables, you'll | find that it works very differently in Mathesar than in | basically any other spreadsheet-database hybrid tool. | | One-to-many relationships use a foreign key column in one table | (instead of in two tables in Airtable). Many-to-many | relationships use two FK columns in a join table (instead of by | showing a column in each of the two related tables). All of the | data is kept normalized. That normalization can make it hard to | work with the data though! So we are developing a robust | graphical query builder (called the "Data Explorer") which lets | you to see data joined across multiple tables. | metasj wrote: | The schema migrations are a delight. And I appreciate the | shoutout to Dabble! Thanks for working on this + congrats on the | release. | | An optimized hosted version with permalinks to Explorer views | would open access to even more users. | bitwize wrote: | Love the reference to GalaxyQuest. (Mathesar was the Thermian | leader.) | iambcam wrote: | I'm sorry if this question is stupid, I'm still learning a little | about technology. The little bit of knowledge I have tells me | that my product team shouldn't directly access the same | production database as my application. The idea for this product | would be to create a copy of my production base and give access | to it through this tool? Wouldn't the cost of this replica be too | expensive? | mistersys wrote: | In my experience in tech, most teams directly access and | manipulate production frequently. Bigger companies usually have | restrictions on this but in the start up world not so much. | vladsanchez wrote: | So happy to realize your stack includes Python, Postgres, | Typescript and Svelte because I once flirted with such idea for a | personal project. I'm inspired. | vhanda wrote: | If I may ask, have you found using a Typed language such as | Typescript has changed your tendency to use Python for other | tasks, given that it isn't typed? [0] | | [0] - I understand that types can be added on top, but I never | found the integration to work that well with mypy when I last | tried it many years ago. | jamesfmilne wrote: | I started using type annotations heavily in my Python code | recently, and coupled with IDEs like VSCode and PyCharm that | leverage the typing, and the underlying tools like | pyright/pylance, it's a game changer. | | I wouldn't try and write a decent-sized Python project | without typing now. | seancolsen wrote: | Yeah, interesting question! Our [team][0] is eight people who | would probably give eight different answers. We've had some | [debate][1] about whether or not to use types in Python, and | eventually we settled on _not_ using them. However we _do_ | use TypeScript. That makes our team a bit stratified across | these different typing paradigms. This stratification seems | to work okay though because each engineer 's role is focused | on either front-end work in TypeScript or back-end work in | Python (without types). The front end people tend to like | types, and the back end people tend not to. | | Personally, I love types! (Can you tell that I'm on the front | end team??) I used mypy extensively at my last job and liked | it okay, but mypy is just not as nice as TypeScript. It's | come a long way, but it can still be pretty cumbersome. | TypeScript on the other hand is fantastic. I'm certainly | never going back to JavaScript. But to get back to your | original question: yes, for me using TypeScript _has_ changed | my tendency to use Python for other tasks. I just don 't want | to use Python as much. For backend work, I'd reach either for | TypeScript, or for Rust. But keep in mind I'm just a front | end dev! :) | | [0]: https://mathesar.org/about.html [1]: | https://github.com/centerofci/mathesar/discussions/913 | erinnh wrote: | Lots of stuff has changed for typed Python over the last few | years. (starting with 3.7, but picking up with 3.8) | vladsanchez wrote: | I haven't because I'm Python biased. ;) However, for Web I've | found myself leaning to TypeScript for type-safety and DX | reasons. | | Have you ever tried [Pydantic](https://docs.pydantic.dev)!? | It may be what you need for type safety / data validation. | westurner wrote: | JSONLD types are specified with @type, and the range of a | @type attribute includes rdfs:Class. | | icontract and pycontracts ( _Design-by-Contract_ | programming) have runtime type and constraint checking; | data validation. Preconditions, Command, Postconditions | (assertions, assertions of invariance after command | C_funcname executed) https://github.com/Parquery/icontract | | pydantic_schemaorg: https://github.com/lexiq- | legal/pydantic_schemaorg | | > _Pydantic_schemaorg contains all the models defined by | schema.org. The pydantic classes are auto-generated from | the schema.org model definitions that can be found | onhttps://schema.org/version/latest/schemaorg-current- | https.js... _ [ https://github.com/schemaorg/schemaorg/tree | /main/data/releas... ] | debarshri wrote: | Interesting how there are some airtable inspired UI elements | combined with postgres. | | Super interesting, will definitely use it. | | PS. I would recommend making the demo account ready-only. | seancolsen wrote: | (Mathesar core team member here.) Thanks for the kind words! | Our demo server actually spins up a unique database for each | session, giving you the capability to make changes to the | database and try Mathesar's features to the fullest extent. | Your changes are only visible to you unless you send the link | to someone else. | debarshri wrote: | Could you elaborate that a bit? | | That sounds interesting too. | kgodey wrote: | Yes! We have set up a Postgres template database[1] with | our demo data sets. When a user logs in, we create a new | database based on the template database and associate the | database with the session key set up for that login. So | every session is associated with a different database and | we have some Django middleware that routes you to the URL | associated with your session's database. If you log out and | log back in (thus ending your session), you'll be routed to | a brand new database. | | However, all databases are accessible to the demo user, so | if you send a link to someone else, they will see your | database (since the URL includes the database identifier). | | You can see our code for it here: | https://github.com/centerofci/mathesar/tree/develop/demo | | [1] https://www.postgresql.org/docs/current/manage-ag- | templatedb... | debarshri wrote: | Thanks! | [deleted] | [deleted] ___________________________________________________________________ (page generated 2023-03-02 23:00 UTC)