# Hattrick Lineup Assistant > Free, privacy-first web application for Hattrick football managers featuring an interactive pitch lineup builder, real-time 7-sector team ratings engine, Poisson-based match predictor, formation comparator, specialty synergy analyzer, squad audit, and staff/training advisors. ## Overview - Website: https://hattrick-lineup.vercel.app - Code Repository: https://github.com/rberet/hattrick-lineup - Author: Adi Glibanović - Redberet (https://rberet.com) - Organization: Ariona RB (https://ariona.tech) - Location & Year: 2026 - Lukavac, Bosnia and Herzegovina - Contact Email: rberet@rberet.com - License: MIT (Free and Open Source) - Technology: Next.js 16 (App Router), TypeScript, Tailwind CSS, Zustand (client-side localStorage persistence) - Privacy: 100% client-side execution; no cookies, no tracking, no backend server storage. ## Key Capabilities ### 1. Interactive Pitch Lineup Builder - Visual football pitch with drag-and-drop or click-to-assign player slots. - Supports 10 standard Hattrick formations: 3-5-2, 2-5-3, 3-4-3, 4-4-2, 4-3-3, 4-5-1, 5-4-1, 5-3-2, 5-2-3, 5-5-0. - Individual player orders: Normal, Defensive, Offensive, Towards Middle, Towards Wing. - Auto-Optimize button solves the global bipartite matching problem to maximize team suitability. - Best Formation finder evaluates all 10 formations and selects the optimal squad arrangement. - Captaincy, Set-Pieces Taker, and Penalty Takers assignment. - Reserve bench tracking grouped by goalkeeper, defender, winger, inner midfielder, and forward. ### 2. Real-Time 7-Sector Team Ratings - Midfield (possession control) - Right Defense, Central Defense, Left Defense - Right Attack, Central Attack, Left Attack - Full integration of Hattrick engine mechanics: - Form (1–8 scale) & Stamina (1–9+ scale) non-linear curve factor adjustments. - Loyalty bonus (+0.5 skill) and Mother-club bonus (+0.5 skill). - Overcrowding midfield penalty (when playing 3 inner midfielders). - Coach Play Style: Defensive (+14% defense, -14% attack), Offensive (+8% attack, -8% defense), Neutral. - Tactical Modifiers: Counter-Attacks (-7% midfield), Attack on Wings (reallocates center attack to wings), Attack in the Middle (reallocates wing attack to center), Pressing, Long Shots, Play Creatively. - Injured and red-card suspended players automatically contribute 0.0 to ratings. ### 3. Poisson-based Match Predictor - Converts sector rating differentials into Expected Goals (xG) using a bivariate Poisson distribution model. - Calculates win, draw, and loss probabilities. - Displays most likely scorelines with goal heatmaps. - Accounts for home advantage (+0.5 midfield rating / +10-15% possession shift). ### 4. Formation Matrix Comparator - Side-by-side simulation comparing all 10 formations simultaneously for the current squad. - Breaks down Midfield, Defense, Attack, and Overall score per formation. - One-click application to immediately adopt the highest-rated formation. ### 5. Specialties Synergy Analyzer - Real-time tracking of on-field player specialties: Head (corner kick conversions and defenses), Quick (special event counter-attacks), Technical, Powerful, and Unpredictable. - Flags tactical vulnerabilities (e.g., zero Head specialists exposing team to corner kick goals). ### 6. Squad Audit & Retention Analyzer - Multi-factor retention score (0–100) evaluating age, wage-to-rating ratio, versatility, and current lineup usage. - Categorizes players into: Release Candidates, Under Review, and Core Squad. ### 7. Staff & Training Advisors - Staff Advisor: Concrete hiring plan maximizing the 4-slot staff limit within budget constraints (Assistant Coaches, Medics, Sports Psychologists, Form Coaches, Financial Directors, Tactical Assistants). - Training Advisor: Evaluates squad age and skill gaps to recommend optimal weekly training routines (Playmaking, Defending, Scoring, Crossing/Winger, Goalkeeping) with estimated weeks to level up. ## Data Import & Export - Formats supported: CHPP XML (official Hattrick API download), CSV (from Hattrick Organizer, Hattrick Youthclub, including localized exports), custom JSON backups. - Lineup Export: Generates BBCode tables formatted specifically for Hattrick community forums and match press releases. - Instant Sample Squad: Pre-loaded 18-player sample team for immediate evaluation. ## Additional Documentation - Full Reference Documentation: https://hattrick-lineup.vercel.app/llms-full.txt