A comprehensive online HSK (HΓ nyΗ ShuΗpΓng KΗoshΓ¬) test platform built with Next.js, TypeScript, Tailwind CSS, and shadcn/ui. This system provides authentic Chinese language proficiency testing for all HSK levels (1-6).
- Multi-Level Support: Complete HSK tests for levels 1-6
- Authentic Test Format:
- Levels 1-2: Listening + Reading sections
- Levels 3-6: Listening + Reading + Writing sections
- Interactive Components:
- Audio playback for listening comprehension (max 2 plays)
- Multiple choice questions for listening/reading
- Writing prompts with word count validation
- Real-time Timer: Automatic test submission when time expires
- Instant Results: Detailed scoring and performance analysis
- Test Management: Create, edit, delete, and manage HSK tests
- Question Bank: CRUD operations for all question types
- Analytics Dashboard: Test statistics and performance metrics
- Level Configuration: Manage HSK level settings and requirements
- Responsive Design: Works on desktop, tablet, and mobile devices
- TypeScript: Full type safety and better development experience
- State Management: Zustand for efficient state handling
- Modern UI: shadcn/ui components with Tailwind CSS
- Vercel Ready: Optimized for deployment to Vercel
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Zustand
- Icons: Lucide React
- Deployment: Vercel-ready
- Listening: 20 questions (20 minutes)
- Reading: 20 questions (40 minutes)
- Vocabulary: 150-300 words
- Passing Score: 60%
- Listening: 40 questions (35-30 minutes)
- Reading: 30-20 questions (60-40 minutes)
- Writing: 10-15 questions (60-25 minutes)
- Vocabulary: 600-1200 words
- Passing Score: 60%
- Listening: 45-50 questions (30-35 minutes)
- Reading: 45-50 questions (45-50 minutes)
- Writing: 10 questions (40-45 minutes)
- Vocabulary: 2500-5000+ words
- Passing Score: 60%
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd hsk-exam
-
Install dependencies
npm install
-
Run development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
npm run build
npm startsrc/
βββ app/ # Next.js app router
β βββ admin/ # Admin dashboard
β βββ test/[level]/ # Dynamic test routes
β βββ page.tsx # Home page
βββ components/
β βββ admin/ # Admin components
β βββ hsk/ # HSK test components
β βββ ui/ # shadcn/ui components
βββ data/ # Test data and configurations
βββ hooks/ # Custom React hooks
βββ store/ # Zustand stores
βββ types/ # TypeScript type definitions
- Visit the home page
- Select your desired HSK level (1-6)
- Review test information and click "Start Test"
- Complete each section within the time limit
- Submit and view your results
- Navigate to
/admin - Use the dashboard to:
- View test statistics
- Manage test content
- Add/edit questions
- Monitor test performance
- Audio player with play/pause controls
- Limited replay functionality (max 2 times)
- Multiple choice answers
- Progress tracking
- Text passages for comprehension
- Vocabulary reference sections
- Multiple choice format
- Context-based questions
- Structured prompts
- Word count validation
- Required keyword integration
- Rubric-based scoring
- Automatic Scoring: Instant results for listening/reading
- Manual Review: Writing sections require admin evaluation
- Detailed Breakdown: Section-wise performance analysis
- Pass/Fail Status: Based on 60% threshold
- Recommendations: Personalized improvement suggestions
- Access admin dashboard at
/admin - Navigate to "Questions" tab
- Select HSK level
- Click "Add Question"
- Fill in question details and save
Update configurations in src/data/hsktests.ts:
- Test duration limits
- Question counts per section
- Passing score requirements
- Level configurations
- Connect your repository to Vercel
- Configure build settings:
- Build Command:
npm run build - Output Directory:
.next
- Build Command:
- Deploy automatically on push to main branch
No environment variables required for basic setup. Add as needed for:
- Database connections
- Authentication services
- External API integrations
- Modify Tailwind configuration in
tailwind.config.js - Update component styles in respective component files
- Customize color schemes in
globals.css
- Update
HSKLeveltype insrc/types/hsk.ts - Add configuration in
HSK_LEVEL_CONFIGS - Create test data following existing patterns
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For questions, issues, or contributions, please:
- Open an issue on GitHub
- Check existing documentation
- Review the code structure for implementation details
Note: This system includes sample test data for demonstration. For production use, replace with authentic HSK test content and implement proper audio file hosting.