feat: finalize academy redesign and production readiness
All checks were successful
CI / Validate frontend and API (push) Successful in 2m22s
CI / Build and publish Docker images (push) Successful in 1m6s

Align admin, community, search, library, learning and course management with the mockup. Add saved courses, download history, public community feed, instructor directory, backend search, course views, admin content tools and community moderation. Harden API and Nginx for production.
This commit is contained in:
Cauê Faleiros
2026-11-05 15:06:53 -03:00
parent 95a4bd4ac7
commit 21085e887d
99 changed files with 10749 additions and 3935 deletions

48
pages/ExplorePage.tsx Normal file
View File

@@ -0,0 +1,48 @@
import React from 'react';
import { CircleNotchIcon } from '@phosphor-icons/react';
import { Hero } from '../components/catalog/Hero';
import { Shelf } from '../components/catalog/Shelf';
import { ContinueCard, CourseCard, TrailPoster } from '../components/catalog/Artwork';
import { useCatalog } from '../context/CatalogContext';
import { useAuth } from '../context/AuthContext';
import { paths } from '../lib/routes';
import { useIsMobile } from '../hooks/useMediaQuery';
export const ExplorePage: React.FC = () => {
const { courses, paths: trails, areas, isLoading, failed } = useCatalog();
const { user } = useAuth();
const isMobile = useIsMobile();
const going = user ? courses.filter((course) => (course.progress || 0) > 0 && (course.progress || 0) < 100) : [];
const mostWatched = courses.length > 0 && (
<Shelf title="Mais assistidos" to={paths.search}>
{[...courses].sort((a, b) => (b.views || 0) - (a.views || 0)).slice(0, 10).map((course) => <CourseCard key={course.id} course={course} />)}
</Shelf>
);
const trailsShelf = trails.length > 0 && (
<Shelf title="Trilhas" to={paths.trails} kind="tall">
{trails.map((trail) => <TrailPoster key={trail.id} path={trail} />)}
</Shelf>
);
return (
<>
<Hero />
<main className="wrap page has-hero enter">
{isLoading && <div className="loading"><CircleNotchIcon className="ph spin" /></div>}
{!isLoading && failed && <p className="empty">Não foi possível carregar os cursos. Tente novamente em instantes.</p>}
{!isLoading && !failed && courses.length === 0 && <p className="empty">Ainda não há cursos publicados.</p>}
{going.length > 0 && (
<Shelf title="Continue assistindo" to={paths.learning} kind="wide">
{going.map((course) => <ContinueCard key={course.id} course={course} />)}
</Shelf>
)}
{isMobile ? <>{trailsShelf}{mostWatched}</> : <>{mostWatched}{trailsShelf}</>}
{areas.map((area) => (
<Shelf key={area} title={area} to={`${paths.search}?area=${encodeURIComponent(area)}`}>
{courses.filter((course) => course.category === area).map((course) => <CourseCard key={course.id} course={course} />)}
</Shelf>
))}
</main>
</>
);
};