7 ms·
Soul – A SQLite RESTful Server
- hsbauauvhabzb 4y agoThis needs auth with a randomly generated password by default. Standing up products like this is exactly how data breaches happen, it’s effectively sql injection as a feature.
- thevahidal 4y agoExactly, more generally I'm thinking of a way for Soul to be extendable via plugins, which one of the most important one is authentication / authorization and permissions level.
- hsbauauvhabzb 4y agoas a default
- thevahidal 4y agoYeah it's reasonable.
- Aeolun 4y agoIf you use this as your production database on the public internet that’s entirely on you. It’s the same issue people have with Redis.
- hsbauauvhabzb 4y agoThat’s like saying cars don’t need airbags because people should drive responsibly. Edit: case study: Optus, who leaked pii due to an unauthenticated api intended for internal use only but accidentally exposed to the internet.
- wharfjumper 4y agoI hadn't heard that about the Optus leak. Do you have a link with further details?
- hsbauauvhabzb 4y agoI’m sure google would, it was headline news aus wide for over a week.
- chx 4y agoIf we are talking of RESTful servers and mention Redis, then we should mention Webdis, which is a RESTful server for Redis -- and it has ACL. https://webd.is/ https://webd.is/ It is a very old but still active project.
- thevahidal 4y agoHi everyone, for the last couple of weeks I started to work on Soul, which a SQLite RESTful server. Basically it takes an SQLite file and create CRUD endpoints for it. Right now it consists of Soul CLI and Soul Studio (Which studio is at the early stages of development). Studio is going to be GUI for soul that let's users to work with their database in a graphical way. Eventually I want Soul to be a simple backend-as-a-service that people can use it to quickly start their ideas. Please let me know if you have any ideas to improve Soul, or how it'll become useful for your project.
- lucasyvas 4y agoLooks awesome! I'm not sure if it would be one of your goals, but to me a killer piece of projects like this is realtime notifications. Supabase has something like this for Postgres. There are an interesting number of options for SQL via HTTP and SQL via GraphQL popping up in general - some of these might have some features worth looking into.
- thevahidal 4y agoHi Lucasycas, Thanks for your kind words. Real-time events / Websockets is definitely one of the must-have features for Soul. Right now I'm not sure how to approach it, but I welcome any contributions for it.
- simjnd 4y agoPocketBase [1] provides realtime notifications and it works great (PocketBase is a single-binary self-hosted alternative to Supabase and uses SQLite internally) [1]: https://pocketbase.io/ https://pocketbase.io/
- thevahidal 4y agoHi simjnd, Eventually Soul is following the same path that Pocketbase is going, the main difference is that Soul is written in Node.js while Pocketbase is writtern in Go. Considering the larger community of Javascript developers I decided to start Soul.
- gl9 4y agoReally awesome! I sent you an email. There are so many applications for this.
- thevahidal 4y agoThanks gl9, I'll respond to your email asap.
- aaviator42 4y agoThis is probably not ready to be used in production by others, but I wrote a library that gives you a key-value storage interface to SQlite files: https://github.com/aaviator42/StorX https://github.com/aaviator42/StorX I've been dogfooding for a while by using it in my small side projects. And there's a basic API too, to use it over a network: https://github.com/aaviator42/StorX-API https://github.com/aaviator42/StorX-API
- thevahidal 4y agoHi aaviator, Thanks for your recommendation, I'll make sure to check it out.
- feldrim 4y agoLooks like a well structured one. Great. It'd also be nice to see the API docs on Wiki though. I like rqlite's simple documentation, for instance. [0] https://github.com/rqlite/rqlite/blob/master/DOC/DATA_API.md https://github.com/rqlite/rqlite/blob/master/DOC/DATA_API.md
- thevahidal 4y agoThanks feldrim, I'll give it a high priority for sure. Also thanks for the rqlite, I'll make sure to check it out.
- feldrim 4y agoAlso, I found this report that might be helpful for you. https://github.com/dbohdan/automatic-api/ https://github.com/dbohdan/automatic-api/
- thevahidal 4y agoThanks a lot, I'll definitely check it out.
- mongol 4y agoThis looks useful. But some examples of how the http responses look without spinning it up would be helpful.
- thevahidal 4y agoThanks Mongol, Yeah exactly I should create a wiki for it.
- chiubaca 4y agohttps://pocketbase.io https://pocketbase.io is doing something similar but are a bit further ahead.
- thevahidal 4y agoYeah Pocketbase is one of my main inspirations. I admire it a lot and the reason I started Soul, is because I think Javascript / Node.js could potentially be a better language to approach it as it's more popular than Go and for example to a huge community of Front-end developers it would be easier to adopt as they are already familiar with it.
- anaganisk 4y agoHonest question, aren’t the front end devs the last people who would be interested to work on SQLITE? Why would they invest time to contribute to a tool that they wouldn’t use?
- thevahidal 4y agoHi anaganisk, Thanks for your comment, I just mentioned fronted devs as an example but I'm not sure why you consider them as the last people?
- Aeolun 4y agoI appreciate this motivation. Go is fine, but it’s much easier to read and contribute to JS/Typescript.
- thevahidal 4y agoHi Aeolun, Thanks for your comment.
- geek_at 4y agodoesn't matter much to me as a sysadmin. It's all running in a docker container anyways
- bbkane 4y agoAlso see https://directus.io/ https://directus.io/ - it adds a GUI and a GraphQL API to supported DBs (including SQLite). I'm still playing with it, and I'll add this to the list!
- chucky123 4y agoYeah Directus is great, a bit shallow on docs though. Also it connects to sqllite so how would it stack against OP's project?
- thevahidal 4y agoHi Bbkane, Thanks for your recommendations, I'll check it out!
- a1445c8b 4y agoI also like to use NocoDB for this since, not only does it produce a REST API interface for the underlying SQLite/Postres/MySQL/etc database, you can also use it to build airtable like interfaces via its Web UI.
- thevahidal 4y agoHi, I definitely take a look into it to take some inspirations! Thanks for your comment.
- didip 4y agoAt this point... isn't it better to just use rqlite?
- thevahidal 4y agoHi didip, Yeah, You're completely right, obviously rqlite is a very mature project and the comparison does not make any sense at this point!
- Thaxll 4y agoI never understood the idea of using your DB for more than just storing data. There was similar idea with PG in the past, bad idea imo.
- thevahidal 4y agoProjects like Soul are a REST API wrapper around databases to allow devs easily start their projects without being so much concerned about doing backend stuff.
- Thaxll 4y agoAs if poc with modern lib is an issue.
- toastal 4y agoPostgREST (https://postgrest.org/ https://postgrest.org/) for PostgreSQL should be mentioned as well.
- thevahidal 4y agoHi Toastal, Exactly, PostgREST is one of the best ones out there.
- nesarkvechnep 4y agoTwo things. First, I saw you use string interpolation to build SQL queries. Is this safe? Second, it’s not a RESTful API. I don’t see hypermedia controls so it’s just an HTTP interface.
- thevahidal 4y agoHi nesarkvechnep, Thanks for your comment. For the first question, I see your point, we're going to make Soul battle-tested as soon as we pass this prototyping period and we'll definitely think a way of keeping our queries safe. About the second question you're right, I need to add hypermedia controls.
- fumblebee 4y agoIn the news section: > 2022 Wreck of Äpplet warship, sistership to Vasa, found in Sweden. For anyone who’s not been to Stockholm and seen the Vasa, I thoroughly recommend you push it to your things-to-see-before-I-die list.
- protomikron 4y agoYou probably misclicked the comment section, I guess you wanted to go here: https://news.ycombinator.com/item?id=33346091 https://news.ycombinator.com/item?id=33346091
- ogogmad 4y agoI'm a noob to this. Basic question: Why can't you just send SQL queries to the database, instead of needing to learn an HTTP-based API with lots of verbs? Seems like needless indirection.
- thevahidal 4y agoHi ogogmad, The thing that Soul or other similar tools follow is to automatically turn your database into you backend. You don't need to implement any endpoints, Soul already did it for you.
- deleted 4y ago[deleted]
- KoenDG 4y agoAh neat. I was looking to create a little database to keep track of spending, put things in categories... and then wanted a useable GUI and having to create that sure sounds dreadful... that, and the rest calls for each table and every possible operation, aaaa. So this sounds like a neat thing
- thevahidal 4y agoHi @KoenDG, Thanks for checking out Soul, I'm glad that you liked it!