Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/parthpaghdal0/supabase-sveltekit-example


https://github.com/parthpaghdal0/supabase-sveltekit-example

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# SvelteKit and Supabase app
## Demo, testing, prototyping, etc. Mainly for learning.

### Basic architecture

I have tried to separate client and server logic as much as possible. The basic idea is that the client should _never_ directly communicate with any endpoint (at all).

This shall be the responsibility of the "Services" (perhaps it would be more prudent to call them controllers, though)

So basically:

Client -> Service -> Endpoint -> Supabase.

# Why? #

The reason I do it this way is mainly because I want to see if it is possible to maintain this architecture as the project grows. I believe it will scale well when and if the application grows. It may seem to be over-engineered (and maybe it is) but I think that it will in the long run improve code readability and prevent "boilerplate code redundancy". Components/pages will all have common entry into the the "inner workings" of the application via the services, to ensure that every request will be processed identically.