-
-
Unit {index + 1} -
-
- {moment.duration(unit.duration).humanize()}
-
+
+ {/* Course Outline */}
+
+
+ Course Outline
+
+
+ {course.units?.map((unit: Unit, index) => (
+
+
+
+ Unit {index + 1} -{" "}
+ {moment
+ .duration(unit.duration)
+ .humanize()}
+
+
+
+ {unit.title}
+
+
{unit.description}
+ {unit.assignments?.map(
+ (assignment: Assignment) => (
+
+ ),
+ )}
+ ))}
+
+
-
{unit.title}
-
{unit.description}
- {unit.assignments?.map((assignment: Assignment) => (
-
- ))}
+
+
+ {/* Certificate */}
+
+ Complete this course to earn your verified
+ certificate
+
+
+
+
+
+ Certificate of Completion
+
+
+ Lorem ipsum dolor sit amet, consectetur
+ adipiscing elit. Sed pellentesque, purus sit
+ amet luctus venenatis, elit erat pretium
+ enim, nec ultricies lacus nunc nec nulla.
+ Nullam nec est ut sapien.
+
+
- ))}
-
+
+
+
);
diff --git a/frontend/src/app/courses/page.tsx b/frontend/src/app/courses/page.tsx
index b41926e..4b8a8fe 100644
--- a/frontend/src/app/courses/page.tsx
+++ b/frontend/src/app/courses/page.tsx
@@ -1,10 +1,6 @@
-import Link from "next/link";
-import { type Prisma } from "@prisma/client";
import { computeCourseDuration } from "@/lib/utils";
-
-type Course = Prisma.CourseGetPayload<{
- include: { instructor: true };
-}> & { duration: number };
+import { type Course } from "@/types";
+import CourseCard from "./CourseCard";
export const dynamic = "force-dynamic";
@@ -19,42 +15,7 @@ export default async function Courses() {
return (
{courses.map((course: Course) => (
-
-
-
- {course.difficulty}
-
-
- {course.duration}
-
-
-
-
![{course.title}]({course.thumbnail})
-
-
- {course.title}
-
-
- {course.shortDescription}
-
-
-
-
- {course?.instructor?.name}
-
-
-
+
))}
);
diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx
index d05f8ee..2e02573 100644
--- a/frontend/src/app/layout.tsx
+++ b/frontend/src/app/layout.tsx
@@ -22,8 +22,9 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
- title: "Create Next App",
- description: "Generated by create next app",
+ title: "BrightPath",
+ description:
+ "BrightPath is a custom platform for online courses covering niche tech topics not currently addressed elsewhere.",
};
export default async function RootLayout({
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx
index 0419e7f..1e8fe11 100644
--- a/frontend/src/app/page.tsx
+++ b/frontend/src/app/page.tsx
@@ -1,102 +1,100 @@
-"use client";
-import Image from "next/image";
+import { type Course } from "@/types";
+import CourseCard from "./courses/CourseCard";
-export default function Home() {
- return (
-
-
-
-
- -
- Get started by editing{" "}
-
- src/app/page.tsx
-
- .
-
- - Save and see your changes instantly.
-
+const getPopularCourses = async () => {
+ const res = await fetch(process.env.BACKEND_API_URL + "/courses/popular");
+
+ if (!res.ok) {
+ return [];
+ }
+
+ return await res.json();
+};
+
+export const dynamic = "force-dynamic";
+export default async function Home() {
+ const popularCourses = await getPopularCourses();
-
-
-
- Deploy now
-
-
- Read our docs
-
+ return (
+ <>
+ {/* Hero Section */}
+
+
+
+ Welcome to BrightPath!
+
+
+ Ready to take your dev journey deeper? Learn by doing,
+ with hands-on project-based exercises, and stand out
+ from the crowd with specialized knowledge and skills.
+
+
+ The BrightPath platform and courses
+ were created by a multidisciplinary team of software
+ development professionals in order to give back to our
+ community as we learn in public.
+
-
-
-
+
+
+
+ {/* Courses Section */}
+
+ BrightPath Courses
+
+ {popularCourses.map((course: Course) => (
+
+ ))}
+
+
+
+ {/* Testimonials */}
+
+ Testimonials
+
+ {[
+ "Zuaida really kept our team on track.",
+ "Joseph does a great job demonstrating tech tools.",
+ "BrightPath is a great place to grow as a developer.",
+ ].map((testimonial, idx) => (
+
+ {testimonial}
+
+ ))}
+
+
+
+ {/* Certification */}
+
+ Certified learning.
+
+
+
John Doe
+
+ Has successfully completed all coursework and
+ assignments for the course
+
+
+ Bring Your App to Life with Tailwind Motion
+
+
+
+
+ Our verified certificates highlight your
+ specialization and skills.
+
+
+
+
+ >
);
}
diff --git a/frontend/src/types.d.ts b/frontend/src/types.d.ts
new file mode 100644
index 0000000..f3e824c
--- /dev/null
+++ b/frontend/src/types.d.ts
@@ -0,0 +1,5 @@
+import { Prisma } from "@prisma/client";
+
+export type Course = Prisma.CourseGetPayload<{
+ include: { instructor: true };
+}> & { duration: number };
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 72771c2..1a14510 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -23,6 +23,12 @@
"auth": ["./src/auth"]
}
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "include": [
+ "next-env.d.ts",
+ "./src/types.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
"exclude": ["node_modules", "tests"]
}