Update README

This commit is contained in:
zuma 2025-04-12 16:20:39 +02:00
parent 160617af60
commit 37771e852a

View file

@ -1,38 +1,39 @@
# sv
# Brawlset
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
Le brawlset est un mode de jeu [Magic The Gathering](https://magic.wizards.com/en). Cette application web permet de rentrer ses propres decks et d'avoir des statistiques sur l'utilisation des cartes à la manière de [EDHREC](https://edhrec.com/).
## Creating a project
Une version en ligne est accessible [ici](https://brawlset-beta.shenanigans.cc).
If you're seeing this, you've probably already done this step. Congrats!
# Compilation
```bash
# create a new project in the current directory
npx sv create
# create a new project in my-app
npx sv create my-app
Pour développer, vous devez compiler et lancer une instance de pocketbase custom comme ceci :
```
cd backend
go build -o custom_pocketbase *.go
GO_ENV=dev ./custom_pocketbase serve
```
## Developing
Vous pouvez accéder à l'application pocketbase à l'adresse `http://localhost:8090` mais toutes les requêtes qui ne sont pas de l'api ou du dashboard pockerbase seront renvoyées vers `http://localhost:5173` afin de pouvoir éditer l'application svelte en mode dev. Vous devez donc lancer une instance de sveltekit en mode dev :
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
cd frontend
bun install
bun run dev
```
## Building
# Production
To create a production version of your app:
Pour déployer l'application je recommande d'utiliser l'image docker `git.shenanigans.cc/globuzma/brawlset:latest`, n'oubliez pas de monter un volume pour `/usr/src/app/pb_data` afin d'avoir de la persistence de données et de forward sur le port `8090`.
```bash
npm run build
Docker compose :
```
services:
brawlset:
image: git.shenanigans.cc/globuzma/brawlset:latest
container_name: brawlset
ports:
- 8090:8090
volumes:
- ${PWD}/pb_data:/usr/src/app/pb_data
restart: unless-stopped
```
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.