readme update

This commit is contained in:
matthieu42morin 2024-03-24 16:09:34 +01:00
parent 2c939ff741
commit 3db7f22a17
2 changed files with 29 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# [Kkosmetickysalon.cz](https://kkosmetickysalon.cz)
# create-svelte
This is the repo of the website [Kkosmetickysalon.cz](https://kkosmetickysalon.cz), my mom's business, I also did the logos and branding, which are located in `/static`
@ -16,22 +16,22 @@ This is perhaps the best UI library for sveltekit, their docs and their code is
Utility css is quick to develop, easy to remember, readable little boilerplate needed. Postcss as a dependency and for conditional css. Fontawesome free for local icons as fonts.
### Most importantly, SCREW CMS, use .md or json or yaml and parse them
### Most importantly, SCREW CMS, use .md and json or yaml and parse them
#### Motivation
I have spent considerable amount of time researching and learning the bloatware that is on the internet caused by the nocode movement and enough is enough. It takes a fraction of a time, if any to understand how json works, if you know it's a way to represent and structure content, then you're set.
I have spent considerable amount of time researching and learning the bloatware, complex CMS systems and SaaS models, that are on the internet caused by the nocode movement and enough is enough. It takes a fraction of a time, if any to understand how json works, if you know it's a way to represent and structure content and understand key/value, then you're set. Introducing `.md` is a no brainer to any content writing.
- it's dead simple and you literally almost just import it
- You don't have to host strapi or a db on a 4GB RAM server in the cloud for making a post once a month
- You don't have to host strapi or a db on a minimum 4GB RAM server in the cloud for making a post once a month and have to maintain the bloat.
- Static makes better SEO
#### Use case
I have a $content path (`./src/content`), where I have `./services/` and `./posts` in the former I store individual service categories (and their respective items) in json files, in the latter I have posts, where I store .md files, which are subsequently processed by MDSveX and the html outputted from MDSveX is relayed to `./sluzby/[id]`. It's very DRY, there are no lockins and it's reusable on a lot of platforms.
Everything has a schema (e.g. `./sluzby/schema#`) or a type or a generatable template.
The schema can be used with a [JSON editor](https://github.com/json-editor/json-editor) to help nontechies write it.
The json data is then validated by [ajv](https://ajv.js.org) to match the type Service in `$lib/types/service.d.ts`
This implementation offers an option to create or edit json files a [JSON editor](https://github.com/json-editor/json-editor) according to a schema to help write new services in a GUI.
The json data is validated by [ajv](https://ajv.js.org) with my script in `./tests/ValidateServices.js/` to match the type Service in `$lib/types/service.d.ts`
## Features, Components and parts
@ -45,11 +45,11 @@ Screw Google Maps, I knew I wanted to use OSM, maybe Mapbox, because I had exper
### CSP, custom hooks, custom headers
Securing this app with the latest security features and web technologies.
Securing this app with the latest security features and web technologies. If you want to look at the CSP and other policies, look at the headers set in `hooks.server.ts`. I use [Sentry](#sentry---runtime-prod--dev-analysis) as the endpoint. It took a lot of experimentation to get this right, it is a very strict policy so any new external service will not be allowed and the policies must be changed.
### Service Worker
### Service Worker, manifest
Why not?
Why not? It's cool, build PWAs to screw with Apple.
## Admin/DevOps Tools
@ -59,7 +59,7 @@ A list of mostly 3rd party useful tools this project uses.
### hCaptcha
For forms, I may remove this in favor of something else, because it could be a privacy and GDPR issue. Also screw Google and their reCaptcha.
For forms... I may remove this in favor of something else, because it could be a privacy and GDPR issue. Also screw Google and their reCaptcha.
### Plausible self-hosted
@ -67,7 +67,7 @@ That or coding some metrics and using some opinionated solution myself.
### Sentry - runtime prod & dev analysis
Sentry is cool, I will probably not use 80% of their features, but when doing CSP and all sorts of reporting, this came in very handy. I don't really see an alternative with sveltekit.
Sentry is cool, I will probably not use 80% of their features, but when doing CSP and all sorts of reporting, this came in very handy. I don't really see an alternative with sveltekit. I want to spend as little time as possible on monitoring and maintenance and still ensure 100% reliability and performance.
### Playwright - headless browser target testing
@ -75,4 +75,20 @@ TODO, probably sometime, It can be useful with the service posts.
### Dockerfile
Selfhosting this is the only way. I used ansible and terraform to get this thing in the air together with the analytics platform. It's on AWS for now,
Selfhosting this is the only way. I used ansible and terraform to get this thing in the air together with the analytics platform. It's on AWS for now.
## Some notable references and minor features
### Email obfuscation
Spammers are hopefully not so smart. I sveltyfied a [SVG email obfuscation method (because JS bad) from https://rouninmedia.github.io/protecting-your-email-address-via-svg-instead-of-js/](https://rouninmedia.github.io/protecting-your-email-address-via-svg-instead-of-js/)
### OpenGraph
My own implementation, extending the Service type to still adhere to one central source of info.
### Fonts (look at `./static`)
- Playfair Display
- Quicksand
- Montferrat

View File

@ -45,6 +45,7 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.35.1",
"mdsvex": "^0.11.0",
"postcss": "^8.4.35",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",