mirror of
https://github.com/Rolands-Laucis/Socio.git
synced 2026-05-15 14:15:57 -06:00
publish and readmes
This commit is contained in:
parent
c0534f0e4c
commit
049679fb6a
4 changed files with 13 additions and 7 deletions
|
|
@ -4,17 +4,20 @@
|
|||
|
||||
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 [framework demo](./demos/framework/README.md) to try an interactive demonstration on a Svelte-Vite app!
|
||||
|
||||
## TODOs
|
||||
Comes with a class for auto securing the SQL, so no worries about injections. And even a simple Vite plugin that wraps it 🥳
|
||||
|
||||
## TODOs 📝
|
||||
* Backend Life-cycle hooks
|
||||
* Session ID sync with backend webserver sessions
|
||||
* Keyed SQL queries
|
||||
* Better SQL dependency distinguisher on queries
|
||||
* Bundler plugins for securing query strings
|
||||
* Typescript migration
|
||||
* plenty more
|
||||
|
||||
# Dont be shy to try this out on your small project. Feedback from real world use cases is much appreciated 🥰
|
||||
|
||||
## Name:
|
||||
"Socio.js" comes from the latin verb "socio", which means to link or associate. Since this lib syncs your frontend and backend. Its also a play on words for "WebSockets" and "IO".
|
||||
|
|
|
|||
4
core/package-lock.json
generated
4
core/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "socio",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "socio",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@rolands/log": "^1.1.1",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "socio",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "a websocket based live and synced front and back end",
|
||||
"main": "core.js",
|
||||
"type": "module",
|
||||
|
|
|
|||
|
|
@ -18,4 +18,7 @@ As you will notice, all instances of the browsers and their tabs update their va
|
|||
|
||||
This is powerful because you nolonger need to write a REST API middle layer between front and back end and manually sync states and data. This is all done automatically for you. As well as no need to write DB query interfacing middle layers, since your SQL queries can just sit in one place - the front end.
|
||||
|
||||
## Next check out the ``App.svelte`` file to see how the magic is done on the frontend - its super simple ;)
|
||||
Notice how this demo also makes the SQL secure on the frontend - by encrypting the raw sql string, such that it cannot be altered or decrypted by anything other than the serving server and is not human readable. To do this, the SQL queries are in a more strict format - written in double quote string format and the sql ends with a comment "--socio" (which is ignored during encrypting and decrypting). This is all done for you via the SocioSecure class and/or the included Vite plugin :)
|
||||
|
||||
## Next check out the ``App.svelte`` file to see how the magic is done on the frontend - its super simple ;)
|
||||
## And check out ``vite.config.js`` to see how to use the Vite plugin and ``core/secure.js`` to see how to use the raw class to do all this as well without a bundler
|
||||
Loading…
Add table
Add a link
Reference in a new issue