Amazingly crafted, flexible SvelteKit and Express.JS starter code which is enough to be the finisher code for others xD
./.env.sample as a boiler to create your own environment config file (./.env).And then with some docker compose magic, we are ready to roll!
$ docker-compose up
| Service | Default URL |
|---|---|
| Client (SvelteKit) | localhost:5173 |
| Storybook (Svelte Component Library) | localhost:6006 |
| REST API Server (Express JS) | localhost:4269 |
| REST API Docs (Swagger) | localhost:4269 |
| Server Metrics (Grafana) | localhost:1337 |
./client/src/lib folder holds all the UI components, helper functions, configs etc../client/src/routes folder is used by SvelteKit to serve the pages on the mapped routes.http://<Server IP>:<Server Port>/api/docs../server/src/config folder handles usage of environment variables in the server and setting up of connection to the PostgreSQL DB../server/src/controllers folder is where the business logic of the app handles../server/src/middleware folder is where the requests and responses of the server a processed before sending to client../server/src/models folder is where the tables to be used in the DB are setup../server/src/routers folder is where the routes of the server are defined../server/src/services folder is where the DB operations have been abstracted to allow for complete modularity and easy switching of DB if need be../server/src/utils folder is where the helper functions are stored../server/src/validators folder is where the validators are stored.