A specialized typing practice platform designed for programmers to master real Java code through Data Structures and Algorithms snippets.
- Real Java DSA Code: Practice typing authentic algorithms including Binary Search, Sorting, Trees, and more
- Syntax Highlighting: Beautiful Java code display with Prism.js
- Real-time Metrics: Live WPM, accuracy, and time tracking
- Character Validation: Precise character-by-character comparison
- Performance Ratings: Get rated on your typing speed and accuracy
- Responsive Design: Works perfectly on desktop and mobile
- Dark Mode: Automatic theme switching support
- Node.js 18+
- pnpm (recommended) or npm
- Clone the repository:
git clone <repository-url>
cd typecode
- Install dependencies:
pnpm install
- Run the development server:
pnpm dev
- Open http://localhost:3000 in your browser
- Framework: Next.js 15.5.3 with App Router
- Language: TypeScript
- Styling: TailwindCSS 4.x
- State Management: Zustand
- Syntax Highlighting: Prism.js
- Build Tool: Turbopack
- Package Manager: pnpm
The app includes 10 carefully selected Java DSA algorithms:
- Searching: Binary Search
- Sorting: Bubble Sort, Quick Sort, Merge Sort
- Trees: DFS Binary Tree, BFS Binary Tree
- Recursion: Fibonacci (Recursive)
- Arrays: Two Sum, Reverse Linked List
- Strings: Valid Parentheses
- Start: Visit the app and a random Java algorithm will load
- Type: Click in the typing area and start typing the code exactly as shown
- Track: Watch your real-time metrics (WPM, accuracy, time)
- Complete: Finish typing to see your final results and performance rating
- Practice: Click "New Snippet" to try another algorithm
Ctrl+R
: Reset current sessionCtrl+A
: Select all text in typing area
- WPM (Words Per Minute): Based on 5 characters = 1 word
- Accuracy: Percentage of correctly typed characters
- Time: Session duration from first keystroke to completion
- Ratings: Performance ratings from Beginner to Excellent
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm type-check # Run TypeScript checks
src/
├── app/ # Next.js App Router pages
├── components/ # React components
│ ├── CodeDisplay.tsx # Syntax highlighted code display
│ ├── TypingArea.tsx # Interactive typing interface
│ ├── MetricsDisplay.tsx # Real-time metrics dashboard
│ └── Controls.tsx # Snippet controls (New/Reset)
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── data/ # Static data (snippets.json)
The app is optimized for deployment on Vercel:
pnpm build # Ensure production build works
Deploy to Vercel:
- Connect your repository to Vercel
- Vercel will automatically detect Next.js and use the correct build settings
- The app will be available at your Vercel domain
typecode focuses on:
- Authenticity: Real programming code, not random text
- Precision: Exact character matching including spaces and formatting
- Feedback: Immediate visual and metric feedback
- Simplicity: Clean, distraction-free interface
- Performance: Fast loading and smooth interactions
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or feedback, please open an issue on GitHub.
typecode - Master real Java code through typing practice. Built with ❤️ for programmers.