This commit is contained in:
Rolands 2022-12-09 20:08:49 +02:00
parent 52892bfb47
commit 61834d58c6
5 changed files with 10 additions and 25 deletions

View file

@ -4,27 +4,15 @@
Say goodbye to REST APIs. No more API middleware and DB interfacing functions and wrappers and handlers. Write your SQL queries on the frontend and have their results be automagically refreshed on all clients when a resource is changed on the server DB.
Check [basic demo](./demos/basic/README.md) to try an interactive bare-bones demonstration.
Check [Basic Demo](./demos/basic/README.md) to try an interactive bare-bones demonstration.
Check [secure framework demo](./demos/framework/README.md) to try an interactive demonstration on a Svelte-Vite app!
Check [Secure Framework Demo](./demos/framework/README.md) to try an interactive demonstration on a Svelte-Vite app!
NB! These might not work sometimes, bcs i use them to develop the lib and forget to reset them. Just look for the import errors and in the source uncomment the right import.
Check [docs](./core/docs.md) to see direct examples and explinations of how to use various parts of the lib. Might be out of date, but the lib core files arent that big, and they are full of comments, so u can read up on those.
Check the [Simple Documentation](./core/docs.md) page to see direct examples and explinations of how to use various parts of the lib. Might be out of date, but the lib core files arent that big, and they are full of comments, so u can read up on those.
Comes with a class for auto securing the SQL, so no worries about injections. And even a simple Vite plugin that wraps it 🥳
## TODOs 📝
* Session ID sync with backend webserver sessions
* Keyed SQL queries
* Better SQL dependency distinguisher on queries
* Typescript migration
* Rate-limit query updates
* Threading paralization pipelines for async querry queues
* Data loading and success or fail states
* Caching and dedup UPD msg kind
* File and blob sending and replacing on the client side
* plenty more
Check the lib [README](./core/README.md) for a fuller readme that has more info, otherwise i have to update both of them all the time.
### Dont be shy to try this out on your small project. Feedback from real world use cases is much appreciated 🥰

View file

@ -4,18 +4,15 @@
Say goodbye to REST APIs 👋. No more API middleware and DB interfacing functions and wrappers and handlers. Write your SQL queries on the frontend and have their results be automagically refreshed on all clients when a resource is changed on the server DB.
Check [basic demo](../demos/basic/README.md) to try an interactive bare-bones demonstration.
Check [Basic Demo](https://github.com/Rolands-Laucis/Socio.js/blob/master/demos/basic/readme.md) to try an interactive bare-bones demonstration.
Check [secure framework demo](../demos/framework/README.md) to try an interactive demonstration on a Svelte-Vite app!
Check [Secure Framework Demo](https://github.com/Rolands-Laucis/Socio.js/blob/master/demos/framework/README.md) to try an interactive demonstration on a Svelte-Vite app!
NB! These might not work sometimes, bcs i use them to develop the lib and forget to reset them. Just look for the import errors and in the source uncomment the right import.
Check [docs](./docs.md) to see direct examples and explinations of how to use various parts of the lib. Might be out of date, but the lib core files arent that big, and they are full of comments, so u can read up on those.
Check the [Simple Documentation](https://github.com/Rolands-Laucis/Socio.js/blob/master/core/README.md) page to see direct examples and explinations of how to use various parts of the lib. Might be out of date, but the lib core files arent that big, and they are full of comments, so u can read up on those.
Comes with a class for auto securing the SQL, so no worries about injections. And even a simple Vite plugin that wraps it 🥳
## TODOs 📝
* Session ID sync with backend webserver sessions
* Keyed SQL queries
* Better SQL dependency distinguisher on queries
* Typescript migration

View file

@ -97,7 +97,7 @@ export class SocioSecurity{
//surrouded by the same quotes as original, the sql gets encrypted along with its marker, so neither can be altered on the front end.
//+ a random int to scramble and randomize the encrypted string for every build.
EncryptSocioString(q='', sql='', marker=''){
return q + this.EncryptString(sql + (marker ? marker : '--socio') + '-' + this.GenRandInt()) + q
return q + this.EncryptString(sql + (marker ? marker : '--socio') + '-' + this.GenRandInt()) + q //`--${this.GenRandInt()}\n` +
}
GenRandInt(min = 100, max = 10_000){

View file

@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"demo": "node server.js"
"dev": "node server.js"
},
"author": "",
"license": "ISC",

View file

@ -31,7 +31,7 @@
users = res //res is whatever object your particular DB interface lib returns from a raw query
})
console.log(await sc.query("SELECT 42+69 AS RESULT;--socio-auth;"))
console.log(await sc.query("SELECT 42+69 AS RESULT;--socio;"))
})
</script>