A modern Angular 19 application providing an intuitive interface for educational content management with advanced drag-and-drop functionality, dynamic calendar integration, and real-time lesson organization.
π Related Repository: This frontend connects to the LessonTree API - a robust .NET 8 Web API with comprehensive unit testing and clean architecture.
- Interactive Lesson Tree: Hierarchical course/topic/lesson navigation with SyncFusion TreeView
- Advanced Drag-and-Drop: Seamless lesson reordering with visual feedback and automatic sort management
- Dynamic Calendar Integration: FullCalendar integration with real-time schedule updates
- Responsive Design: Angular Material components with mobile-friendly layouts
- Real-time Updates: Instant UI refresh after lesson moves and schedule changes
- Type-Safe Development: TypeScript with strict null checks and comprehensive type definitions
- Reactive Programming: RxJS observables for state management and API integration
- Component Architecture: Modular design with separation of concerns
- Service-Oriented: Clean service layer with dependency injection
- Error Handling: Comprehensive error boundaries with user-friendly notifications
- Angular 19: Latest framework with standalone components and improved performance
- TypeScript: Strict type checking with modern ES2022+ features
- Angular Material: Google's Material Design components
- SyncFusion: Enterprise-grade TreeView and data visualization components
- FullCalendar: Comprehensive calendar component with drag-and-drop support
- RxJS: Reactive programming with observables and operators
- Cypress: End-to-end testing framework with visual test runner
{
"@angular/core": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/forms": "^19.0.0"
}{
"@angular/material": "^19.0.0",
"@syncfusion/ej2-angular-navigations": "^27.1.48",
"@fullcalendar/angular": "^6.1.15",
"@fullcalendar/core": "^6.1.15"
}{
"rxjs": "^7.8.0",
"@angular/common/http": "^19.0.0"
}src/
βββ app/
β βββ calendar/ # Calendar feature module
β β βββ components/ # Calendar display components
β β βββ services/ # Calendar state and API services
β β βββ models/ # Calendar-specific models
β βββ lesson-tree/ # Lesson management feature
β β βββ components/ # Tree and lesson components
β β βββ services/ # Tree operations and drag-drop
β β βββ models/ # Lesson and tree models
β βββ shared/ # Shared utilities and components
β βββ core/ # Core services and guards
β βββ models/ # Global type definitions
βββ assets/ # Static assets and styles
βββ environments/ # Environment configurations
βββ styles/ # Global SCSS styles
- CalendarEventLoaderService: Efficient event loading with caching
- ScheduleApiService: RESTful API integration for schedule data
- ScheduleStateService: Centralized schedule state management
- TreeDragDropService: Complex drag-and-drop operation handling
- NodeOperationsService: CRUD operations for tree nodes
- TreeDataService: Tree structure management and API coordination
- ApiService: HTTP client wrapper with error handling
- AuthService: JWT authentication and session management
- NotificationService: User feedback and error messaging
- CalendarComponent: Calendar display with event integration
- LessonTreeComponent: Main tree interface with drag-and-drop
- CourseListComponent: Course navigation and selection
- LessonNodeComponent: Individual lesson display
- TopicNodeComponent: Topic container with expansion
- InfoPanelComponent: Detailed entity information display
- Consistent color schemes with Angular Material palette
- Responsive breakpoints for mobile and tablet devices
- Accessibility compliance with ARIA labels and keyboard navigation
- Loading states and progress indicators
- Drag-and-Drop: Visual feedback with drop zones and invalid drop indicators
- Tree Expansion: Smooth animations with state persistence
- Calendar Navigation: Month/week view switching with smooth transitions
- Context Menus: Right-click operations for advanced users
- OnPush Change Detection: Optimized component updates
- Lazy Loading: Feature modules loaded on demand
- Virtual Scrolling: Efficient rendering of large lesson lists
- Caching: Strategic caching of frequently accessed data
cypress/e2e/
βββ 01-authentication.cy.ts # Login/logout workflows
βββ 02-course-navigation.cy.ts # Tree expansion and navigation
βββ 03-course-crud.cy.ts # Entity selection and CRUD operations
βββ 04-drag-drop.cy.ts # Drag-and-drop functionality
βββ 05-calendar-integration.cy.ts # Calendar updates and synchronization
// Reusable test utilities
cy.robustLogin() // Login with backdrop handling
cy.expandTreeNodes() // Expand SyncFusion tree nodes
cy.setupDragDropTest() // Complete test environment setup
cy.reseedDatabase() // Reset test data via API- Authentication Flows: Complete login/logout testing
- Tree Operations: Expansion, selection, and navigation
- Drag-and-Drop: All lesson move scenarios with validation
- Calendar Integration: Schedule updates and event display
- Error Handling: API error scenarios and user feedback
- Node.js 18+ and npm 9+
- Angular CLI 19+
- Modern browser (Chrome, Firefox, Safari, Edge)
# Clone repository
git clone https://github.com/stevewash123/LessonTree.UI.git
cd LessonTree.UI
# Install dependencies
npm install
# Start development server
npm start
# Application available at http://localhost:4200Update src/environments/environment.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:5046/api',
enableLogging: true
};npm start # Start development server
npm run build # Production build
npm run build:dev # Development build
npm run lint # ESLint code analysis
npm run test # Unit tests (when available)npm run cypress:open # Interactive test runner
npm run test:auth # Authentication tests
npm run test:navigation # Navigation tests
npm run test:dragdrop # Drag-drop tests
npm run test:master # Complete test suite- Mobile: < 768px - Stacked layout with collapsible navigation
- Tablet: 768px - 1024px - Adaptive sidebar with main content
- Desktop: > 1024px - Full layout with dual-pane interface
- Touch-friendly drag-and-drop with larger hit targets
- Collapsible tree navigation for small screens
- Optimized calendar view for mobile interaction
- Progressive enhancement for advanced features
// Example state service pattern
@Injectable({ providedIn: 'root' })
export class ScheduleStateService {
private scheduleSubject = new BehaviorSubject<Schedule | null>(null);
public schedule$ = this.scheduleSubject.asObservable();
setSchedule(schedule: Schedule): void {
this.scheduleSubject.next(schedule);
}
}- Observable Chains: Complex data transformations with RxJS operators
- Error Boundaries: Centralized error handling with user-friendly messaging
- Loading States: Consistent loading indicators across all components
- Cache Management: Intelligent caching with automatic invalidation
// Advanced drag-drop with validation
onDrop(event: CdkDragDrop<any[]>) {
if (this.isValidDrop(event)) {
this.treeDragDropService.handleLessonMove(
event.item.data,
event.container.data,
event.currentIndex
).subscribe({
next: () => this.refreshTreeAndCalendar(),
error: (error) => this.handleMoveError(error)
});
}
}// Real-time calendar updates
this.calendarEventLoader.loadEventsForCurrentView(
this.scheduleId,
this.activeDate,
this.viewMode
).subscribe(events => {
this.calendarComponent.updateEvents(events);
});- JWT token management with automatic refresh
- Secure localStorage usage with fallback strategies
- Route guards for protected resources
- CSRF protection for state-changing operations
- Client-side validation with server-side verification
- Type-safe API responses with runtime validation
- Sanitization of user inputs
- Error message sanitization to prevent information leakage
- Follow Angular style guide and conventions
- Use TypeScript strict mode with comprehensive typing
- Implement comprehensive error handling
- Write reusable Cypress commands for test utilities
- Create feature branch from
main - Implement changes with proper typing
- Add Cypress tests for new functionality
- Ensure all tests pass (
npm run test:master) - Submit pull request with detailed description
- Lazy loading reduces initial bundle size
- Tree shaking eliminates unused code
- Efficient imports from large libraries (Material, SyncFusion)
- Strategic use of OnPush change detection
- Virtual scrolling for large datasets
- Debounced user inputs to reduce API calls
- Efficient tree rendering with minimal DOM updates
- Smart caching strategies for frequently accessed data
// Custom theme configuration
@use '@angular/material' as mat;
$primary-palette: mat.define-palette(mat.$blue-palette, 600);
$accent-palette: mat.define-palette(mat.$orange-palette, 500);
$theme: mat.define-light-theme((
color: (
primary: $primary-palette,
accent: $accent-palette
)
));- Custom CSS variables for consistent branding
- Dark mode support with theme switching
- Responsive component sizing
- Accessibility-compliant color contrasts
This project is part of a portfolio demonstration showcasing modern Angular development practices, reactive programming patterns, and comprehensive testing strategies.
This frontend is part of a full-stack educational management system:
- Frontend: LessonTree UI (this repository)
- Backend: LessonTree API - .NET 8 Web API
- Integration: RESTful API communication with reactive RxJS patterns
- Testing: Cypress E2E tests (UI) + comprehensive unit tests (API)
- Unit Testing: Jest-based unit testing framework
- PWA Features: Service workers and offline capability
- Internationalization: Multi-language support with Angular i18n
- Advanced State Management: NgRx for complex state scenarios
- Real-time Features: WebSocket integration for live updates
Built with β€οΈ using Angular 19 and modern frontend development practices