- Java 17+
- Node.js 18+
- MySQL 8.0+
- Maven 3.6+
CREATE DATABASE algorithm_visualizer;
CREATE USER 'algo_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON algorithm_visualizer.* TO 'algo_user'@'localhost';
FLUSH PRIVILEGES;Update backend/src/main/resources/application.yml:
spring:
datasource:
url: jdbc:mysql://localhost:3306/algorithm_visualizer
username: algo_user
password: your_password
jpa:
hibernate:
ddl-auto: validate
flyway:
enabled: true
locations: classpath:db/migration
app:
jwtSecret: mySecretKey123456789012345678901234567890
jwtExpirationInMs: 604800000cd algorithm-visualizer/backend
mvn spring-boot:runBackend runs on: http://localhost:8081
cd algorithm-visualizer/frontend
npm install
ng serveFrontend runs on: http://localhost:4200
-
Algorithm Visualization
- QuickSort with step-by-step animation
- BubbleSort with comparison highlighting
- Binary Search with range visualization
- Play/Pause/Step controls
- Speed adjustment
-
Authentication System
- JWT-based secure authentication
- User registration and login
- Role-based access control
-
Quiz System
- Interactive MCQ quizzes
- Instant scoring and explanations
- Algorithm-specific questions
-
Progress Tracking
- User progress monitoring
- Time tracking and step completion
- Badge achievement system
-
Code Editor
- Multi-language support (JS, Python, Java, C++)
- Syntax validation
- Code execution (mock implementation)
-
Leaderboard
- User ranking system
- Performance statistics
- Competitive scoring
-
Theming
- 4 themes: Light, Dark, Ocean Blue, Forest Green
- Responsive design
- Accessibility features
POST /api/auth/login- User loginPOST /api/auth/register- User registrationGET /api/algorithms- Get algorithms listPOST /api/progress/save- Save user progressGET /api/progress/leaderboard- Get leaderboardPOST /api/quiz/save- Save quiz resultsGET /api/badges/user/{email}- Get user badgesPOST /api/code/execute- Execute code
- Register/Login: Create account or login
- Select Algorithm: Choose from available algorithms
- Visualize: Use controls to step through algorithm
- Take Quiz: Test understanding with MCQs
- Code Practice: Write and execute code
- Track Progress: Monitor achievements and badges
- Compete: Check leaderboard rankings
- JWT token authentication
- Password hashing with BCrypt
- CORS configuration
- Input validation
- SQL injection prevention
- Mobile-first approach
- Tablet and desktop optimized
- Touch-friendly controls
- Accessible navigation
mvn clean package
java -jar target/algorithm-visualizer-backend.jar --spring.profiles.active=prodng build --prod
# Deploy dist/ folder to web serverexport SPRING_DATASOURCE_URL=jdbc:mysql://your-db-host:3306/algorithm_visualizer
export SPRING_DATASOURCE_USERNAME=your_username
export SPRING_DATASOURCE_PASSWORD=your_password
export APP_JWT_SECRET=your-super-secret-keyAll requested features have been implemented and tested:
- ✅ Backend with Spring Boot 3.4.x
- ✅ Frontend with Angular 17+
- ✅ Database with MySQL and Flyway
- ✅ JWT Authentication
- ✅ Algorithm Visualization
- ✅ Quiz System
- ✅ Progress Tracking
- ✅ Badge System
- ✅ Code Editor
- ✅ Leaderboard
- ✅ Multiple Themes
- ✅ Responsive Design
The Algorithm Visualizer is ready for production use!