How yuyuuxp/finalproject-web-yugyo works
Yugyo is a Next.js course-and-atelier platform with public course and teacher pages, student and instructor portals, and administrative management. The apparent user journey spans registration or login, course discovery/enrollment, course schedules and content, and student–teacher chat or discussion; administrators manage courses, categories, users, and schedules. The graph preserves these domain areas and the sampled database, media, and teacher-chat policy layers. UI-to-API wiring is not asserted where excerpts do not show it; several portal connections therefore remain unverified.
Main entry points: db.js PostgreSQL pool · teacher-chat-scope.js Teacher chat scoping · student Student portal · admin Admin management API
Components 29
Access and discovery
- Sign in and register
src/app/(auth) - Course catalog
src/app/(public)/courses - Teacher profiles
src/app/(public)/teachers
Student learning
- Student portal
src/components/student - Student chats
src/components/student/StudentChatsClient.jsx - Student courses
src/components/student/StudentCoursesClient.jsx - Student schedule
src/components/student/StudentScheduleClient.jsx
Instructor workspace
- Teacher dashboard
src/components/teacher/TeacherDashboardClient.jsx - Course management
src/components/teacher/CourseManagementClient.jsx - Course content
src/components/teacher/ContentManagementClient.jsx - Schedule management
src/components/teacher/TeacherScheduleClient.jsx - Instructor profile
src/components/teacher/InstructorProfileClient.jsx - Teacher chats
src/app/dashboard/teacher/chats/page.jsx
Administration
- Admin console
src/app/dashboard/admin
Runtime services
- Authentication API
src/app/api/auth - Registration API
src/app/api/register/route.js - Admin management API
src/app/api/admin - Teacher API
src/app/api/teacher - Chat API
src/app/api/chat/route.js - Teacher chat API
src/app/api/teacher/chats/route.js - Discussion API
src/app/api/teacher/discussion/route.js - Teacher schedule API
src/app/api/teacher/schedule/route.js - Chat messages API
src/app/api/chat/messages/route.js - PostgreSQL pool
src/lib/db.js - Local image storage
src/lib/mediaStorage.js - Teacher chat scoping
src/lib/teacher-chat-scope.js - Teacher chat filtering
src/lib/teacher-chat-filter.js - Teacher status rules
src/lib/teacher-status.js
Other components
- Visitor
Connections 26
- Visitor → Sign in and register: registers or signs in
- Visitor → Course catalog: browses courses
- Authentication API → PostgreSQL pool: queries users
src/app/api/auth/login/route.js - Registration API → PostgreSQL pool: creates user
src/app/api/register/route.js - Admin management API → PostgreSQL pool: manages records
src/app/api/admin/courses/route.js - Admin management API → Local image storage: stores course images
src/app/api/admin/courses/route.js - Teacher API → PostgreSQL pool: manages courses
src/app/api/teacher/courses/route.js - Teacher API → Local image storage: stores course images
src/app/api/teacher/courses/route.js - Teacher schedule API → PostgreSQL pool: reads and updates sessions
src/app/api/teacher/schedule/route.js - Teacher schedule API → Teacher status rules: checks pending status
src/app/api/teacher/schedule/route.js - Chat API → PostgreSQL pool: reads and updates threads
src/app/api/chat/route.js - Teacher chat API → PostgreSQL pool: reads and writes messages
src/app/api/teacher/chats/route.js - Discussion API → Teacher chat scoping: fetches discussions
src/app/api/teacher/discussion/route.js - Discussion API → Teacher status rules: checks pending status
src/app/api/teacher/discussion/route.js - Teacher chat scoping → PostgreSQL pool: queries chat data
src/lib/teacher-chat-scope.js - Teacher chat scoping → Teacher chat filtering: filters teacher chats
src/lib/teacher-chat-scope.js - Teacher chat scoping → Teacher status rules: checks status
src/lib/teacher-chat-scope.js - Chat messages API → PostgreSQL pool: queries messages
src/app/api/chat/messages/route.js - Student portal → Student courses: renders courses
- Student portal → Student chats: renders chats
- Student portal → Student schedule: renders schedule
- Teacher dashboard → Course management: renders courses
- Teacher dashboard → Schedule management: renders schedule
- Admin console → Admin management API: manages records
- Teacher chats → Teacher chat API: loads conversations
- Student chats → Chat messages API: loads messages