Commit Graph
132 Commits
Author SHA1 Message Date
openhands ecf083b0a7 Add comprehensive project README documentation
- Document project purpose and usage
- Include setup instructions for development and production
- Add security features and compliance information
- Provide quick start and next steps guide
- Include API documentation and examples
- Add project status and roadmap

Co-authored-by: openhands <openhands@all-hands.dev>
2026-08-16 10:02:00 +02:00
openhands 4b3e30fb79 feat: unified notebook page — remove view-mode toggle, persistent ink overlay, eraser tool, dynamic radial menu 2026-08-15 21:30:09 +02:00
openhands 715e588ac8 Complete: Fix Next.js ReferenceError build issues and cleanup documentation 2026-08-15 18:34:21 +02:00
openhands 1c89b0a0eb fix: resolve ReferenceError during prerendering by moving use client to file top 2026-08-15 15:46:41 +02:00
openhands e44174517f feat: add missing DataTable component for admin pages
Fixes build issue caused by missing data-table import in:
- src/app/admin/exam-proctoring/page.tsx
- src/app/admin/signage/page.tsx

The component provides reusable table interface with search, sorting, and actions for all admin interfaces.
2026-08-15 13:58:04 +02:00
Z User be1e61d94b Fix: Redesign Digitale Hefte create dialog - fits viewport properly
Problems fixed:
- Dialog was max-w-lg (narrow) with too much vertical content (16 notebook type
  buttons in a grid, separate sections for each field)
- Content overflowed the viewport on smaller screens

Redesigned approach:
- Dialog: max-w-2xl max-h-[85vh] with flex flex-col layout
- Header: fixed at top with border-b (shrink-0)
- Content: scrollable area (flex-1 overflow-y-auto)
- Footer: fixed at bottom with border-t (shrink-0)

Layout optimizations:
- Title + Description side by side (grid-cols-2)
- Subject + Class side by side (grid-cols-2)
- Notebook type: compact dropdown instead of 16-button grid
  (base types + curriculum separator + curriculum types)
- Color + Icon side by side (grid-cols-2)
- Public toggle + Eco message in one compact row
- Smaller labels (text-xs), tighter spacing (space-y-4)
- Fixed height inputs (h-10 instead of min-h-[44px])

Result: w=512 h=490, fits within viewport (577px)
2026-08-11 11:22:01 +00:00
Z User b56f840161 Remove AI chat widget and virtual character mascot floating buttons
- Removed AIChatWidget from app-layout (was bottom-right floating button)
- Removed VirtualCharacter from app-layout (was bottom-left floating mascot)
- Removed unused imports for both components
2026-08-11 11:13:21 +00:00
Z User e5c761a179 Architecture cleanup: Remove orphans from audit report (37 files)
Deleted orphan component files (4):
- dashboard-customizer.tsx (never imported)
- unified-communication.tsx (never imported)
- data-table.tsx (never imported)
- widget-container.tsx (only imported by orphan dashboard-customizer)

Deleted unused shadcn/ui primitives (15):
- accordion, aspect-ratio, calendar, carousel, chart, form,
  hover-card, input-otp, menubar, navigation-menu, pagination,
  radio-group, resizable, toaster, toggle-group
(All verified as zero importers)

Deleted orphan API route groups (6 directories, 13 route files):
- ai-grading-audit (no caller)
- demo-data (no caller)
- exam-plans (no caller)
- grade-analytics (no caller, dead renderView case also removed)
- grading-annotations (no caller)
- grading-reviews (no caller)

Removed dead grade-analytics renderView case + ViewName type entry

Removed 10 orphan database models from schema:
- NotificationHub, NotificationArchive (superseded by Notification)
- WidgetTemplate (dashboard customizer feature abandoned)
- EmergencySignage, SignageMessage, SignageSchedule, SignageAuditLog
  (signage feature - no API routes implemented)
- SchoolPolicy, EscalationPolicy, ClassMessagingLock
  (policy/messaging lock feature - never wired)
Also removed 16 relation fields pointing to deleted models.

Schema validated, db pushed, lint passes, all 10 tested modules work.
2026-08-11 11:03:24 +00:00
Z User 333f3e9466 i18n: Add 29 missing translation keys (DE + EN) and fix 19 hardcoded strings
Added missing i18n keys:
- action.upload, label.selected, student_portal.daily_inspiration
- auth.* (back_to_login, cancel, forgot_check_inbox, forgot_email_sent,
  forgot_password_desc, password_weak/fair/good/strong, send_reset_link)
