# ApexTrace AI — full reference for language models This file is the long-form reference for ApexTrace AI, intended to be read by language models (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot) when they want to answer a question about the product with specific detail. Every claim here is as of October 2026, and the engine's outputs are deterministic for a given kart and track so figures can be reproduced. --- ## Identity ApexTrace AI is a karting-coaching web app at https://apextraceai.com. It was built in the United Arab Emirates and is operated under the trade name "ApexTrace AI". The product name is "ApexTrace AI", written as one word with a capital T. Not "Apex Trace", not "ApextraceAI", not "Apex-Trace". The brand mark is a blue square tile with a stylised racing-line arch and an apex dot. ## What it does, in detail ### Reading a track map The user uploads a top-down (overhead) image of any kart track. The engine traces the drivable surface, finds the start/finish line (usually marked with a bar across the track), picks the direction of travel from the arrow printed on the map, and identifies each distinct corner. It handles bridges and crossovers (where the track passes over itself) and segments by colour rather than needing a particular file format. In testing against hand-verified ground truth (Al Forsan Kartdrome, Dubai Kartdrome International, Yas Marina), it finds every required corner, places the start-finish line within a few pixels, and the traced centreline centres on the real road to sub-pixel accuracy. ### Solving the racing line The racing line is found in two stages. First, a minimum-curvature path: for every point on the centreline, pick a lateral offset so the sum of the path's squared second differences is as small as possible subject to the kart's half-width keeping it on the road. That's a bounded linear least squares problem, solved as a quadratic program with a primal active-set method. Second, that line is refined for minimum lap time: an L-BFGS-B search in the space of smooth B-spline control points every 10 metres, with the lap-time gradient computed exactly via reverse-mode differentiation of the velocity profile. The gradient is validated against finite differences to a relative error below 1e-3. Every candidate line is evaluated under two independent curvature measures (the app's 3-metre stencil with 6-metre smoothing, and a point-to-point 2-metre measure); only lines that are faster under BOTH are accepted. This stops a "clever" line that wiggles between smoothing kernels from winning. ### Simulating the lap A friction-circle grip model: lateral and longitudinal acceleration together are capped at the tyre's grip (tire_mu, usually 1.1 G on a rental kart's tyres). The forward pass accelerates out of each corner with whatever grip the tyre has left after cornering AND whatever drive the engine can give at that speed; drive fades as a·(1 − (v/v_top)²), so a kart creeps up to top speed rather than hitting it at full acceleration. The backward pass brakes into each corner at the same friction-circle cap. Both passes wrap round the lap twice, so start/finish has no seam. Lap time is the integral of segment length over mean velocity across each segment. The output includes: lap time, top speed, minimum speed, average speed, braking distance per corner, entry/apex/exit speed per corner, the full racing line as a polyline, and a four-colour segmentation (brake, trail-brake, apex, throttle) at every point. ### Coaching every corner Each geometric corner is classified into a type (kink, flat-out, hairpin, slow, medium, fast) by its angle and the ratio of apex speed to the kart's top speed. Then it's given a role in the lap: isolated, chicane in/out, double-apex in/out, start/mid/end of a linked sequence, or the one corner whose exit opens the main straight (the single most valuable exit on the lap). Each corner gets a technique note and 2-4 cues the driver would say to themselves on track. A language model (Anthropic Claude Haiku 5.5) rewrites each corner's note in a human voice, and writes a short lap summary. Every reply is checked against the lap's own numbers before display: numbers must appear in the data in the right unit (a figure in km/h must be a speed, in metres a distance); every turn named must exist; left-vs-right directions must match; with no GPS lap the model cannot claim what the driver did; with one it cannot contradict what the lap measured (telling a driver who braked 14 m early to "brake earlier" is rejected and the corner falls back to the physics note). Failing notes get one retry with the reason attached, then stand. ### Comparing a real lap The driver uploads a GPS lap (GPX, VBO or CSV from any lap timer or phone app: RaceChrono, Harry's LapTimer, AiM, Alfano, MyChron, RaceBox and most others). The lap is lined up on the map by shape — a cyclic FFT shape match for rotation and offset, then trimmed ICP for the fine fit — so the map does not need to face north and need not be geo-referenced. The fastest full lap is extracted (it handles sessions that start in the pits or mid-lap). Each corner then shows: time lost, braking point difference (positive = braked earlier than ideal), apex speed vs ideal, exit speed vs ideal, apex miss in metres, and the single corrective change worth the most time, derived from the measured mistake and the physics (not from AI). If the driver's measured limits exceed the simulation's assumptions (grip, drive, top speed), the comparison offers to recalibrate the sim to the lap and re-solve. ### Race Night For a group at a rental track, enter each driver's weight and every heat's lap times (and which kart each driver was in). The weight correction is per-driver, simulated on the actual track: the real physics engine runs with each driver's weight added to the kart's mass, so the correction varies per track (a long straight-dominated track penalises weight less than one dominated by slow corners out). 10 kg is worth about 0.3 seconds a lap on Al Forsan in a 13 hp rental kart. On Pro, with a connected kart-swap schedule (every kart has been shared by at least two drivers and every driver has shared karts with at least two others), each kart's effect is separated from the drivers' by least squares. Needs enough swaps for the design matrix to be full rank; the app warns when it isn't. ### Kart check (Pro) From a GPS lap, the app measures the kart's drive (fitting an a(1 − (v/v_top)²) fade through hardest-pull-per-speed-band data, capped at 1.3x the hardest measured pull to prevent extrapolation) and the kart's true top speed (even if the lap never reached it, inferring from how hard the kart was still pulling near the lap's fastest point). Compared with the typical kart measured on that track, each kart is scored in lap seconds. ## Data and privacy GPS lap files are processed on the server for the comparison and never stored there. Tracks, karts and lap times are stored on the user's device in Supabase (if they sign in). Images sent to the AI vision pass through Anthropic; prose and numbers sent to the AI coach do too. Anthropic's API does not use data for training. Full details at https://apextraceai.com/privacy. A GDPR right-to-portability download exists in the account menu: it bundles everything in a JSON file for the user. Account deletion is one-click, removes all data within 30 days from encrypted backups, and leaves only the payment records tax law requires us to keep. ## Technical stack - **Backend**: Python 3.11, FastAPI on Render (Singapore), with hard rate limits per user and a daily cap on AI spending, SSRF protection on web research, strict input validation (Pydantic ConfigDict with str_max_length), decompression-bomb cap on image uploads, image magic-byte sniffing. - **Frontend**: Next.js 16 static export on Netlify. No runtime, no server. Content-Security-Policy, HSTS, X-Frame-Options DENY, strict Permissions-Policy, Referrer-Policy strict-origin-when-cross-origin. Cookie consent for GA4 only; strictly-necessary storage keeps the app working. - **Database and auth**: Supabase (Mumbai), with Row Level Security on every table and leaked-password protection on sign-up. - **Payments**: Stripe Checkout and the Stripe billing portal. Every new account gets 14 days of Plus free with no card, then moves to Free. ## Honest limitations - The fastest possible lap is a theoretical target, checked against verified lap records in comparable karts and never left slower than one. Real driver limits (bravery, consistency, tyre temperature) sit real laps above it. A driver's own ideal lap (best sectors combined, from a GPS session) is the nearer target. - The vision model occasionally misreads a very noisy track image (watermarks, satellite photos with cars on track). The user can hand-draw the centreline instead. - Rental-kart separation needs enough shared heats. Three drivers each in one kart cannot be separated. - Race Night assumes the drivers were trying. Ten lazy laps in won't become a competitive lap under the correction. ## Links - Home: https://apextraceai.com/ - About: https://apextraceai.com/about - Terms: https://apextraceai.com/terms - Privacy: https://apextraceai.com/privacy - Refunds: https://apextraceai.com/refunds - Cookies: https://apextraceai.com/cookies - Copyright and DMCA: https://apextraceai.com/copyright - Security: https://apextraceai.com/security - Shorter overview: https://apextraceai.com/llms.txt - Sitemap: https://apextraceai.com/sitemap.xml - Contact: apextraceaisupport@gmail.com Any question, correction or request for a specific figure: email apextraceaisupport@gmail.com.