- Added Role to AuthResponse DTO and all auth endpoints
- Fixed null config handling in MistralConnector, TtsService, VoskService, MistralService
- Fixed BaseAddress setup in MistralConnector to work without API key
- Reverted seed data to use hardcoded bcrypt hashes (compatible with PasswordHasher)
- Added integration tests for StoryController
- Added unit tests for MistralConnector
- Updated frontend AuthResponse type to include role
Fixes admin redirect to /, story generation null reference, and Docker build failures.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
PROBLEM:
- /admin redirects to / (home page)
- Admin pages were wrapping themselves in <AdminLayout>
- This caused double-nested layout (header, nav, footer twice)
ROOT CAUSE:
Admin pages (AdminDashboardPage, AdminUsersPage, etc.) were individually wrapping
their content in <AdminLayout> component. But the App.tsx routing already renders
<AdminLayout> as the parent element for all /admin routes, and AdminLayout uses
<Outlet /> to render child routes.
This created a nested structure:
AppLayout -> AdminLayout (from routing) -> AdminLayout (from page) -> Page Content
SOLUTION:
- Removed <AdminLayout> wrappers from all admin pages
- AdminLayout now always uses <Outlet /> instead of {children || <Outlet />}
- Removed unused 'children' parameter from AdminLayout
- Admin pages now render directly in the Outlet of AdminLayout
CHANGES:
- AdminDashboardPage.tsx: Removed AdminLayout import and all <AdminLayout> tags
- AdminUsersPage.tsx: Removed AdminLayout import and all <AdminLayout> tags
- AdminUserDetailPage.tsx: Removed AdminLayout import and all <AdminLayout> tags
- AdminReportsPage.tsx: Removed AdminLayout import and all <AdminLayout> tags
- AdminStoryGeneratorPage.tsx: Removed AdminLayout import and all <AdminLayout> tags
- AdminLayout.tsx: Removed unused children parameter, always use <Outlet />
Now /admin will correctly render the AdminLayout with nested admin pages.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add AdminLayout component for consistent admin UI
- Create AdminDashboardPage with statistics overview
- Create AdminUsersPage with user management (CRUD, role changes)
- Create AdminReportsPage with user progress reports and CSV export
- Create AdminStoryGeneratorPage for AI-powered story generation
- Create AdminUserDetailPage for detailed user progress tracking
- Add comprehensive admin API client with all endpoints
- Add TypeScript types for admin DTOs (users, reports, stories)
- Add extensive CSS styles for all admin pages
- Update App.tsx with proper admin sub-routes
- Update admin-module.md feature documentation with completion status
Admin features:
- Dashboard with stats (users, lessons, quizzes, stories, activity)
- User management (list, view details, change roles, delete)
- Progress reports (view all, detailed user reports, CSV export)
- Story generator (AI story creation for levels with audio)
- Role-based authentication (AdminRoute protects all admin pages)
- Responsive design for all admin pages
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Role property to User entity with migration
- Create BootstrapController for first admin user creation
- Remove [AllowAnonymous] from all learning content controllers
- Create AdminController with admin-only endpoints
- Create AdminService for user management
- Create UserReportService for progress reports
- Add UserRepository implementation
- Update AuthService with role support
feat(frontend): Implement authentication system
- Add AuthStore with React context for auth state management
- Create Login, Register, Landing, and Home pages
- Add ProtectedRoute and AdminRoute components
- Create Auth API types and client
- Configure Vite with @/ path alias
- Add comprehensive CSS styles for auth and landing pages
BREAKING CHANGE: All learning content now requires authentication.
Users must register and sign in before accessing lessons, quizzes, and stories.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Removed class-level [Authorize] from StoryController
- Admin endpoints already have [Authorize(Roles = "Admin")]
- GET endpoints are now publicly accessible for development/testing
- Updated frontend API client to handle unauthenticated requests
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Updated API client to use '/api' base URL in production (Docker)
- Updated StoryPlayer audio URL construction for Docker environment
- nginx proxies /api requests to backend:8080 in Docker Compose
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Created TypeScript types for Story DTOs (types/api/story.ts)
- Created API client with authenticated fetch (lib/api/story.ts)
- Created StorySegment component with word click-to-translate
- Created StoryPlayer component with audio playback controls
- Created StoryTab component for segment navigation
- Created StoryPage component with routing
- Added comprehensive CSS styling (index.css)
- Updated App.tsx with react-router-dom routing
- Added react-router-dom dependency to package.json
- Updated feature documentation for Phase 6 completion
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>