This is an 80%-complete web-based Intelligent Tutoring System focusing on Authentication and Learning Content Management modules. Built using modern technologies and following SOLID principles with layered architecture.
- Spring Boot 3.2.0 - Main framework
- Spring Security - Authentication & authorization
- Spring Data MongoDB - Database access
- MongoDB - NoSQL database
- JWT - Token-based authentication
- Maven - Dependency management
- React 18 - UI framework
- React Router - Navigation
- Context API - State management
- Axios - HTTP client
- CSS Modules - Styling
┌─────────────────────────────────────┐
│ Presentation Layer │
│ (React Components) │
├─────────────────────────────────────┤
│ Application Layer │
│ (REST Controllers) │
├─────────────────────────────────────┤
│ Business Layer │
│ (Services & Interfaces) │
├─────────────────────────────────────┤
│ Persistence Layer │
│ (MongoDB Repositories) │
├─────────────────────────────────────┤
│ Domain Layer │
│ (Entities & DTOs) │
└─────────────────────────────────────┘
-
Single Responsibility Principle (SRP)
- Each service class handles one specific domain (AuthenticationService, ContentManagementService)
- Separate DTOs for different operations
- Focused repository interfaces
-
Open/Closed Principle (OCP)
- ContentType enum extensible for new content types
- Service interfaces allow for different implementations
-
Liskov Substitution Principle (LSP)
- UserRole enum - any role can be substituted without breaking functionality
- Interface implementations are interchangeable
-
Interface Segregation Principle (ISP)
- Separate interfaces for different concerns (IAuthenticationService, IContentManagementService)
- Repository interfaces contain only relevant methods
-
Dependency Inversion Principle (DIP)
- Services depend on interfaces, not concrete implementations
- Extensive use of Spring's dependency injection
{
_id: ObjectId,
email: String (unique, indexed),
password: String (encrypted),
role: String (STUDENT|INSTRUCTOR|ADMIN),
profile: {
firstName: String,
lastName: String,
avatar: String,
bio: String,
institution: String
},
createdDate: Date,
lastModifiedDate: Date,
active: Boolean
}{
_id: ObjectId,
title: String (indexed),
description: String,
subject: String,
difficulty: String (BEGINNER|INTERMEDIATE|ADVANCED|EXPERT),
createdBy: String (instructor ID, indexed),
createdDate: Date,
lastModifiedDate: Date,
published: Boolean
}{
_id: ObjectId,
name: String (indexed),
description: String,
courseId: String (indexed),
createdDate: Date,
lastModifiedDate: Date
}{
_id: ObjectId,
title: String (indexed),
type: String (TEXT|VIDEO|INTERACTIVE_EXERCISE),
content: String,
topicId: String (indexed),
createdBy: String (indexed),
createdDate: Date,
lastModifiedDate: Date,
filePath: String,
mimeType: String,
fileSize: Number,
published: Boolean
}{
_id: ObjectId,
materialId: String (indexed),
title: String,
content: String,
changeDescription: String,
changedBy: String (indexed),
changeDate: Date,
version: Number
}POST /api/auth/register - User registration
POST /api/auth/login - User login
GET /api/auth/me - Get current user
GET /api/auth/check-email/{email} - Check email availability
GET /api/content - Get all content
GET /api/content/{id} - Get content by ID
GET /api/content/topic/{id} - Get content by topic
GET /api/content/search - Search content
POST /api/content - Create new content (INSTRUCTOR/ADMIN)
PUT /api/content/{id} - Update content (INSTRUCTOR/ADMIN)
DELETE /api/content/{id} - Delete content (INSTRUCTOR/ADMIN)
POST /api/content/upload - Upload file (INSTRUCTOR/ADMIN)
GET /api/content/categories - Get content categories
- User registration with role selection (Student/Instructor/Admin)
- Email/password login
- JWT token-based authentication
- Password encryption (BCrypt)
- Role-based access control
- Protected routes (frontend)
- Method-level security (backend)
- CRUD operations for learning materials
- Content types: Text, Video, Interactive Exercise
- Content categorization by topic
- File upload for videos
- Content search functionality
- Instructor-specific content ownership
- Content versioning/history tracking
- Publish/Draft status
- Responsive design
- Authentication forms (Login/Register)
- Protected route component
- Content dashboard with CRUD operations
- Content search and filtering
- File upload component
- User context management
- Error handling and validation
- Layered architecture
- SOLID principles implementation
- JWT security configuration
- MongoDB integration
- Input validation
- CORS configuration
- Error handling
- Repository pattern
- Advanced content analytics
- Content collaboration features
- Advanced search with Elasticsearch
- Content scheduling/publishing workflows
- Bulk operations
- Advanced file type validation
- Content recommendation engine
- Real-time notifications
- Course enrollment system
- Learning progress tracking
- Java 17+
- Node.js 16+
- MongoDB 4.4+
- Maven 3.6+
-
Clone and navigate to backend
cd its-backend -
Configure MongoDB
- Install and start MongoDB
- Database will be created automatically as 'its_database'
-
Update configuration (optional) Edit
src/main/resources/application.properties:spring.data.mongodb.database=its_database jwt.secret=your-secret-key
-
Run the application
mvn spring-boot:run
Backend will start on http://localhost:8080
-
Navigate to frontend
cd its-frontend -
Install dependencies
npm install
-
Start development server
npm start
Frontend will start on http://localhost:3000
-
Register a new user
- Go to http://localhost:3000
- Click "Register here"
- Create accounts with different roles (Student/Instructor)
-
Test content management
- Login as Instructor
- Create different types of content
- Test search and filtering
-
Test role-based access
- Students can view content but cannot create/edit
- Instructors can manage their own content
- Admins have full access
- Repository Pattern - Data access abstraction
- Service Layer Pattern - Business logic separation
- DTO Pattern - Data transfer objects
- Strategy Pattern - Role-based permissions
- Factory Pattern - Entity creation
- Context API Pattern - Global state management
- HOC Pattern - Protected routes
- Container/Component Pattern - Separation of concerns
- Custom Hooks Pattern - Reusable logic
- JWT Authentication - Stateless token-based auth
- Password Encryption - BCrypt hashing
- CORS Protection - Cross-origin request security
- Input Validation - Both frontend and backend
- Role-based Authorization - Method and route level
- XSS Protection - Input sanitization
- Database Indexing - On frequently queried fields
- Lazy Loading - Frontend component optimization
- Connection Pooling - MongoDB connection management
- Caching - Static file caching
- Pagination - For large content lists (ready to implement)
- Stateless Design - JWT tokens enable horizontal scaling
- Microservice Ready - Modular service architecture
- Database Sharding Ready - MongoDB supports horizontal scaling
- CDN Ready - File uploads can be moved to cloud storage
- Load Balancer Compatible - No server-side sessions
This ITS implementation provides a solid foundation for an educational platform with proper architecture, security, and extensibility for future enhancements.