How vk-official/eduplus-kerala works
1. Overall shape
- This is a Next.js App Router application with a mostly server-rendered page structure and a shared component library.
- The app is organized around a public education portal plus authenticated educator/admin areas.
2. Primary route boundaries
- Public-facing routes live under app/ and include the landing page, textbooks, vault landing, bookmarks, dashboard, teacher profiles, and legal pages.
- Special-purpose areas are split into distinct route groups: app/admin, app/teacher/[name], app/vault/[id], and app/file/[id].
3. Public content and discovery layer
- The root page and marketing/content pages (about, privacy, terms) are driven by reusable presentation components like HeroSection, FaqSection, LeaderboardSection, SpecialitiesSection, and MarqueeBanner.
- app/sitemap.ts and app/robots.ts indicate the site is SEO-aware and meant to be indexed as a public resource hub.
4. Textbook gateway subsystem
- app/textbooks appears to be the SCERT textbook discovery entry point described in the README.
- Supporting UI such as SearchInput, SidebarFilter, CustomSelect, and FileCard suggests a filter-and-browse flow for locating official materials.
5. Teacher Vault subsystem
- app/vault and app/vault/[id] form the educator resource library.
- Components like VaultGrid, VaultContent, UploadForm, DeleteMaterialButton, and ResourceActions show the core flow: authenticated teachers upload, manage, and view shared materials.
6. File detail and download flow
- app/file/[id] is a dedicated material detail page with DownloadButton, likely used to present metadata and trigger file retrieval.
- This is a clear boundary between list/browse views and a deeper asset-specific experience.
7. Teacher interaction layer
- app/teacher/[name] suggests public teacher profile pages.
- CommentSection, TeacherCommentDashboard, and ActivitySidebar indicate a social/feedback layer around educators and their resources.
8. Admin and moderation subsystem
- app/admin and app/admin/dashboard separate higher-privilege operations from normal user flows.
- SuperAdminDashboard, AdminAnnouncementSetter, and FeedbackWidget imply moderation, announcements, and platform-level management of submissions or user feedback.
9. Data and service layer
- lib/supabase.ts is the central backend integration point for database and authentication.
- lib/actions/admin.actions.ts and lib/actions/fetch.actions.ts suggest server-side actions that mediate reads/writes between the UI and Supabase.
- lib/drive.ts indicates an additional external storage or retrieval integration, likely for documents/files.
10. Shared UI and presentation system
- components/ contains the reusable shell and layout primitives: header, BottomNav, NavLinks, PageWrapper, theme-provider, theme-toggle, and LiquidGlass.
- components/ui/LoadingSpinner.tsx plus components.json suggest a standardized UI component setup layered on Tailwind CSS.
11. App shell and global concerns
- app/layout.tsx, app/globals.css, and components/theme-provider.tsx define the global shell, styling, and theme behavior.
- GSAPProvider suggests selective animation support in the client-facing experience.
12. Architecture summary for diagramming
- Think of the system as: public content routes and authenticated resource-management routes on top of a shared Next.js UI shell, all backed by Supabase and a file/drive integration.
- The main data flows are: browse/search textbooks, upload/manage vault materials, open file detail pages, and submit feedback or moderation actions through admin tools.
Main entry points: fetch.actions.ts Server actions · layout.tsx App shell · supabase.ts Supabase · page.tsx Textbooks
Components 25
App routes
Next.js App Router boundaries for public, teacher, vault, file, and admin experiences.
- Home · Public landing page and entry point for the education portal.
app/page.tsx - About · Public informational page.
app/about/page.tsx - Textbooks · Discovery and browsing entry for official textbooks and materials.
app/textbooks/page.tsx - Vault · Teacher resource library landing page.
app/vault/page.tsx - Vault item · Individual vault material detail view.
app/vault/[id]/page.tsx - File detail · Dedicated file page for metadata and download actions.
app/file/[id]/page.tsx - Teacher profile · Public educator profile and feedback page.
app/teacher/[name]/page.tsx - Admin · Entry point for privileged admin workflows.
app/admin/page.tsx - Admin dashboard · Higher-privilege moderation and platform management area.
app/admin/dashboard/page.tsx - Dashboard · Authenticated user dashboard area.
app/dashboard/page.tsx - Bookmarks · Saved items and quick access page.
app/bookmarks/page.tsx - Privacy · Legal policy page.
app/privacy/page.tsx - Terms · Legal terms page.
app/terms/page.tsx
Shared UI
Reusable presentation, layout, and interaction components used across routes.
- App shell · Global layout, styling, and site metadata plumbing.
app/layout.tsx - Navigation shell · Header, bottom nav, page wrapper, and shared navigation primitives.
components/header.tsx - Theme system · Theme provider and theme toggle used across the app.
components/theme-provider.tsx - Marketing sections · Reusable public-facing sections for landing and informational pages.
components/HeroSection.tsx - Browse tools · Search, filter, and material card controls for textbook discovery.
components/SearchInput.tsx - Vault tools · Vault grid, content, upload, and material actions for educator resources.
components/VaultGrid.tsx - Teacher tools · Teacher comments, activity, and profile-side widgets.
components/CommentSection.tsx - Admin tools · Admin dashboard, announcement, and feedback widgets.
components/SuperAdminDashboard.tsx - Common UI · Shared utility components such as loading states and visual effects.
components/ui/LoadingSpinner.tsx
Data services
Backend integration, server actions, and shared utilities.
- Server actions · Server-side operations for fetching and admin mutations.
lib/actions/fetch.actions.ts - Supabase · Primary database and authentication integration.
lib/supabase.ts - Drive access · External file storage or retrieval integration for documents.
lib/drive.ts
Connections 23
- App shell → Navigation shell: wraps · Global layout composes shared site chrome.
- App shell → Theme system: provides theme · Layout enables app-wide theming.
- Home → Marketing sections: uses · Landing page is built from reusable marketing sections.
- About → Marketing sections: uses · Informational pages reuse public content sections.
- Textbooks → Browse tools: uses · Textbook discovery relies on search, filtering, and cards.
- Vault → Vault tools: uses · Vault landing page uses resource browsing components.
- Vault item → Vault tools: uses · Vault detail view shares resource action and content patterns.
- File detail → Common UI: uses · File detail page uses shared UI primitives including download flow.
- Teacher profile → Teacher tools: uses · Teacher profile page centers on comments and activity widgets.
- Admin dashboard → Admin tools: uses · Admin dashboard is assembled from moderation and management widgets.
- Dashboard → Navigation shell: uses · Authenticated area shares the common navigation shell.
- Bookmarks → Common UI: uses · Bookmarks page uses shared UI primitives.
- Admin → Server actions: invokes · Admin entry routes into privileged server actions.
- Textbooks → Server actions: fetches · Textbook discovery pulls data through server actions.
- Vault → Server actions: fetches · Vault browsing reads resources via server actions.
- Vault item → Server actions: mutates · Vault item actions may update or manage materials.
- File detail → Drive access: downloads from · File detail pages connect to document retrieval.
- Teacher profile → Supabase: reads/writes · Teacher profile and feedback data are backed by Supabase.
- Admin tools → Supabase: manages · Admin widgets operate on platform data through Supabase.
- Server actions → Supabase: uses · Server actions mediate database and auth operations.
- Server actions → Drive access: uses · Actions coordinate file storage and retrieval.
- App shell → Home: hosts · Root layout surrounds the public entry page.
- App shell → Admin dashboard: hosts · Global shell also frames admin experience.