A modern, comprehensive web-based system for skill assessment through interactive quizzes, advanced user management, and detailed performance reporting. Perfect for educational institutions, HR departments, and professional development.
|
|
- JWT-based Authentication - Secure token-based login system
- Role-based Access Control - Admin and user permissions
- Password Encryption - bcryptjs with salt rounds
- Input Validation - Comprehensive data validation
- Rate Limiting - API protection against abuse
- Timed Assessments - 5-minute skill-based quizzes
- Multiple Choice Questions - A, B, C, D format
- Difficulty Levels - Easy, Medium, Hard questions
- Real-time Scoring - Instant performance feedback
- Progress Tracking - Visual progress indicators
- Performance Dashboard - Comprehensive user analytics
- Skill Gap Analysis - Identify improvement areas
- Leaderboard System - Competitive performance tracking
- Historical Data - Track progress over time
- Export Reports - Download performance data
- User Management - Full CRUD operations
- Question Bank - Add, edit, organize questions
- Skill Categories - Create and manage skill sets
- System Reports - Platform usage analytics
- Bulk Operations - Efficient data management
- Node.js (v16+)
- MySQL (v8.0+)
- Redis (optional)
- Git
# Clone and setup everything
git clone https://github.com/shivambitm/SKILL_ASSESMENT.git
cd SKILL_ASSESMENT
npm install && cd backend && npm install && cd ..
Create backend/.env
:
NODE_ENV=development
PORT=5000
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRE=7d
# Database
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your-password
DB_NAME=skill_assessment
# Redis (optional)
REDIS_HOST=localhost
REDIS_PORT=6379
# CORS
CORS_ORIGIN=http://localhost:3000
# Start both frontend and backend
npm run dev:full
🎉 That's it! Visit:
- 💻 Frontend: http://localhost:5173
- 🗄 Backend API: http://localhost:5000
Role | Password | |
---|---|---|
👑 Admin | admin@example.com |
admin123 |
👤 User | user@example.com |
user123 |
🔐 Authentication Endpoints
POST /api/auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123",
"firstName": "John",
"lastName": "Doe"
}
POST /api/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}
GET /api/auth/me
Authorization: Bearer <token>
🎯 Quiz Endpoints
POST /api/quiz/start
Authorization: Bearer <token>
Content-Type: application/json
{
"skillId": 1
}
POST /api/quiz/answer
Authorization: Bearer <token>
Content-Type: application/json
{
"quizAttemptId": 1,
"questionId": 1,
"selectedAnswer": "A",
"timeTaken": 30
}
POST /api/quiz/complete
Authorization: Bearer <token>
Content-Type: application/json
{
"quizAttemptId": 1,
"timeTaken": 300
}
👑 Admin Endpoints
POST /api/skills
Authorization: Bearer <admin-token>
Content-Type: application/json
{
"name": "JavaScript",
"description": "JavaScript fundamentals",
"category": "Programming"
}
POST /api/questions
Authorization: Bearer <admin-token>
Content-Type: application/json
{
"skillId": 1,
"questionText": "What is JavaScript?",
"optionA": "Programming language",
"optionB": "Database",
"optionC": "Web server",
"optionD": "Operating system",
"correctAnswer": "A",
"difficulty": "easy",
"points": 1
}
🔒 Account Management Endpoints
POST /api/auth/google
Content-Type: application/json
{
"credential": "google-jwt-token",
"adminPasscode": "admin" // Optional for admin access
}
POST /api/auth/deactivate
Authorization: Bearer <token>
What it does: Deactivates account with 30-day deletion timer (Instagram/Facebook style)
POST /api/auth/reactivate
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}
GET /api/auth/admin/deactivated-users
Authorization: Bearer <admin-token>
POST /api/auth/admin/reactivate-user
Authorization: Bearer <admin-token>
Content-Type: application/json
{
"userId": 123
}
🎥 WebRTC Meeting Endpoints
POST /api/meeting/create
Authorization: Bearer <admin-token>
Content-Type: application/json
{
"meetingId": "ABC123"
}
POST /api/meeting/join
Authorization: Bearer <token>
Content-Type: application/json
{
"meetingId": "ABC123",
"userInfo": {
"name": "John Doe",
"email": "john@example.com"
}
}
Environment | Base URL | Swagger Docs |
---|---|---|
🚀 Production | https://api.skills.shivastra.in |
View Docs |
🛠️ Development | http://localhost:5000 |
View Docs |
# Login to get token
curl -X POST https://api.skills.shivastra.in/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "password123"
}'
# Response will contain: "token": "your-jwt-token"
# Example: Get your profile
curl -X GET https://api.skills.shivastra.in/api/auth/me \
-H "Authorization: Bearer your-jwt-token"
✅ Successful Response:
{
"success": true,
"message": "Operation successful",
"data": { /* your data */ }
}
❌ Error Response:
{
"success": false,
"message": "Error description",
"error": "Detailed error info"
}
- Import Collection: Use our Postman Collection
- Set Base URL:
https://api.skills.shivastra.in
- Add Auth Header:
Authorization: Bearer your-token
- Test Endpoints: Start with
/api/auth/login
- 📊 General APIs: 300 requests/minute
- 🔐 Auth APIs: 20 requests/minute
- 🚫 Blocked: 429 status code if exceeded
📊 View Database Structure
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
role ENUM('admin', 'user') DEFAULT 'user',
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE TABLE skills (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
description TEXT,
category VARCHAR(100),
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE TABLE questions (
id INT PRIMARY KEY AUTO_INCREMENT,
skill_id INT NOT NULL,
question_text TEXT NOT NULL,
option_a VARCHAR(500) NOT NULL,
option_b VARCHAR(500) NOT NULL,
option_c VARCHAR(500) NOT NULL,
option_d VARCHAR(500) NOT NULL,
correct_answer ENUM('A', 'B', 'C', 'D') NOT NULL,
difficulty ENUM('easy', 'medium', 'hard') DEFAULT 'easy',
points INT DEFAULT 1,
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (skill_id) REFERENCES skills(id) ON DELETE CASCADE
);
# Backend tests
cd backend && npm test
# Frontend tests
npm test
# Run all tests
npm run test:all
# For production performance (optional but recommended)
npm run optimize-db
What optimize-db
does:
- ✅ Enables WAL mode for better concurrency
- ✅ Adds 15+ performance indexes
- ✅ Optimizes SQLite settings for production
- ✅ Configures memory-mapped I/O
- ✅ Updates query statistics
cd backend
docker-compose up -d
---
## 🤝 **Contributing**
We welcome contributions from developers, educators, and HR professionals! Here's how you can help make this the **best skill assessment platform**:
### 🎯 **Ways to Contribute**
<table>
<tr>
<td width="33%">
#### 💻 **Code Contributions**
- 🐛 Bug fixes
- ✨ New features
- 🎨 UI/UX improvements
- ⚡ Performance optimizations
- 🧪 Test coverage
</td>
<td width="33%">
#### 📚 **Content & Documentation**
- 📝 Documentation improvements
- 🎓 Tutorial creation
- 🌍 Translations
- 📖 API documentation
- 💡 Feature suggestions
</td>
<td width="33%">
#### 🎯 **Domain Expertise**
- 📊 Question bank expansion
- 🏢 HR workflow insights
- 🎓 Educational best practices
- 📈 Analytics improvements
- 🔍 Skill assessment methods
</td>
</tr>
</table>
### 🚀 **Getting Started with Contributing**
#### 🐛 **Found a Bug? Here's How to Report It:**
**Option 1: Quick Bug Report**
1. 🔍 [Search existing issues](https://github.com/shivambitm/SKILL_ASSESMENT/issues) to avoid duplicates
2. 🐛 [Create a new issue](https://github.com/shivambitm/SKILL_ASSESMENT/issues/new) with:
- Clear bug description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots/error logs
- Environment details (OS, browser, Node version)
**Option 2: Fix the Bug Yourself (Recommended)**
```bash
# 1. Fork the repository on GitHub
# Click the "Fork" button on https://github.com/shivambitm/SKILL_ASSESMENT
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/SKILL_ASSESMENT.git
cd SKILL_ASSESMENT
# 3. Add upstream remote
git remote add upstream https://github.com/shivambitm/SKILL_ASSESMENT.git
# 4. Create a new branch for your bug fix
git checkout -b fix/bug-description
# Example: git checkout -b fix/login-validation-error
# 5. Make your changes
# Fix the bug, add tests, update documentation
# 6. Test your changes
npm test
npm run dev:full # Ensure everything works
# 7. Commit your changes
git add .
git commit -m "fix: resolve login validation error"
# 8. Push to your fork
git push origin fix/bug-description
# 9. Create a Pull Request
# Go to GitHub and click "New Pull Request"
# 1. Fork and clone (same as above)
# 2. Create a feature branch
git checkout -b feature/amazing-new-feature
# Example: git checkout -b feature/dark-mode-support
# 3. Develop your feature
# - Write clean, documented code
# - Follow existing code style
# - Add comprehensive tests
# - Update documentation
# 4. Keep your branch updated
git fetch upstream
git rebase upstream/main
# 5. Test thoroughly
npm test
npm run build
npm run dev:full
# 6. Commit with clear messages
git add .
git commit -m "feat: add dark mode support with theme switcher"
# 7. Push and create PR
git push origin feature/amazing-new-feature
⏰ We guarantee a response within 7 days!
- 🐛 Bug reports: Acknowledged within 2-3 days
- ✨ Feature requests: Reviewed within 5-7 days
- 🔄 Pull requests: Feedback within 3-5 days
- ❓ Questions: Answered within 1-2 days
fix/issue-description
- Bug fixesfeature/feature-name
- New featuresdocs/update-description
- Documentation updatesrefactor/component-name
- Code refactoringtest/test-description
- Adding testschore/task-description
- Maintenance tasks
- TypeScript: Use proper typing, avoid
any
- ESLint: Follow configured linting rules
- Prettier: Code formatting is enforced
- Comments: Document complex logic and APIs
- Testing: Minimum 80% code coverage for new features
type(scope): description
[optional body]
[optional footer]
Types: feat
, fix
, docs
, style
, refactor
, test
, chore
Examples:
feat(auth): add OAuth2 login support
fix(quiz): resolve timer not stopping on completion
docs(api): update authentication endpoints
- Be respectful and constructive in discussions
- Help newcomers and answer questions
- Provide detailed feedback in code reviews
- Follow our Code of Conduct
- Use inclusive language in all communications
All contributors will be:
- ⭐ Listed in our contributors section
- 🎖 Recognized in release notes
- 💼 Can showcase their contributions in portfolios
- 🌟 Invited to join our core team for significant contributions
- 🔐 JWT Authentication - Secure token-based system
- 🛡 Password Hashing - bcryptjs with salt rounds
- ✅ Input Validation - Joi schema validation
- 🌐 CORS Protection - Configurable origins
- 🛡 Security Headers - Helmet middleware
- ⚡ Rate Limiting - Request throttling
- 🔒 SQL Injection Prevention - Parameterized queries
- WAL Mode - Write-Ahead Logging for 5x faster concurrent writes
- Memory-mapped I/O - 268MB mmap for 2x faster reads
- Optimized Cache - 10MB cache size for frequently accessed data
- Strategic Indexing - 15+ performance indexes on critical queries
- Query Analysis - Automatic statistics collection for query optimization
Operation | Improvement | Index Used |
---|---|---|
User Lookups | 90% faster | idx_users_email , idx_users_is_active |
Leaderboards | 80% faster | idx_quiz_leaderboard |
Quiz History | 85% faster | idx_user_quiz_history |
Question Filtering | 75% faster | idx_questions_skill_active |
Deactivated Users | 95% faster | idx_users_deactivated_at |
- ⚡ Redis Caching - Caching for reports and skill data
- 🔍 Query Optimization - Efficient database queries with proper joins
- 📄 Pagination - All list endpoints support pagination
- 🚦 Rate Limiting - API rate limiting to prevent abuse
- 🎯 Lazy Loading - Frontend component optimization
- 🤖 AI-Powered Question Generation
- 📱 Mobile App (React Native)
- 🎥 Video-based Assessments
- 🌍 Multi-language Support
- 📊 Advanced Analytics Dashboard
- 🔗 Third-party Integrations (LinkedIn, GitHub)
- 🎓 Certification System
- 📧 Email Notifications
- 🔄 Real-time Collaboration
- 📱 Progressive Web App (PWA)
This project is licensed under the MIT License - see the LICENSE file for details.
- 💡 Inspiration: Modern educational platforms and HR assessment tools
- 🎨 Design: Material Design and modern UI/UX principles
- 🛠 Tools: Amazing open-source libraries and frameworks
- 👥 Community: Contributors and users who make this project better
Made with ❤️ for the developer and HR community
Let's build the future of skill assessment together!