MCPcopy Index your code
hub / github.com/Swaggermuffin64/VIM_GYM

github.com/Swaggermuffin64/VIM_GYM @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
399 symbols 881 edges 65 files 33 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

VIM_GYM

Competitive vim motion racing. Practice alone or race others in real time.

Play now at vimgym.app

Features

  • Real-time multiplayer racing via WebSocket
  • Vim navigation and deletion tasks
  • Solo practice mode
  • Quick match and private rooms

Tech Stack

  • Frontend: React 19, Vite, CodeMirror 6 with @replit/codemirror-vim
  • Backend (game server): Fastify, Socket.IO, deployed on Fly.io
  • Matchmaking: Node.js, WebSocket (ws), deployed on Fly.io

Local Development

Prerequisites

  • Node.js 20+

Environment Variables

Each service needs its own .env file:

frontend/.env

VITE_BACKEND_URL=http://localhost:3001
VITE_MATCHMAKING_URL=ws://localhost:3002

backend/.env

MATCH_TOKEN_SECRET=any-shared-secret-for-dev

matchmaking/.env

MATCH_TOKEN_SECRET=any-shared-secret-for-dev
GAME_SERVER_URL=http://localhost:3001

Running

Start each service in its own terminal:

# Frontend (localhost:3000)
cd frontend && npm install && npm run dev

# Backend (localhost:3001)
cd backend && npm install && npm run dev

# Matchmaking (localhost:3002)
cd matchmaking && npm install && npm run dev

Solo practice works with just the frontend and matchmaking server. Matchmaking is only needed for quick match multiplayer.

Deployment

Both the backend and matchmaking services deploy to Fly.io via GitHub Actions on push to main. See .github/workflows/ for details.

License

This project is licensed under the GNU Affero General Public License v3.0.

Extension points exported contracts — how you extend this code

RateLimitEntry (Interface)
* Simple Rate Limiter for Matchmaking WebSocket * * Tracks requests per connection and blocks excessive usage.
matchmaking/src/rateLimit.ts
ImportMetaEnv (Interface)
(no doc)
frontend/src/vite-env.d.ts
Position (Interface)
(no doc)
backend/types.ts
RateLimitConfig (Interface)
(no doc)
backend/rateLimit/socketRateLimiter.ts
MatchTokenPayload (Interface)
(no doc)
backend/auth/auth.ts
ValidationResult (Interface)
(no doc)
backend/validation/inputValidation.ts
vimCursorState (Interface)
(no doc)
backend/multiplayer/vimGraph.ts
TestResult (Interface)
(no doc)
matchmaking/scripts/smoke-test.ts

Core symbols most depended-on inside this repo

push
called by 88
backend/multiplayer/vimGraph.ts
send
called by 27
matchmaking/src/matchmaker.ts
getLineFromOffset
called by 15
backend/multiplayer/graphInfra.ts
resolveKeyOffset
called by 13
backend/multiplayer/graphInfra.ts
v
called by 11
matchmaking/scripts/full-game-test.ts
assert
called by 10
matchmaking/scripts/smoke-test.ts
formatKeyLabel
called by 9
frontend/src/utils/keyFormatting.ts
send
called by 9
matchmaking/src/index.ts

Shape

Function 242
Interface 74
Method 65
Class 18

Languages

TypeScript100%

Modules by API surface

backend/multiplayer/vimGraph.ts46 symbols
backend/multiplayer/roomManager.ts26 symbols
matchmaking/scripts/full-game-test.ts20 symbols
backend/tasks.ts15 symbols
matchmaking/src/matchmaker.ts14 symbols
matchmaking/scripts/smoke-test.ts14 symbols
backend/scripts/generateSnippets.ts14 symbols
frontend/src/pages/practice.tsx13 symbols
frontend/src/components/Lobby.tsx12 symbols
frontend/src/extensions/targetHighlight.ts11 symbols
frontend/src/components/LeaderboardTable.tsx11 symbols
backend/rateLimit/socketRateLimiter.ts11 symbols

Datastores touched

vimracingDatabase · 1 repos

For agents

$ claude mcp add VIM_GYM \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact