Initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# PokeShare
|
||||
|
||||
A French-language Pokémon TCG collection tracker and sharing app. Users search
|
||||
cards from the [TCGdex](https://tcgdex.dev) catalog, track their personal
|
||||
collection with Cardmarket price valuations, and share collections with friends.
|
||||
|
||||
## Stack
|
||||
|
||||
- [Astro](https://astro.build) (SSR, Node standalone adapter) — no UI framework
|
||||
- [Tailwind CSS v4](https://tailwindcss.com) + [basecoat-css](https://basecoatui.com)
|
||||
- [PocketBase](https://pocketbase.io) for database and authentication
|
||||
- [TCGdex API](https://api.tcgdex.net) (French locale) for card data, with an
|
||||
in-memory server-side cache (`src/lib/tcgdex-cache.ts`)
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Action |
|
||||
| ----------------- | -------------------------------------- |
|
||||
| `bun install` | Install dependencies |
|
||||
| `bun run dev` | Start dev server at `localhost:4321` |
|
||||
| `bun run build` | Build the production site to `./dist/` |
|
||||
| `bun run preview` | Preview the production build locally |
|
||||
|
||||
Production runs as a standalone Node server (`node dist/server/entry.mjs`),
|
||||
Node >= 22.12.
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ---------------- | -------------------------------------------- | ------------------------------------ |
|
||||
| `POCKETBASE_URL` | URL of the PocketBase backend (auth + data) | `https://pokeshare.namarusaja.me` |
|
||||
|
||||
Read at **runtime** (`process.env`), so the same Docker image can be deployed
|
||||
against different PocketBase instances. For local dev, copy `.env.example` to
|
||||
`.env`. `HOST` and `PORT` are also honored by the standalone server.
|
||||
|
||||
## Docker
|
||||
|
||||
```sh
|
||||
docker build -t pokeshare .
|
||||
docker run -p 4321:4321 -e POCKETBASE_URL=https://pb.example.com pokeshare
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
- `src/pages/` — routes (`/`, `/search`, `/mycards`, `/card/[id]`,
|
||||
`/series/[id]`, `/sets/[id]`, `/friends`, `/profile`) and JSON API endpoints
|
||||
under `src/pages/api/`
|
||||
- `src/middleware.ts` — per-request PocketBase client + `pb_auth` cookie auth
|
||||
- `src/lib/` — TCGdex cache, collection pricing helpers, type theming
|
||||
- `src/layouts/`, `src/components/` — base layout and nav
|
||||
Reference in New Issue
Block a user