A real-time typing race application built with SolidJS and Convex.
- Frontend: SolidJS + Vite + TailwindCSS v4 + DaisyUI
- Backend: Convex (serverless backend with real-time sync)
- Authentication: Discord OAuth + JWT + Guest login
- Database: Convex real-time database
- Code Quality: Biome (linting + formatting) + Husky pre-commit hooks
- Testing: Playwright for E2E testing
- 🏃♂️ Real-time multiplayer typing races
- 🔐 Discord OAuth authentication + Guest mode
- 📊 Typing analytics and performance tracking
- ⚡ Real-time synchronization between players
- 🎨 Modern UI with dark/light themes
- 📱 Responsive design
- Node.js 22.19.0 (see
package.jsonengines) - Bun package manager (recommended) or npm
-
Clone the repository
git clone <repo-url> cd didrace
-
Install dependencies
bun install # or npm install -
Set up environment variables
Create a
.env.localfile:# Convex Configuration VITE_CONVEX_URL=http://127.0.0.1:3210 CONVEX_DEPLOYMENT= # Set automatically by npx convex dev # Authentication AUTH_SECRET=your_jwt_secret_key # Discord OAuth (optional) DISCORD_CLIENT_ID=your_discord_client_id DISCORD_CLIENT_SECRET=your_discord_client_secret
-
Start the development servers
bun run dev # or npm run devThis starts both Convex backend (port 3210) and Vite frontend (port 5173). Convex dashboard will be available at http://127.0.0.1:6790
-
Initialize the database
Visit
http://localhost:5173and log in as guest. If no quotes are found, click "Initialize Quotes Database" to populate sample quotes.
bun run dev- Start both Convex and Vite dev serversbun run dev:ui- Start only the frontend dev serverbun run dev:convex- Start only the Convex backend
bun run lint- Run Biome lintingbun run lint:fix- Run Biome linting with auto-fixbun run format- Format code with Biome
bun run test- Run Playwright testsbun run test:ui- Run Playwright tests with UI
bun run build- Build the frontend for productionbun run build:convex- Deploy Convex functions
- Go to Discord Developer Portal
- Create a new application or use existing one
- In OAuth2 settings, add redirect URI:
http://localhost:5173/api/discord - Copy Client ID and Client Secret to your
.envand.env.localfiles
src/
├── components/ # Reusable UI components
├── routes/ # Page components and routing
├── auth/ # Authentication utilities
├── data/ # Static data (quotes)
├── domain/ # Business logic (Convex-based)
├── utils/ # Utility functions
└── convex-solid.ts # SolidJS-Convex integration
convex/
├── schema.ts # Database schema
├── auth.ts # Authentication helpers
├── players.ts # Player management
├── races.ts # Race management
├── quotes.ts # Quotes management
└── analytics.ts # Analytics queries
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request