thehub-design-system

Senior PHP/Frontend engineer for TheHUB - Swedish cycling competition platform on Uppsala WebHotell. Use when JALLE asks about TheHUB development, GravitySeries, cycling events, PHP design patterns, mobile-first layouts, or component styling.

16 stars

Best use case

thehub-design-system is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Senior PHP/Frontend engineer for TheHUB - Swedish cycling competition platform on Uppsala WebHotell. Use when JALLE asks about TheHUB development, GravitySeries, cycling events, PHP design patterns, mobile-first layouts, or component styling.

Teams using thehub-design-system should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/thehub-design-system/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/thehub-design-system/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/thehub-design-system/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How thehub-design-system Compares

Feature / Agentthehub-design-systemStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Senior PHP/Frontend engineer for TheHUB - Swedish cycling competition platform on Uppsala WebHotell. Use when JALLE asks about TheHUB development, GravitySeries, cycling events, PHP design patterns, mobile-first layouts, or component styling.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# TheHUB Development System

> **VIKTIGT:** Läs alltid CLAUDE.md och CLAUDE-CSS.md i projektets root FÖRE all utveckling.

## Projektöversikt

**Platform:** PHP 8.x / MySQL på Uppsala WebHotell  
**Domain:** thehub.gravityseries.se  
**Användare:** 3,000+ licensierade cyklister, arrangörer, klubbar  
**Version:** 1.0.x (inga versionsprefix!)

---

## KRITISKA DOKUMENT (Single Source of Truth)

| Fil | Syfte | Läs ALLTID |
|-----|-------|------------|
| `CLAUDE.md` | Utvecklingsregler, sidmallar, DB-schema | Före all kod |
| `CLAUDE-CSS.md` | CSS-tokens, breakpoints, färger | Före all styling |
| `.claude/rules/page-routing.md` | URL -> fil-mappning | Före sidredigering |

---

## STRIKTA FORBUD

### 1. Inga versionsprefix
```php
// FEL
HUB_V3_ROOT, HUB_V2_URL, 'v3/pages/event.php'

// RATT
HUB_ROOT, HUB_URL, 'pages/event.php'
```

### 2. Inga emojis i kod
```php
// FEL
$icon = 'emoji';

// RATT
<i data-lucide="flag"></i>
```

### 3. Inga hardkodade varden
```css
/* FEL */
padding: 16px;
color: #61CE70;

/* RATT */
padding: var(--space-md);
color: var(--color-accent);
```

### 4. Fråga innan ny CSS
Skapa ALDRIG ny CSS utan att fråga först.

---

## CSS-SYSTEM

### Laddningsordning
1. reset.css
2. tokens.css ← Design tokens
3. theme.css ← Dark/Light mode
4. layout.css
5. components.css
6. tables.css
7. pages/{page}.css ← Sidspecifik

### Spacing Tokens (OBLIGATORISKA)
```css
--space-2xs: 4px;
--space-xs: 8px;
--space-sm: 12px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
--space-2xl: 48px;
--space-3xl: 64px;
```

### Radius Tokens
```css
--radius-sm: 6px;   /* Mobil: 0 */
--radius-md: 10px;  /* Mobil: 0 */
--radius-lg: 14px;  /* Mobil: 0 */
--radius-full: 9999px;
```

### Färg-tokens (Dark Mode default)
```css
--color-bg-page: #0b131e;
--color-bg-card: #0e1621;
--color-text-primary: #f8f2f0;
--color-text-secondary: #c7cfdd;
--color-accent: #37d4d6;
--color-success: #10b981;
--color-warning: #fbbf24;
--color-error: #ef4444;
```

### Serie-färger
```css
--series-enduro: #FFE009;
--series-downhill: #FF6B35;
--series-xc: #2E7D32;
--series-ges: #EF761F;
--series-ggs: #8A9A5B;
```

---

## Breakpoints

| Namn | Range | Beskrivning |
|------|-------|-------------|
| Mobile Portrait | 0-599px | Smal mobil |
| Mobile Landscape | 600-767px | Mobil liggande |
| Tablet | 768-1023px | Surfplatta |
| Desktop | 1024px+ | Desktop |

### Edge-to-edge på mobil
```css
@media (max-width: 767px) {
  .card {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0 !important;
    width: calc(100% + 32px);
  }
}
```

---

## SIDMALLAR

### Publik sida
```php
<?php
require_once __DIR__ . '/config/database.php';
$pageTitle = 'Sidtitel';
include __DIR__ . '/includes/header.php';
?>

<main class="container">
    <!-- INNEHÅLL -->
</main>

<?php include __DIR__ . '/includes/footer.php'; ?>
```

### Admin-sida
```php
<?php
require_once __DIR__ . '/../config/database.php';
require_once __DIR__ . '/../includes/auth.php';
requireAdmin();

$pageTitle = 'Sidtitel';
include __DIR__ . '/../includes/admin-header.php';
?>

<div class="admin-content">
    <div class="page-header">
        <h1><?= $pageTitle ?></h1>
    </div>
</div>

<?php include __DIR__ . '/../includes/admin-footer.php'; ?>
```

---

## KOMPONENTER

### Card
```html
<div class="card">
    <div class="card-header"><h3>Titel</h3></div>
    <div class="card-body">Innehåll</div>
</div>
```

### Button
```html
<button class="btn btn-primary">Primär</button>
<button class="btn btn-secondary">Sekundär</button>
<button class="btn btn-danger">Danger</button>
```

### Alert
```html
<div class="alert alert-success">OK</div>
<div class="alert alert-warning">Varning</div>
<div class="alert alert-danger">Fel</div>
```

### Badge
```html
<span class="badge badge-success">Aktiv</span>
<span class="badge badge-warning">Väntande</span>
```

### Table
```html
<div class="table-responsive">
    <table class="table">
        <thead><tr><th>Kolumn</th></tr></thead>
        <tbody><tr><td>Data</td></tr></tbody>
    </table>
</div>
```

---

## DATABAS-MONSTER

### Prepared Statements (ALLTID)
```php
$stmt = $pdo->prepare("SELECT * FROM riders WHERE id = ?");
$stmt->execute([$id]);
$rider = $stmt->fetch();
```

### Series-koppling (VIKTIGT!)
```php
// FEL - missar events i series_events
JOIN series s ON e.series_id = s.id

// RATT - anvand series_events (many-to-many)
JOIN series_events se ON se.event_id = e.id
JOIN series s ON se.series_id = s.id
```

### Output-sanitering
```php
echo htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
```

---

## PROJEKTSTRUKTUR

```
thehub/
├── CLAUDE.md           # Utvecklingsregler
├── CLAUDE-CSS.md       # CSS-system
├── config/database.php
├── includes/
│   ├── header.php
│   ├── footer.php
│   ├── layout-header.php   # LAST
│   └── layout-footer.php   # LAST
├── components/
│   ├── sidebar.php         # LAST
│   └── header.php          # LAST
├── assets/css/
│   ├── tokens.css          # LAST
│   ├── theme.css           # LAST
│   ├── components.css      # LAST
│   └── pages/*.css
├── pages/              # Publika sidor
├── admin/              # Admin-sidor
├── api/                # API-endpoints
└── Tools/migrations/   # DB-migrationer
```

---

## VERKTYG

### Migrationer
- **Plats:** `/Tools/migrations/` (ENDAST där!)
- **Admin:** `/admin/migrations.php`
- **Format:** `NNN_beskrivande_namn.sql`

### Nya verktyg
- Länka ALLTID från `/admin/tools.php`
- Placera under rätt sektion

---

## CHECKLISTA VID KODANDRING

1. [ ] Läste CLAUDE.md?
2. [ ] Läste CLAUDE-CSS.md?
3. [ ] Använder CSS-variabler (inga hårdkodade värden)?
4. [ ] Testat på mobil (320px)?
5. [ ] Testat i dark mode?
6. [ ] Prepared statements för databas?
7. [ ] Inga versionsprefix?
8. [ ] Inga emojis?

---

## SVENSK TERMINOLOGI

| Engelska | Svenska |
|----------|---------|
| Event | Tävling |
| Registration | Anmälan |
| Results | Resultat |
| Rider | Åkare |
| Club | Klubb |
| Series | Serie |
| Points | Poäng |
| Class | Klass |

---

## RESPONS-FORMAT

### Kod-svar ska vara:
- Kompletta (copy-paste ready)
- Med svenska labels i UI
- Utan "..." eller ofullstandiga delar
- Max 1 fil per svar om inte annat begars

### Format:
```
filnamn.php
[KOMPLETT KOD]

Placera i: /path/to/file
```

Related Skills

ui-ux-design

16
from diegosouzapw/awesome-omni-skill

UI/UX design reference database. 50+ styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

ui-design

16
from diegosouzapw/awesome-omni-skill

Opinionated constraints for building better interfaces with agents. Use when building UI components, implementing animations, designing layouts, reviewing frontend accessibility, or working with Tailwind CSS, motion/react, or accessible primitives like Radix/Base UI.

touchdesigner-api-lookup

16
from diegosouzapw/awesome-omni-skill

Query local TouchDesigner API documentation and class references. Use this skill when the user asks about specific TouchDesigner operators, Python classes, parameters, or methods.

tools-ui-frontend-design

16
from diegosouzapw/awesome-omni-skill

Create distinctive, production-grade frontend interfaces grounded in this repo's design system. Use when asked to build web components, pages, or applications. Combines bold creative direction with token-constrained implementation.

systems-programming-rust-project

16
from diegosouzapw/awesome-omni-skill

You are a Rust project architecture expert specializing in scaffolding production-ready Rust applications. Generate complete project structures with cargo tooling, proper module organization, testing

systematic-debugging

16
from diegosouzapw/awesome-omni-skill

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

system-design

16
from diegosouzapw/awesome-omni-skill

Comprehensive system design skill for creating professional software architecture specifications. Use this skill when asked to design systems (e.g., "Design a chat application", "Design an e-commerce platform", "Create system architecture for X"). Generates complete technical specifications with architecture diagrams, database schemas, API designs, scalability plans, security considerations, and deployment strategies. Creates organized spec folders with all documentation following professional software engineering standards, from high-level overview down to detailed implementation specifications.

system-design-patterns

16
from diegosouzapw/awesome-omni-skill

System design patterns for scalability, reliability, and performance. Use when: (1) designing distributed systems, (2) planning for scale, (3) making architecture decisions, (4) evaluating trade-offs.

synthetic-event-system-internals

16
from diegosouzapw/awesome-omni-skill

Leverage React's event delegation system for optimization and custom event behavior.

premium-ui-systems

16
from diegosouzapw/awesome-omni-skill

Comprehensive system for building exceptional, production-ready UIs that avoid generic "vibe-coded" aesthetics. Use when building any web interface (dashboards, landing pages, SaaS products, React components, HTML/CSS layouts) to create distinctive, systematically premium designs. Covers hierarchy-first methodology, systematic design tokens, glassmorphism patterns, component libraries, creative direction, and avoiding AI-generated template aesthetics. Applies to Next.js, React, HTML/CSS, Tailwind, or any frontend stack.

preferences-distributed-systems

16
from diegosouzapw/awesome-omni-skill

Distributed systems patterns including consistency models, consensus, and fault tolerance. Load when designing or debugging distributed architectures.

mobile-first-design-rules

16
from diegosouzapw/awesome-omni-skill

Focuses on rules and best practices for mobile-first design and responsive typography using tailwind.