docs: rewrite the deploy documentation and fix the stale references
The root README was a design handoff for a prototype that is not in this repo, web-player/README.md was the sv template, and deploy/README.md only covered development. Replace all three and document the production deploy: its prerequisites, what up.sh does and why nginx sits in front. The docs under docs/ still used the pre-monorepo project paths, Ardalis.Result instead of ErrorOr and the player.html test console that no longer exists.
This commit is contained in:
+23
-30
@@ -1,42 +1,35 @@
|
||||
# sv
|
||||
# web-player
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
||||
Musify's web client: SvelteKit 2 (`adapter-node`), Svelte 5 runes, Tailwind 4,
|
||||
TypeScript. Authentication is server-side OIDC against Zitadel (`openid-client`
|
||||
and `jose`) with an encrypted session cookie; the backend is called from `load`
|
||||
functions and form actions through a typed `openapi-fetch` client.
|
||||
|
||||
## Creating a project
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
## Development
|
||||
|
||||
```sh
|
||||
# create a new project
|
||||
npx sv create my-app
|
||||
npm install
|
||||
npm run dev # :5173
|
||||
```
|
||||
|
||||
To recreate this project with the same configuration:
|
||||
Configuration lives in `.env` (template in `.env.example`).
|
||||
`deploy/zitadel/provision.ps1` fills in the Zitadel values automatically, so the
|
||||
usual flow is to bring the stack up first (`./deploy/up.ps1`) and then run the
|
||||
dev server.
|
||||
|
||||
```sh
|
||||
# recreate this project
|
||||
npx sv@0.16.2 create --template minimal --types ts --add tailwindcss="plugins:none" --no-download-check --install npm web-player
|
||||
npm run check # svelte-check — must be clean before closing a change
|
||||
npm run lint # prettier --check . && eslint .
|
||||
npm run format # prettier --write .
|
||||
npm run build # production build into build/
|
||||
npm run gen:api # regenerate src/lib/api/schema.d.ts from the running API
|
||||
```
|
||||
|
||||
## Developing
|
||||
## Production
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
Built and run as a container by the production stack — see
|
||||
[../deploy/README.md](../deploy/README.md). There the same variables come from
|
||||
`deploy/.env.prod` through compose instead of from `.env`.
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
||||
Conventions and the design system are documented in [CLAUDE.md](CLAUDE.md) and
|
||||
in the `musify-web` skill.
|
||||
|
||||
Reference in New Issue
Block a user