- attendance.daily_timeline, competition.unlimited
- date.* (jan through dec - short month names)
- drawing.bg_type, drawing.canvas_label

Fixed 19 hardcoded English strings:
- admin/compliance-overview: 5 strings (dashboard title, status, policies, log)
- admin/exam-proctoring: 3 strings (proctoring, sessions)
- admin/signage: 1 string (emergency signage)
- compliance-wizard: 3 strings (retention periods, checklist, complete)
- dashboard-customizer: 1 string (add widget)
- data-import-export: 2 strings (best practices, export regularly)
- district-management: 1 string (access denied)
- exam-session-monitor: 1 string (exam mode active)
- professional-calendar: 1 string (fixed 'Create Neues Ereignis' typo)
- ui/sidebar: 1 string (toggle sidebar)
2026-08-11 09:48:44 +00:00
Z User 91d6980c21 i18n: Fix 19 more hardcoded English strings in admin pages and components
Fixed:
- compliance-overview: Compliance Monitoring Dashboard, Onboarding Status, Data Retention Policies, Active Policies, Consultation Log
- exam-proctoring: Exam Proctoring, Active Sessions, Total Sessions
- signage: Emergency Signage, Normal option
- compliance-wizard: Data Retention Periods, Consultation Checklist, Compliance Setup Complete
- dashboard-customizer: Add Widget
- data-import-export: Data Management Best Practices, Export data regularly
- district-management: Access Denied
- exam-session-monitor: Exam Mode Active
- professional-calendar: Fixed 'Create Neues Ereignis' typo
- sidebar: Toggle Sidebar

All admin pages and shared components now fully German.
2026-08-11 09:46:05 +00:00
Z User 491bdd18a5 Fix: Remove database files from git tracking, update .gitignore 2026-08-11 09:41:00 +00:00
Z User b41a48fb40 i18n: Fix 18 more hardcoded English strings in admin pages and calendar
Fixed files:
- admin/compliance-overview/page.tsx: 2 strings (error message, consultations)
- admin/exam-proctoring/page.tsx: 1 string (Alerts)
- admin/signage/page.tsx: 15 strings (tabs, labels, options, buttons)
- professional-calendar.tsx: 4 strings (event title, date, location, description)

All admin pages and calendar components now fully German.
2026-08-11 09:40:44 +00:00
Z User baa9f981ed i18n: Fix 44 additional hardcoded English strings across 15 files
Fixed files:
- competitions-view.tsx: 10 strings (placeholders, labels)
- subjects-view.tsx: 11 strings (types, actions, placeholders)
- professional-calendar.tsx: 5 strings (event type labels)
- illness-reporting-view.tsx: 3 strings (status badges)
- student-detail-view.tsx: 4 strings (health form placeholders)
- data-table.tsx: 2 strings (search, empty state)
- compliance-wizard.tsx: 2 strings (name, state)
- settings-view.tsx: 1 string (Skipped)
- competence-flower-view.tsx: 1 string (Active)
- disciplinary-view.tsx: 1 string (All clear)
- district-management-view.tsx: 1 string (No recent activity)
- competitions-view.tsx: 1 string (Stock)
- ui/pagination.tsx: 3 strings (Previous, Next, More pages)
- ui/breadcrumb.tsx: 1 string (More)
- ui/carousel.tsx: 2 strings (Previous/Next slide)
- ui/sidebar.tsx: 1 string (Sidebar title)

Total: 44 hardcoded English strings replaced with German
2026-08-10 23:37:27 +00:00
Z User 229b918fa5 Update worklog: Phase 11 - Architecture audit, i18n, UX fixes complete
Summary of all changes in this phase:
- 13 commits pushed to GitHub
- 4 orphan files deleted (-1008 lines dead code)
- 3 duplicate nav entries removed
- 92 orphaned i18n keys removed
- 6 broken API calls fixed
- All emojis removed from UI code
- 44px touch targets + reduced-motion CSS added
- All hardcoded English strings translated to German
- PWA/onboarding/WebSocket UX issues fixed
- AI Studio with SnapGen/Perchance integration added
- Calendar filter tabs + grading analytics view added
2026-08-10 23:27:56 +00:00
Z User 7461f7699c i18n: Replace hardcoded English strings with German in key components
UnifiedGradingPanel - all labels translated to German
ProfessionalCalendar - all UI text translated to German
AI Studio - confirmed German throughout
2026-08-10 23:11:57 +00:00
Z User 678a4e9b83 Compliance: Remove emojis, add touch targets, add reduced-motion support
No-Emoji Policy (TODO.md rule):
- Replaced all emojis in UI code with Lucide icon names or text:
  - calendar-manager.ts: exam/lesson/holiday/term/event icons
  - signage-utils.ts: emergency/notification/schedule/announcement icons
  - behavior-tracking-view.tsx: placeholder text
  - i18n.ts: example text strings (DE + EN)
  - admin/signage, admin/compliance pages
  - compliance-wizard.tsx, substitute-teacher-view.tsx
