Gehe zu supabase.com, erstelle ein Konto und ein neues Projekt. Unter Project Settings → API findest du URL und anon Key.
SCHRITT 2 — TABELLEN ANLEGEN
Im Supabase SQL Editor ausführen:
-- Tabellen anlegen
create table if not exists cards (
id uuid primary key default gen_random_uuid(),
user_id uuid references auth.users not null,
name text, set_code text, set_name text,
collector_number text, foil text, rarity text,
quantity integer default 1, manabox_id text,
scryfall_id text, purchase_price text, currency text,
misprint boolean default false, altered boolean default false,
condition text, language text,
mana_value integer, colors text[], type_line text,
color_identity text[], legal_commander text,
created_at timestamptz default now()
);
-- Falls die Tabelle schon existiert: fehlende Spalten nachziehen
alter table cards add column if not exists mana_value integer;
alter table cards add column if not exists colors text[];
alter table cards add column if not exists type_line text;
alter table cards add column if not exists color_identity text[];
alter table cards add column if not exists legal_commander text;
create table if not exists decks (
id uuid primary key default gen_random_uuid(),
user_id uuid references auth.users not null,
name text not null, description text, format text,
category_order text[],
created_at timestamptz default now()
);
-- Falls die Tabelle schon existiert: Spalte für sortierbare Kategorien nachziehen
alter table decks add column if not exists category_order text[];
create table if not exists deck_cards (
id uuid primary key default gen_random_uuid(),
user_id uuid references auth.users not null,
deck_id uuid references decks(id) on delete cascade,
card_id uuid references cards(id) on delete cascade,
category text default 'Sonstige',
quantity integer default 1,
created_at timestamptz default now()
);
-- Preisverlauf-Snapshots (für Wertentwicklung über Zeit)
create table if not exists price_snapshots (
id uuid primary key default gen_random_uuid(),
user_id uuid references auth.users not null,
snapshot_date date not null,
total_value numeric(10,2) not null,
card_count integer,
created_at timestamptz default now(),
unique(user_id, snapshot_date)
);
alter table price_snapshots enable row level security;
drop policy if exists "own snapshots" on price_snapshots;
create policy "own snapshots" on price_snapshots for all
using (auth.uid()=user_id) with check (auth.uid()=user_id);
-- Row Level Security aktivieren
alter table cards enable row level security;
alter table decks enable row level security;
alter table deck_cards enable row level security;
-- Alte Policies löschen (falls vorhanden) und neu anlegen
drop policy if exists "own cards" on cards;
drop policy if exists "own decks" on decks;
drop policy if exists "own deck_cards" on deck_cards;
create policy "own cards" on cards for all
using (auth.uid()=user_id) with check (auth.uid()=user_id);
create policy "own decks" on decks for all
using (auth.uid()=user_id) with check (auth.uid()=user_id);
create policy "own deck_cards" on deck_cards for all
using (auth.uid()=user_id) with check (auth.uid()=user_id);
Importiere eine CSV-Datei aus ManaBox oder einem anderen Tool.
🔍
Manawert:
Farben:enthält mindestens
Sammlung exportieren:
📊
Keine Daten verfügbar
Importiere zuerst Karten.
⚔️ Meine Decks
⚔️
Noch keine Decks
Erstelle dein erstes Deck und ordne deine Karten in Kategorien.
KARTEN DETAIL
NEUES DECK
KATEGORIE HINZUFÜGEN
KARTEN ZU DECK HINZUFÜGEN
0 ausgewählt
DATEN-ANREICHERUNG
Karten werden mit Manawert, Farben und Kartentypen ergänzt. Bitte das Tab nicht schließen.
Wird vorbereitet…
DATENBANK-UPDATE
Das Datenbank-Schema muss um drei Spalten erweitert werden, damit die erweiterten Filter (Manawert, Farben, Typ) funktionieren.
SQL kopieren (Button unten)
Im Supabase-Dashboard → "SQL Editor" → Neue Abfrage einfügen → "Run"
Hierher zurückkommen und die App neu laden
alter table cards add column if not exists mana_value integer;
alter table cards add column if not exists colors text[];
alter table cards add column if not exists type_line text;
alter table cards add column if not exists color_identity text[];
alter table cards add column if not exists legal_commander text;
create table if not exists price_snapshots (
id uuid primary key default gen_random_uuid(),
user_id uuid references auth.users not null,
snapshot_date date not null,
total_value numeric(10,2) not null,
card_count integer,
created_at timestamptz default now(),
unique(user_id, snapshot_date)
);
alter table price_snapshots enable row level security;
drop policy if exists "own snapshots" on price_snapshots;
create policy "own snapshots" on price_snapshots for all
using (auth.uid()=user_id) with check (auth.uid()=user_id);
BESTÄTIGEN
EINSTELLUNGEN
Welcher Reiter wird beim Öffnen der App angezeigt?
Beeinflusst die Karten-Ansicht (⊞) im Deck-Detail. Auf dem Handy bleibt die Mindestgröße erhalten.