mango-dashboard-svelte Svelte Themes

Mango Dashboard Svelte

Svelte-based dashboard for Mango v3 API. Auth, server management, console, file browser.

🄭 Mango Dashboard — Svelte Implementation

A modern, responsive dashboard for managing Minecraft servers via the Mango v3 API, built with Svelte + Vite.

Features

āœ… Auth System — Login/register with JWT
āœ… Server Management — List, start, stop, restart servers
āœ… Real-time Stats — CPU, memory, player count, uptime
āœ… Server Console — Send commands, view output (simulated)
āœ… Mock API — Full testing without the real backend
āœ… Responsive Design — Dark mode, clean UI

Tech Stack

  • Svelte 4 — Reactive, lightweight UI
  • Vite — Fast dev server & build
  • TypeScript — Type-safe stores & components
  • Express.js — Mock API server
  • Tailwind-inspired CSS — Custom dark theme

Getting Started

Run Everything Together

npm install
npm run dev:full

This starts:

  • šŸŽØ Vite dev server on http://localhost:5173
  • šŸ”Œ Mock API on http://localhost:5174

Or Separately

# Terminal 1: Mock API
npm run dev:mock

# Terminal 2: Dev server
npm run dev

Test Credentials

Email: [email protected]
Password: password123

Mock servers will load automatically. You can start/stop/restart them in the UI.

Project Structure

src/
  ā”œā”€ā”€ App.svelte           # Main layout & routing
  ā”œā”€ā”€ pages/
  │   ā”œā”€ā”€ Login.svelte     # Auth (login & register)
  │   ā”œā”€ā”€ ServerList.svelte # Server grid
  │   └── ServerDetail.svelte # Console, stats, controls
  ā”œā”€ā”€ stores/
  │   ā”œā”€ā”€ auth.ts          # Auth state & API calls
  │   └── servers.ts       # Server state & API calls
  ā”œā”€ā”€ app.css              # Global styles & dark theme
  └── main.ts              # Entry point

mock-api.ts                 # Mock backend (Express)

API Endpoints (Mock)

All authenticated requests need Authorization: Bearer <email>

Auth

  • POST /mock/auth/login — Login
  • POST /mock/auth/register — Register

Servers

  • GET /mock/servers — List all
  • GET /mock/servers/:id — Get one
  • POST /mock/servers/:id/start — Start
  • POST /mock/servers/:id/stop — Stop
  • POST /mock/servers/:id/restart — Restart

Next Steps (When Connecting to Real API)

  1. Update src/stores/auth.ts — Change base URL from localhost:5174 to real API
  2. Update src/stores/servers.ts — Same
  3. Add WebSocket support for console & live events
  4. Implement file manager (browse/upload/download)
  5. Add admin panel (user management)

Building for Production

npm run build
npm run preview

Outputs to dist/ — ready to deploy!


Built with ā¤ļø in Svelte | Mango v3 API Docs

Top categories

Loading Svelte Themes