- Verified: zero emojis remain in src/ (excluding comments)

Touch Target Compliance (44px minimum):
- Added comprehensive @media (pointer: coarse) CSS rules:
  - All buttons, [role=button], [role=tab], [role=option], [role=menuitem]
    get min-height/min-width: 44px
  - Icon-only buttons get extra padding
  - -webkit-touch-callout: none and user-select: none for buttons
  - touch-action: manipulation for smooth scrolling

Reduced-Motion Support:
- Added comprehensive @media (prefers-reduced-motion: reduce) rules:
  - All animations: duration 0.01ms, iteration 1
  - All transitions: duration 0.01ms
  - scroll-behavior: auto (no smooth scroll)
  - Framer-motion elements: opacity 1, transform none
2026-08-10 21:23:38 +00:00
Z User 13fce9d906 Fix UX issues: Suppress PWA in dev, respect onboarding preference, silence WS warnings
PWA Install Prompt:
- Suppress in development (process.env.NODE_ENV === 'development')
- Remember dismissal for 7 days (localStorage 'pwa_prompt_dismissed')
- Delay showing by 30 seconds in production to avoid interrupting users

Onboarding Tour:
- Now respects 'Dont Show Again' checkbox (isDontShowAgain check added)
- 1-second delay before showing (smoother UX)
- Won't appear if user previously checked 'Dont show again'

WebSocket Connection:
- Removed console.log/warn for connect/disconnect/error events
- Increased reconnection delay from 1s to 5s (less spam)
- Reduced reconnection attempts from 10 to 3
- Increased timeout from 10s to 15s
- Errors now silently fail (WebSocket is optional for real-time collaboration)
2026-08-10 20:51:24 +00:00
Z User 0c7a69ffe0 Add calendar event filter tabs and grading analytics view
Calendar Enhancement:
- Added event filter tabs to ProfessionalCalendar:
  'Alle' | 'Prüfungen' | 'Veranstaltungen' | 'Ferien'
  These replace the removed exam-calendar and school-events nav entries
- Added filteredEvents useMemo for efficient filtering
- Localized view tabs to German (Monat/Woche/Agenda)

Grading Enhancement:
- Added Analytics view to UnifiedGradingPanel (3rd view mode)
  This replaces the removed grade-analytics nav entry
- Shows: Durchschnitt, Bestehensquote, Noten gesamt, Fächer
- Subject breakdown with progress bars
- Grade distribution histogram (5 buckets)
- Added ListIcon and TrendingUp icons to view switcher
2026-08-10 20:36:02 +00:00
Z User af0b0a5272 Cleanup: Remove dead nav items, orphaned i18n keys, and stale ViewName entries
Student Navigation:
- Removed 6 teacher-only items from studentNavSections:
  grade-analytics, ai-tests, seating-chart, school-newsletter,
  school-transport, substitute-teacher
- Added 9 student-relevant views to studentViews:
  counseling, report-cards, student-wellness, student-career,
  school-library, announcements, peer-assessment, student-achievements,
  student-study-planner

Parent Navigation:
- Removed 2 student-only items from parentNavSections:
  student-study-planner, peer-assessment
- Added 8 parent-relevant views to parentViews:
  parents, grading, attendance, report-cards, school-library,
  student-achievements, student-career, competitions

i18n Cleanup:
- Removed 92 orphaned tablet_grading.* translation keys (47 DE + 45 EN)
  These were for features in the deleted tablet-grading-view.tsx component

ViewName Type:
- Removed 'tablet-grading', 'exam-calendar', 'school-events' from ViewName union
  (nav entries and renderView cases were already removed in previous commit)
2026-08-10 19:10:39 +00:00
Z User 1af01dd304 Architecture audit fixes: Fix broken APIs, remove duplicates, clean dead code
Critical Fixes:
- UnifiedGradingPanel: Fixed API calls from non-existent /api/v1/grades* to /api/assessments
  - Added data transformation from Assessment objects to Grade interface
  - Handle nested subject objects (subject.name instead of subject string)
  - Added empty state when no grades exist
