Logo Lanfrica

nathanamoo-crypto/gpl-admin

Domaine:

digital infrastructure

Type de record:

software
Créateur:
nat
Hôte:
Ghana Premier League Fantasy — Admin Dashboard # GPL Admin Admin dashboard for the Ghana Premier League Fantasy app (GPLLive ecosystem). A production-ready React 19 + TypeScript admin client that talks to the existing Spring Boot backend (`/auth` + ROLE_ADMIN) — no CORS, JWT bearer auth, base URL `gpllivebackend.onrender.com`. > **Heads-up:** the "Predictions" admin page is wired to the backend's > `/predictions/*` endpoints. The leaderboard is live; the fixture endpoints > (`/predictions/fixtures`) currently return 500 on the backend and need fixing > server-side before fixtures render. ## Stack - React 19, TypeScript 6, Vite 8, Tailwind CSS 3 - React Router 7, TanStack Query, TanStack Table - React Hook Form + Zod, Axios, Framer Motion, Recharts - React Hot Toast, Lucide icons - ESLint 9 (flat config) + Prettier ## Run ```bash npm install npm run dev # localhost, proxies /api -> backend npm run build # tsc -b && vite build npm run lint npm run format ``` ### Environment | Variable | Default | Purpose | | ------------------- | ----------------------- | ------------------------------------------------------------------ | | `VITE_API_URL` | _(empty)_ | Empty → same-origin `/api`. Override for a standalone backend URL. | | `VITE_PROXY_TARGET` | `localhost` | Dev proxy target when `VITE_API_URL` is empty. | Copy `.env.example` → `.env.local` for overrides. Prod builds should set `VITE_API_URL` to `gpllivebackend.onrender.com` (dev-only proxy can't help in prod). ## Login - Route: `/login` - Credentials: the same account used in the mobile app — every admin has a normal account; the `role` column (USER/ADMIN) decides admin access. There is no separate admin sign-up (intentionally, to avoid a self-serve security hole). The first admins are promoted directly in the DB: `UPDATE users SET role = 'ADMIN' WHERE email = '...'`. - The …