- ProfessionalCalendar: Fixed API call from /api/v1/calendar/events to /api/calendar-events
  - Changed from startDate/endDate params to month param (YYYY-MM format)

Removed Duplicates:
- Removed 'tablet-grading' nav entry (was duplicate of 'grading', variant='tablet' was a no-op)
- Removed 'exam-calendar' nav entry (was duplicate of 'calendar', identical props)
- Removed 'school-events' nav entry (was duplicate of 'calendar', identical props)
- Removed corresponding renderView cases for all 3

Deleted Orphan Files:
- src/components/grading-panel.tsx (never imported, called non-existent /api/v1/assessments/*)
- src/components/notification-hub.tsx (never imported, called non-existent /api/v1/notifications/*)
- src/components/unified-nav-menu.tsx (never imported, depended on deleted navigation-config.ts)
- src/lib/navigation-config.ts (stale, unused - app uses inline arrays in app-layout.tsx)

Fixed Role Access:
- Added 'settings' to parentViews, studentViews, and teacherViews
- Added notebooks, homework, attendance, grading, flower, subjects, resources,
  competitions, portfolio to studentViews
- Added notebooks, drawing, portfolio, peer-assessment, subjects, competitions,
  parents, announcements, school-library, school-transport, counseling,
  student-wellness, student-career, ai-tests, ai-studio, data-import-export
  to teacherViews
- Removed 'tablet-grading' and 'exam-calendar' from teacherViews (nav entries removed)
2026-08-10 17:46:37 +00:00
Z User 411ff146a7 Fix: Digitale Hefte modal/editor sizing - fits within viewport
- Changed notebook editor container from min-h-screen to h-[calc(100vh-8rem)]
  This constrains the editor to the available viewport height
- Added overflow-hidden to the container to prevent content spilling
- Fixed page list ScrollArea: max-h-[calc(100vh-350px)] with min-h-0
  for proper flex shrinking within the editor
- Added overflow-y-auto to main content area in app-layout
  Allows scroll when content exceeds viewport without breaking layout
2026-08-10 17:12:42 +00:00
Z User fe3eb4a272 Restrict AI Studio to teachers/admins only + Save to Lesson feature
Access Control:
- AI Studio view checks user role: only SCHOOL_ADMIN, SUPER_ADMIN, TEACHER, VICE_PRINCIPAL
- Students and parents see 'Kein Zugriff' (No Access) message
- AI Studio removed from student navigation
- API routes (/api/ai/snapgen, /api/ai/perchance, /api/ai/lesson-plan, /api/ai/agent) enforce role checks

New Features:
- 'Save to Lesson' dialog in Video and Image generation tabs
  - Pick Subject > Topic > Lesson from existing curriculum
  - Saves AI video/image URL to SubjectLesson record
  - Stores prompt, provider, timestamp, and teacher who generated
  - Students will see this content in homework and lesson materials
- AI Lesson Plan API route (/api/ai/lesson-plan)
- AI Agent Chat API route (/api/ai/agent) with context-aware system prompts
- SubjectLesson model: Added aiVideoUrl, aiImageUrl, aiThumbnailUrl, aiPrompt, aiProvider, aiGeneratedAt, aiGeneratedBy
- Homework model: Added aiLessonId, aiVideoUrl, aiImageUrl for linking AI content

Navigation:
- Removed duplicate AI Studio entry from teacher nav
- Removed AI Studio from student nav (students can't access)
2026-08-10 16:47:05 +00:00
Z User 763ebef22b Add AI Studio with agentic system, SnapGen video gen, Perchance image gen
Features:
- AI Studio module with 4 tabs: Video Generation, Image Generation, Lesson Plan, AI Agent Chat
- SnapGen AI API integration for video lesson generation (https://api.snapgen.ai/uapi/v1/generate)
  - Educational prompt enhancement with subject/topic/language context
  - Async polling for video generation status
  - Fallback to z-ai-web-dev-sdk if SnapGen not configured
- Perchance AI API integration for image generation (https://perchance.org/text-to-image-plugin)
  - Multiple styles: realistic, cartoon, watercolor, pixel, sketch, 3D
  - Fallback to z-ai-web-dev-sdk if Perchance not configured
- Agentic AI chat with teacher assistant context
- AI lesson plan generation

Fixes:
- Fix duplicate close button in onboarding tour (removed default Dialog close, kept custom one)
- Add SnapGen and Perchance fields to AISettings model

Navigation:
- AI Studio added to Insights section (teachers) and Student nav
- Digital Notebook confirmed available for both students and teachers
2026-08-10 16:33:23 +00:00
Z User c078ec36aa Update worklog: Phase 10 - navigation consolidation, DB setup, schema fixes 2026-08-10 16:17:23 +00:00
Z User 688a91ae47 Refactor: Consolidate sidebar navigation into 5 top-level sections
Per TODO.md navigation consolidation requirements:
- Home: Dashboard, Notifications
- Teach: Classes, Progress, Assessments, Grading, Reports, Attendance, Homework, Lesson Plans, Resources, Notebooks, Drawing, Portfolio, Rubrics, Comments, Peer Assessment, Tablet Grading, Seating, Subjects, Competitions
- School Life: Calendar, Communication, Announcements, Events, Newsletter, Library, Transport, Counseling, Wellness, Career, Discipline, Behavior, Illness, Substitutes, Timetable, Exam Calendar, Parents
- Insights: Competence Flower, Mastery Matrix, Analytics, Coverage, Grade Analytics, Reports, AI Tests, Data Import/Export
- Administration: Competencies, Districts, Settings

Added i18n keys for new section labels (DE + EN).
2026-08-10 16:15:48 +00:00
Z User 9f26c6da38 Fix: seed-demo now links demo accounts to existing school
- seed-demo.ts now finds any existing school (from seed.ts) instead of creating a separate 'Demo Schule'
- This ensures demo accounts have access to the seeded data (classes, students, etc.)
- Falls back to creating a school if none exists
2026-08-10 16:09:51 +00:00
Z User f63326c29b 67035726-b299-4494-aaa3-415fa685af72 2026-08-10 15:47:21 +00:00
Z User 9b9115cb73 Fix: Prisma schema - add missing relation fields for ClassMessagingLock and EscalationPolicy
- Added schoolId field and school relation to ClassMessagingLock model
- Added escalationPoliciesOverridden to User model
- Added classMessagingLocksLocked to User model
- Added classMessagingLocks relation to ClassGroup model
- Added relation names to avoid ambiguity
2026-08-10 15:46:49 +00:00
[dyad] 59fcecedee Update 2 files 2026-08-03 11:16:50 +02:00
[dyad] a3e56f1ba6 Update 1 file 2026-08-03 11:15:16 +02:00
[dyad] 5e9eb0e12a Update 1 file 2026-08-03 11:13:19 +02:00
[dyad] abeb6cd243 Update 1 file 2026-08-03 11:11:21 +02:00
[dyad] f25d44fd5f Add 1 file, update 3 files 2026-08-03 11:08:03 +02:00
[dyad] 3eb29b3ef7 Update 1 file 2026-08-03 01:23:03 +02:00
[dyad] 5d0496f6f6 Update 1 file 2026-08-02 23:46:45 +02:00
[dyad] 2588c47c29 Add 1 file, update 2 files 2026-08-02 23:42:02 +02:00
[dyad] 77b6bb1c6e Update 3 files 2026-08-02 19:48:45 +02:00
[dyad] 2913b0332f Add 4 files, update 14 files 2026-08-02 17:58:35 +02:00
[dyad] 278293b397 Add 21 files, update 16 files, rename 1 file 2026-08-02 17:26:49 +02:00
[dyad] b9e4ed4dfc [dyad] Kalan branding alt başlığını kaldır 2026-08-02 16:07:54 +02:00
[dyad] 71b9ca0eb4 Update 31 files 2026-08-02 15:47:01 +02:00
[dyad] 93ad9aa1e7 Update 4 files 2026-08-02 15:22:26 +02:00
[dyad] 63b81b4764 Update 3 files 2026-08-02 15:18:56 +02:00
[dyad] 2db87a1227 Add 4 files, update 15 files 2026-08-02 15:17:18 +02:00
[dyad] a97794acf8 Update 2 files 2026-08-02 14:01:30 +02:00
[dyad] c84b080fb8 Add 8 files, update 14 files 2026-08-02 14:00:21 +02:00
[dyad] 669e029f45 Update 1 file 2026-08-02 12:56:02 +02:00
[dyad] 1ae806bd7b Update 2 files 2026-08-02 12:55:40 +02:00
[dyad] aaa95319c8 Update 1 file 2026-08-02 12:53:56 +02:00
[dyad] 03ecc2551a Update 71 files 2026-08-02 12:53:19 +02:00