diff --git a/app/dsoc/projects/[id]/page.tsx b/app/dsoc/projects/[id]/page.tsx
index 5dd8d68..a71e9a8 100644
--- a/app/dsoc/projects/[id]/page.tsx
+++ b/app/dsoc/projects/[id]/page.tsx
@@ -1,937 +1,53 @@
-'use client';
+import type { Metadata } from "next";
+import { cache } from "react";
-import Link from "next/link";
-import { useState, useEffect } from "react";
-import { useParams } from "next/navigation";
-import type { ReactNode } from "react";
-import {
- ArrowLeft,
- Clock,
- Users,
- Calendar,
- Github,
- ExternalLink,
- Linkedin,
- CheckCircle,
- AlertCircle,
- BookOpen,
- Target,
- Code2,
- MessageCircle,
- Star,
- ImageIcon,
- X
-} from "lucide-react";
-import type { LucideIcon } from "lucide-react";
-import { Swiper, SwiperSlide } from "swiper/react";
-import { Navigation, Pagination, Keyboard } from "swiper/modules";
-import { resizedImage } from "@/lib/image-url";
-import "swiper/css";
-import "swiper/css/navigation";
-import "swiper/css/pagination";
-import { Card, container } from "@/components/site/page-kit";
-import DSOCNavbar from "../../components/DSOCNavbar";
+import { getDsocProject } from "@/lib/dsoc-projects";
+import { pageTitle, snippetOf, withSocial } from "@/lib/seo";
+import ProjectDetail from "./project-detail";
+import { SAMPLE_PROJECTS, type Project } from "./project-data";
-interface Mentor {
- _id: string;
- name: string;
- email: string;
- picture?: string;
- company?: string;
- jobTitle?: string;
- bio?: string;
- linkedin?: string;
- github?: string;
-}
+// Read from the database at most once an hour per project
+export const revalidate = 3600;
-interface Project {
- _id: string;
- title: string;
- description: string;
- longDescription?: string;
- organization: string;
- repositoryUrl: string;
- repositoryUrls?: string[];
- websiteUrl?: string;
- timelineUrl?: string;
- difficulty: 'beginner' | 'intermediate' | 'advanced';
- duration: string;
- technologies: string[];
- tags: string[];
- mentors: Mentor[];
- selectedMentees: { _id: string; name: string; picture?: string; university?: string }[];
- maxMentees: number;
- status: string;
- applicationDeadline: string;
- startDate: string;
- endDate: string;
- requirements: string[];
- learningOutcomes: string[];
- milestones: { title: string; description: string; dueDate: string; completed: boolean }[];
- discordChannelId?: string;
- season: string;
- featuredImage?: string;
- gallery?: string[];
+// The samples are built ahead of time. A database project is rendered on its
+// first visit and then kept, so later visitors get it from the cache.
+export function generateStaticParams() {
+ return Object.keys(SAMPLE_PROJECTS).map((id) => ({ id }));
}
-// Sample projects for fallback when API is unavailable
-const SAMPLE_PROJECTS: Record = {
- 'psxworth': {
- _id: 'psxworth',
- title: 'PsxWorth',
- description: 'PsxWorth is a portfolio tracking app for PSX investors. It serves 950+ real users and focuses on simple, clear portfolio tracking with custom dashboards and themes.',
- longDescription: `PsxWorth is a portfolio tracking platform built for PSX investors who want a clearer view of their holdings, performance, and investment decisions. The product already serves 950+ real users, so the contribution work needs to respect an existing production audience while improving the experience.
-
-The project proposal centers on three additions: support for mutual funds, custom dashboards, and custom themes. The current stack uses Next.js, React, TypeScript, Tailwind CSS, shadcn/ui, Radix UI, Clerk, Drizzle ORM, PostgreSQL, TanStack Query, TanStack Table, PostHog, Upstash Redis, AI SDK, ApexCharts, Recharts, React Hook Form, and Zod. The backend is based on NestJS, though it is not open source yet.
-
-The goal is to help investors in Pakistan make better decisions and keep portfolio tracking simple, clear, and useful. Project images and Loom video will be added later.`,
- organization: 'Dev Weekends',
- repositoryUrl: 'https://github.com/Wajahat43/psxworth',
- websiteUrl: 'https://psxworth.com',
- difficulty: 'intermediate',
- duration: '10-12 weeks',
- technologies: ['Next.js', 'React', 'TypeScript', 'Tailwind CSS', 'shadcn/ui', 'Radix UI', 'Clerk', 'Drizzle ORM', 'PostgreSQL', 'TanStack Query', 'TanStack Table', 'PostHog', 'Upstash Redis', 'AI SDK', 'ApexCharts', 'Recharts', 'React Hook Form', 'Zod'],
- tags: ['fintech', 'portfolio-tracking', 'dashboard', 'open-source', 'psx'],
- mentors: [
- {
- _id: 'mentor-psx-1',
- name: 'Wajahat Islam Gul',
- email: 'amina@devweekends.org',
- company: 'Nector Social',
- jobTitle: 'Software Engineer',
-
- linkedin: 'https://www.linkedin.com/in/wajahatx1/',
- github: 'https://github.com/Wajahat43'
- },
-
- ],
- selectedMentees: [],
- maxMentees: 3,
- status: 'open',
- applicationDeadline: '2026-05-25',
- startDate: '2026-06-01',
- endDate: '2026-08-31',
- requirements: [
- 'JavaScript/TypeScript fundamentals',
- 'Experience with React and Next.js',
- 'Comfort with PostgreSQL and ORM-based data access',
- 'Ability to work with dashboards and analytics-heavy UIs',
- 'Ability to commit 10-15 hours per week'
- ],
- learningOutcomes: [
- 'Build dashboards for portfolio and performance tracking',
- 'Model financial data and reporting workflows in PostgreSQL',
- 'Implement clean, themeable interfaces with modern UI libraries',
- 'Work with analytics, tables, and chart-heavy product interfaces',
- 'Understand how to extend an existing product used by real users'
- ],
- milestones: [
- { title: 'Data Model Review', description: 'Understand the current portfolio model and map the mutual fund extension plan', dueDate: '2026-06-15', completed: false },
- { title: 'Custom Dashboard Layouts', description: 'Build configurable dashboard views for different investor needs', dueDate: '2026-06-30', completed: false },
- { title: 'Theme System', description: 'Add custom themes and polish visual consistency across key screens', dueDate: '2026-07-15', completed: false },
- { title: 'Mutual Funds Support', description: 'Extend portfolio tracking to include mutual fund data and display', dueDate: '2026-07-31', completed: false },
- { title: 'Analytics & Release', description: 'Refine charts, reports, and UX details before final review', dueDate: '2026-08-31', completed: false }
- ],
- season: 'DSOC 2026'
- },
- 'voiceybill': {
- _id: 'voiceybill',
- title: 'VoiceyBill',
- description: 'VoiceyBill is an open source AI-powered finance tracker that lets people log income and expenses by voice, receipt scan, or manual entry.\nIt uses Gemini and UpliftAI to classify transactions, supports CSV imports and recurring entries, and keeps the experience fast for multilingual users.\nThe product is designed around a responsive, multi-theme UI with analytics and monthly reports.',
- longDescription: `VoiceyBill is an open source, AI-powered personal finance platform designed for multilingual users who want to track money without fighting a form. It supports voice commands, receipt scanning, manual entry, CSV import, recurring transactions, analytics dashboards, and monthly email reports.
-
-The project is built on the MERN stack with TypeScript and integrates Google Gemini AI and UpliftAI to classify transactions from voice and image inputs. The codebase is split across a web frontend and a backend service, and DSOC contributors will extend it with expense splitting, budget planning, AI-powered financial insights, forecasting, and multi-currency support.`,
- organization: 'Dev Weekends',
- repositoryUrl: 'https://github.com/voiceyBill/voiceyBill-web',
- websiteUrl: 'https://www.voiceybill.com/',
- difficulty: 'intermediate',
- duration: '10-12 weeks',
- technologies: ['MongoDB', 'Express.js', 'React', 'Node.js', 'TypeScript', 'Google Gemini AI', 'UpliftAI', 'Cloudinary', 'Redux Toolkit', 'RTK Query'],
- tags: ['full-stack', 'ai', 'finance', 'voice-input', 'open-source'],
- mentors: [
- {
- _id: 'mentor-1',
- name: 'Ahad Ali',
- email: 'alex@devweekends.org',
- linkedin: 'https://www.linkedin.com/in/ahadalireach/',
- github: 'https://github.com/ahadalireach'
- }
- ],
- selectedMentees: [],
- maxMentees: 3,
- status: 'open',
- applicationDeadline: '2026-05-25',
- startDate: '2026-06-01',
- endDate: '2026-08-31',
- requirements: [
- 'JavaScript/TypeScript fundamentals',
- 'Experience with React or Node.js',
- 'Familiarity with MongoDB and REST APIs',
- 'Comfort with Git and GitHub',
- 'Ability to commit 10-15 hours per week'
- ],
- learningOutcomes: [
- 'Build a production-style MERN application with AI integrations',
- 'Implement voice and receipt-based transaction workflows',
- 'Model financial data in MongoDB and build aggregation queries',
- 'Create dashboards, reports, and notification flows',
- 'Add multi-currency and internationalization support'
- ],
- milestones: [
- { title: 'Voice Logging Pipeline', description: 'Build microphone capture, transcription, and transaction classification flow', dueDate: '2026-06-15', completed: false },
- { title: 'Receipt Scanning', description: 'Add image upload and Gemini-based receipt extraction', dueDate: '2026-06-30', completed: false },
- { title: 'CSV Import & Recurring Transactions', description: 'Support bulk imports and automated scheduled entries', dueDate: '2026-07-15', completed: false },
- { title: 'Analytics & Monthly Reports', description: 'Finish dashboards, charts, and email summaries', dueDate: '2026-07-31', completed: false },
- { title: 'Budgeting & Multi-Currency', description: 'Deliver smart alerts, insights, splitting, and currency support', dueDate: '2026-08-31', completed: false }
- ],
- season: 'DSOC 2026'
- },
- 'pathment': {
- _id: 'pathment',
- title: 'Pathment',
- description: 'Pathment is a SaaS mentorship platform for organizations that want structured, mentor-guided employee training.\nIt connects mentees with real mentors, uses task-based workflows and progress tracking, and adds gamification to boost engagement and measurable outcomes.',
- longDescription: `Pathment is a SaaS-based mentorship platform built for organizations and learning teams that want to run structured, mentor-guided programs. The platform centers on three roles (Admin, Mentor, and Mentee) and supports multi-level programs, mentor matching, task submission with feedback, gamification, and analytics to measure learning outcomes.
-
- The codebase is a monorepo consisting of a public marketing site, a backend server (Node.js + Express + PostgreSQL with Sequelize), and a Next.js + TypeScript client interface. An AI layer (Groq/OpenAI) can generate personalized roadmaps and weekly task breakdowns, saving curriculum design time for admins. Real-time messaging is implemented with Socket.IO, and media is handled via Cloudinary. The project is contributor-friendly with many beginner-friendly issues: UI polish, accessibility, email templates, stricter API validation, test coverage, seed/demo data, and analytics improvements.`,
- organization: 'Dev Weekends',
- repositoryUrl: 'https://github.com/Sheryar-Ahmed/pathment.git',
- websiteUrl: 'https://pathment.me/',
- difficulty: 'intermediate',
- duration: '10-12 weeks',
- technologies: ['Next.js', 'TypeScript', 'Node.js', 'Express', 'PostgreSQL', 'Sequelize', 'Socket.io', 'Tailwind CSS', 'Tiptap', 'Cloudinary'],
- tags: ['full-stack', 'real-time', 'developer-tools', 'collaboration'],
- mentors: [
- {
- _id: 'mentor-1',
- name: 'Alex Chen',
- email: 'alex@devweekends.org',
- company: 'GitHub',
- jobTitle: 'Senior Software Engineer',
- bio: 'Full-stack developer with 8+ years of experience building developer tools.',
- linkedin: 'https://linkedin.com/in/alexchen',
- github: 'https://github.com/alexchen'
- },
- {
- _id: 'mentor-2',
- name: 'Sarah Williams',
- email: 'sarah@devweekends.org',
- company: 'Vercel',
- jobTitle: 'Staff Engineer',
- bio: 'Passionate about building performant web applications and mentoring developers.',
- linkedin: 'https://linkedin.com/in/sarahwilliams',
- github: 'https://github.com/sarahwilliams'
- }
- ],
- selectedMentees: [],
- maxMentees: 3,
- status: 'open',
- applicationDeadline: '2026-05-25',
- startDate: '2026-06-01',
- endDate: '2026-08-31',
- requirements: [
- 'JavaScript/TypeScript fundamentals',
- 'Experience with React or Next.js',
- 'Familiarity with REST APIs and relational databases',
- 'Comfort with Git and GitHub',
- 'Ability to commit 10-15 hours per week'
- ],
- learningOutcomes: [
- 'Build full-stack web applications with Next.js and Express',
- 'Implement role-based flows (Admin/Mentor/Mentee) and task workflows',
- 'Integrate real-time messaging with Socket.IO',
- 'Work with relational databases (PostgreSQL + Sequelize)',
- 'Add AI-assisted roadmap generation and analytics dashboards'
- ],
- milestones: [
- { title: 'Project Setup & Onboarding', description: 'Get the monorepo running locally, seed demo data, and familiarise with architecture', dueDate: '2026-06-15', completed: false },
- { title: 'Mentor Matching & Task Flow', description: 'Implement mentor assignment, task creation, and submission/feedback loop', dueDate: '2026-06-30', completed: false },
- { title: 'AI Roadmap Integration', description: 'Add AI-generated roadmap/task suggestions for program levels', dueDate: '2026-07-15', completed: false },
- { title: 'Real-time Messaging & Notifications', description: 'Enhance Socket.IO messaging and notification delivery', dueDate: '2026-07-31', completed: false },
- { title: 'Analytics & Deploy', description: 'Complete admin analytics, polish UI, and deploy the marketing site', dueDate: '2026-08-31', completed: false }
- ],
- season: 'DSOC 2026'
- },
- 'goalslot': {
- _id: 'goalslot',
- title: 'GoalSlot',
- description: "GoalSlot connects goals to your calendar and tracks every hour you work on them.",
- longDescription: `GoalSlot is a productivity-focused project that helps users connect goals to scheduled work and measure actual time spent. Contributors will refine calendar syncing, time tracking, analytics, and onboarding flows while keeping the experience simple and useful.
-
-The project is designed to be practical and contributor-friendly, with a focus on clear workflows, useful reporting, and a polished interface. It is a strong fit for mentees who want to work on scheduling, productivity UX, and data-driven product features.`,
- organization: 'Dev Weekends',
- repositoryUrl: 'https://github.com/ZeeshanAdilButt/goal-slot-web',
- websiteUrl: 'https://www.goalslot.io/',
- difficulty: 'intermediate',
- duration: '8-12 weeks',
- technologies: ['Next.js', 'NestJS', 'TypeScript'],
- tags: ['productivity', 'calendar', 'time-tracking', 'open-source'],
- mentors: [
- {
- _id: 'mentor-goalslot-1',
- name: 'Wajahat Islam Gul',
- email: 'amina@devweekends.org',
- company: 'Nector Social',
- jobTitle: 'Software Engineer',
- linkedin: 'https://www.linkedin.com/in/wajahatx1/',
- github: 'https://github.com/Wajahat43'
- }
- ],
- selectedMentees: [],
- maxMentees: 3,
- status: 'open',
- applicationDeadline: '2026-06-30',
- startDate: '2026-07-01',
- endDate: '2026-09-30',
- requirements: [
- 'Familiarity with React and Next.js',
- 'Comfort with TypeScript',
- 'Willingness to work with calendar integrations and APIs',
- 'Ability to commit 8-12 hours per week'
- ],
- learningOutcomes: [
- 'Implement calendar syncing and time-tracking features',
- 'Build end-to-end features across Next.js and NestJS',
- 'Design analytics and reporting for goal progress'
- ],
- milestones: [
- { title: 'Onboarding & Setup', description: 'Get the monorepo and local dev environment working', dueDate: '2026-07-07', completed: false },
- { title: 'Calendar Sync', description: 'Implement calendar integration and event mapping', dueDate: '2026-08-01', completed: false },
- { title: 'Time Tracking UI', description: 'Add time tracking flows and analytics dashboards', dueDate: '2026-08-31', completed: false }
- ],
- season: 'DSOC 2026'
- },
-};
-
-export default function ProjectDetailPage({ params }: { params: Promise<{ id: string }> }) {
- const routeParams = useParams<{ id: string }>();
- const projectId = routeParams?.id;
- const [project, setProject] = useState(null);
- const [loading, setLoading] = useState(true);
- const [error, setError] = useState('');
- const [isMentee, setIsMentee] = useState(null);
- const [lightboxImage, setLightboxImage] = useState(null);
-
- const getRepoLabel = (url: string) => {
- try {
- const path = new URL(url).pathname;
- const parts = path.split('/').filter(Boolean);
- if (parts.length >= 2) {
- return parts.slice(-2).join('/');
- }
- return 'Repository';
- } catch {
- return 'Repository';
- }
- };
-
- const repoUrls = project
- ? Array.isArray(project.repositoryUrls) && project.repositoryUrls.length > 0
- ? project.repositoryUrls
- : (project.repositoryUrl ? [project.repositoryUrl] : [])
- : [];
-
- useEffect(() => {
- fetchProject();
- checkMenteeSession();
- }, [projectId]);
-
- const checkMenteeSession = async () => {
- try {
- const res = await fetch('/api/dsoc/mentee/me', { credentials: 'include' });
- const data = await res.json();
- setIsMentee(Boolean(data?.success));
- } catch (err) {
- console.error('Error checking mentee session:', err);
- setIsMentee(false);
- }
- };
-
- const fetchProject = async () => {
- if (!projectId) {
- setLoading(true);
- return;
- }
-
- // Check for sample project first
- if (SAMPLE_PROJECTS[projectId]) {
- setProject(SAMPLE_PROJECTS[projectId]);
- setLoading(false);
- return;
- }
-
- try {
- const res = await fetch(`/api/dsoc/projects/${projectId}`);
- const data = await res.json();
-
- if (data.success) {
- setProject(data.data);
- } else {
- setError(data.error || 'Project not found');
- }
- } catch (err) {
- console.error('Error fetching project:', err);
- setError('Failed to load project');
- } finally {
- setLoading(false);
- }
- };
-
- /** Difficulty in black and white: outline for beginner, grey fill for intermediate, black fill for advanced. */
- const getDifficultyColor = (difficulty: string) => {
- switch (difficulty) {
- case 'beginner': return 'border border-[#D4D4D4] bg-white text-[#404040]';
- case 'advanced': return 'border border-[#0A0A0A] bg-[#0A0A0A] text-white';
- default: return 'border border-[#E6E6E6] bg-[#E6E6E6] text-[#262626]';
- }
- };
-
- const getStatusColor = (status: string) => {
- switch (status) {
- case 'open': return 'border border-[#0A0A0A] bg-[#0A0A0A] text-white';
- case 'in-progress': return 'border border-[#E6E6E6] bg-[#E6E6E6] text-[#262626]';
- default: return 'border border-[#D4D4D4] bg-white text-[#404040]';
- }
- };
-
- const formatDate = (dateString: string) => {
- return new Date(dateString).toLocaleDateString('en-US', {
- year: 'numeric',
- month: 'long',
- day: 'numeric'
- });
- };
-
- const getDeadlineEnd = (dateValue: string | Date) => {
- if (dateValue instanceof Date) {
- return new Date(
- dateValue.getUTCFullYear(),
- dateValue.getUTCMonth(),
- dateValue.getUTCDate(),
- 23,
- 59,
- 59,
- 999
- );
- }
-
- const [year, month, day] = dateValue.slice(0, 10).split('-').map(Number);
-
- if (!year || !month || !day) {
- return new Date(dateValue);
- }
-
- return new Date(year, month - 1, day, 23, 59, 59, 999);
- };
-
- const isDeadlinePassed = project ? new Date() > getDeadlineEnd(project.applicationDeadline) : false;
- const spotsRemaining = project ? project.maxMentees - (project.selectedMentees?.length || 0) : 0;
- const canApply = project ? project.status === 'open' && !isDeadlinePassed && spotsRemaining > 0 : false;
-
-
-
- if (loading) {
- return (
-
- );
- }
-
- if (error || !project) {
- return (
-
-
-
-
-
Project Not Found
-
{error || 'The project you\'re looking for doesn\'t exist.'}
-
-
- Back to Projects
-
-
-
- );
+type Props = { params: Promise<{ id: string }> };
+
+/**
+ * A real project from the database, or one of the built-in samples by its short
+ * name. Cached for the request, so the metadata and the page share one read.
+ */
+const loadProject = cache(
+ async (id: string): Promise<{ project: Project | null; sample: boolean; unavailable: boolean }> => {
+ if (SAMPLE_PROJECTS[id]) return { project: SAMPLE_PROJECTS[id], sample: true, unavailable: false };
+ const found = await getDsocProject(id);
+ return { project: (found ?? null) as Project | null, sample: false, unavailable: found === undefined };
}
-
- return (
-
-
- {lightboxImage && (
-
setLightboxImage(null)}
- className="fixed inset-0 z-[200] flex cursor-zoom-out items-center justify-center bg-black/80 p-4"
- >
-
setLightboxImage(null)}
- aria-label="Close image"
- className="absolute right-4 top-4 flex h-11 w-11 items-center justify-center rounded-full bg-white text-[#0A0A0A] transition-colors hover:bg-[#E6E6E6]"
- >
-
-
- {/* eslint-disable-next-line @next/next/no-img-element */}
-
e.stopPropagation()}
- />
-
- )}
-
- {/* Header */}
-
-
-
-
- Back to Projects
-
-
-
-
- {project.organization}
-
-
- {project.status}
-
-
- {project.difficulty}
-
-
-
- {project.title}
-
-
- {project.description}
-
-
-
-
-
-
- {/* Main Content */}
-
-
-
- {/* Left Column - Main Content */}
-
- {/* Technologies */}
-
- Technologies
-
- {project.technologies.map((tech, i) => (
-
- {tech}
-
- ))}
-
-
-
- {/* Gallery */}
- {Array.isArray(project.gallery) && project.gallery.length > 0 && (
-
- Gallery
-
-
1}
- spaceBetween={0}
- slidesPerView={1}
- className="w-full"
- >
- {project.gallery.map((url, i) => (
-
- setLightboxImage(url)}
- className="block w-full cursor-zoom-in border-0 bg-transparent p-0"
- aria-label={`Open gallery image ${i + 1}`}
- >
- {/* eslint-disable-next-line @next/next/no-img-element */}
-
-
-
- ))}
-
-
-
- )}
-
- {/* Long Description */}
- {project.longDescription && (
-
- About This Project
- {project.longDescription}
-
- )}
-
- {/* Requirements */}
- {project.requirements && project.requirements.length > 0 && (
-
- Requirements
-
- {project.requirements.map((req, i) => (
-
-
- {req}
-
- ))}
-
-
- )}
-
- {/* Learning Outcomes */}
- {project.learningOutcomes && project.learningOutcomes.length > 0 && (
-
- What You'll Learn
-
- {project.learningOutcomes.map((outcome, i) => (
-
-
- {i + 1}
-
- {outcome}
-
- ))}
-
-
- )}
-
- {/* Milestones */}
- {project.milestones && project.milestones.length > 0 && (
-
- Project Milestones
-
- {project.milestones.map((milestone, i) => (
-
-
-
-
- {milestone.completed && (
-
- )}
- {milestone.title}
-
-
{milestone.description}
-
- {milestone.dueDate && (
-
- {formatDate(milestone.dueDate)}
-
- )}
-
-
- ))}
-
-
- )}
-
- {/* Mentors */}
-
- Mentors
-
- {project.mentors.map((mentor) => (
-
-
-
- {mentor.picture ? (
- // eslint-disable-next-line @next/next/no-img-element
-
- ) : (
- mentor.name.charAt(0)
- )}
-
-
-
{mentor.name}
- {mentor.jobTitle && (
-
- {mentor.jobTitle}
- {mentor.company && ` @ ${mentor.company}`}
-
- )}
- {mentor.bio && (
-
{mentor.bio}
- )}
-
- {mentor.github && (
-
-
-
- )}
- {mentor.linkedin && (
-
-
-
- )}
-
-
-
-
- ))}
-
-
-
-
- {/* Right Column - Sidebar */}
-
- {/* Apply Card */}
-
-
Apply to This Project
-
-
-
-
Duration
-
-
- {project.duration}
-
-
-
-
Spots Available
-
-
- {spotsRemaining} / {project.maxMentees}
-
-
-
-
Deadline
-
- {formatDate(project.applicationDeadline)}
-
-
-
-
Start Date
- {formatDate(project.startDate)}
-
-
-
End Date
- {formatDate(project.endDate)}
-
-
-
- {canApply ? (
- isMentee === null ? (
-
- Checking eligibility...
-
- ) : isMentee ? (
-
- Apply Now
-
- ) : (
-
- Apply as Mentee First
-
- )
- ) : (
-
- {isDeadlinePassed ? 'Deadline Passed' :
- spotsRemaining <= 0 ? 'No Spots Available' :
- 'Applications Closed'}
-
- )}
-
-
- By applying, you agree to commit {project.duration} to this project
-
-
-
- {/* Star Card */}
-
-
-
-
Support This Project
-
-
- Love this project? Show your support by starring the repository on GitHub! It helps increase visibility, motivates the mentors, and grows our open-source community.
-
-
-
-
- {project.timelineUrl && (
-
-
-
-
-
- Project Timeline
-
-
- See the full schedule, milestones, and key dates before you apply.
-
-
-
- New
-
-
-
- View Timeline
-
-
- )}
-
- {/* Discord Card */}
-
-
- Have Questions?
-
- Join our Discord to chat with mentors and other mentees
-
-
- Join Discord
-
-
-
- {/* Tags */}
- {project.tags && project.tags.length > 0 && (
-
- Tags
-
- {project.tags.map((tag, i) => (
-
- #{tag}
-
- ))}
-
-
- )}
-
-
-
-
-
- );
-}
-
-const primaryButton =
- "inline-flex min-h-[52px] items-center justify-center gap-2 rounded-xl bg-[#0A0A0A] px-7 py-4 text-base font-semibold text-white transition-colors hover:bg-[#262626]";
-
-const secondaryButton =
- "inline-flex min-h-[52px] items-center justify-center gap-2 rounded-xl border border-[#D4D4D4] px-7 py-4 text-base font-semibold text-[#0A0A0A] transition-colors hover:bg-[#F7F7F7]";
-
-const sidebarButton =
- "flex min-h-[52px] w-full items-center justify-center rounded-xl px-7 py-4 text-base font-semibold transition-colors";
-
-/** Swiper is themed through its own CSS variables and class names, so the black and white overrides live here. */
-const galleryClasses = [
- "overflow-hidden rounded-[14px] border border-[#E6E6E6] bg-white",
- "[--swiper-theme-color:#0A0A0A] [--swiper-navigation-size:16px]",
- "[&_.swiper-button-prev]:!h-11 [&_.swiper-button-prev]:!w-11 [&_.swiper-button-prev]:rounded-full [&_.swiper-button-prev]:bg-white [&_.swiper-button-prev]:shadow-md",
- "[&_.swiper-button-next]:!h-11 [&_.swiper-button-next]:!w-11 [&_.swiper-button-next]:rounded-full [&_.swiper-button-next]:bg-white [&_.swiper-button-next]:shadow-md",
- "[&_.swiper-pagination]:!relative [&_.swiper-pagination]:!bottom-auto [&_.swiper-pagination]:!py-3 [&_.swiper-pagination]:bg-white",
-].join(" ");
-
-function BlockTitle({ icon: Icon, children }: { icon: LucideIcon; children: ReactNode }) {
- return (
-
-
- {children}
-
- );
+);
+
+export async function generateMetadata({ params }: Props): Promise {
+ const { id } = await params;
+ const { project, sample, unavailable } = await loadProject(id);
+ // The database could not be read: the browser will load the project, so say nothing against indexing it
+ if (unavailable) return { title: "DSOC project", alternates: { canonical: `/dsoc/projects/${id}` } };
+ if (!project) return { title: "DSOC project", robots: { index: false, follow: true } };
+
+ return withSocial({
+ title: pageTitle(`${project.title}: DSOC project`),
+ description: snippetOf(project.description),
+ alternates: { canonical: `/dsoc/projects/${id}` },
+ // The samples stand in when the database is unreachable and repeat real
+ // projects, so they stay out of search
+ ...(sample ? { robots: { index: false, follow: true } } : {}),
+ });
}
-function IconTile({ icon: Icon }: { icon: LucideIcon }) {
- return (
-
-
-
- );
+export default async function ProjectPage({ params }: Props) {
+ const { id } = await params;
+ const { project } = await loadProject(id);
+ return ;
}
diff --git a/app/dsoc/projects/[id]/project-data.ts b/app/dsoc/projects/[id]/project-data.ts
new file mode 100644
index 0000000..c7433bb
--- /dev/null
+++ b/app/dsoc/projects/[id]/project-data.ts
@@ -0,0 +1,275 @@
+/**
+ * The shape of a DSOC project and the built-in sample projects, shared by the
+ * server page (which reads them to render the first HTML) and the client view.
+ */
+
+export interface Mentor {
+ _id: string;
+ name: string;
+ /** Only present when the project came from the API, never shown */
+ email?: string;
+ picture?: string;
+ company?: string;
+ jobTitle?: string;
+ bio?: string;
+ linkedin?: string;
+ github?: string;
+}
+
+export interface Project {
+ _id: string;
+ title: string;
+ description: string;
+ longDescription?: string;
+ organization: string;
+ repositoryUrl: string;
+ repositoryUrls?: string[];
+ websiteUrl?: string;
+ timelineUrl?: string;
+ difficulty: 'beginner' | 'intermediate' | 'advanced';
+ duration: string;
+ technologies: string[];
+ tags: string[];
+ mentors: Mentor[];
+ selectedMentees: { _id: string; name: string; picture?: string; university?: string }[];
+ maxMentees: number;
+ status: string;
+ applicationDeadline: string;
+ startDate: string;
+ endDate: string;
+ requirements: string[];
+ learningOutcomes: string[];
+ milestones: { title: string; description: string; dueDate: string; completed: boolean }[];
+ discordChannelId?: string;
+ season: string;
+ featuredImage?: string;
+ gallery?: string[];
+}
+
+// Sample projects for fallback when API is unavailable
+export const SAMPLE_PROJECTS: Record = {
+ 'psxworth': {
+ _id: 'psxworth',
+ title: 'PsxWorth',
+ description: 'PsxWorth is a portfolio tracking app for PSX investors. It serves 950+ real users and focuses on simple, clear portfolio tracking with custom dashboards and themes.',
+ longDescription: `PsxWorth is a portfolio tracking platform built for PSX investors who want a clearer view of their holdings, performance, and investment decisions. The product already serves 950+ real users, so the contribution work needs to respect an existing production audience while improving the experience.
+
+The project proposal centers on three additions: support for mutual funds, custom dashboards, and custom themes. The current stack uses Next.js, React, TypeScript, Tailwind CSS, shadcn/ui, Radix UI, Clerk, Drizzle ORM, PostgreSQL, TanStack Query, TanStack Table, PostHog, Upstash Redis, AI SDK, ApexCharts, Recharts, React Hook Form, and Zod. The backend is based on NestJS, though it is not open source yet.
+
+The goal is to help investors in Pakistan make better decisions and keep portfolio tracking simple, clear, and useful. Project images and Loom video will be added later.`,
+ organization: 'Dev Weekends',
+ repositoryUrl: 'https://github.com/Wajahat43/psxworth',
+ websiteUrl: 'https://psxworth.com',
+ difficulty: 'intermediate',
+ duration: '10-12 weeks',
+ technologies: ['Next.js', 'React', 'TypeScript', 'Tailwind CSS', 'shadcn/ui', 'Radix UI', 'Clerk', 'Drizzle ORM', 'PostgreSQL', 'TanStack Query', 'TanStack Table', 'PostHog', 'Upstash Redis', 'AI SDK', 'ApexCharts', 'Recharts', 'React Hook Form', 'Zod'],
+ tags: ['fintech', 'portfolio-tracking', 'dashboard', 'open-source', 'psx'],
+ mentors: [
+ {
+ _id: 'mentor-psx-1',
+ name: 'Wajahat Islam Gul',
+ email: 'amina@devweekends.org',
+ company: 'Nector Social',
+ jobTitle: 'Software Engineer',
+
+ linkedin: 'https://www.linkedin.com/in/wajahatx1/',
+ github: 'https://github.com/Wajahat43'
+ },
+
+ ],
+ selectedMentees: [],
+ maxMentees: 3,
+ status: 'open',
+ applicationDeadline: '2026-05-25',
+ startDate: '2026-06-01',
+ endDate: '2026-08-31',
+ requirements: [
+ 'JavaScript/TypeScript fundamentals',
+ 'Experience with React and Next.js',
+ 'Comfort with PostgreSQL and ORM-based data access',
+ 'Ability to work with dashboards and analytics-heavy UIs',
+ 'Ability to commit 10-15 hours per week'
+ ],
+ learningOutcomes: [
+ 'Build dashboards for portfolio and performance tracking',
+ 'Model financial data and reporting workflows in PostgreSQL',
+ 'Implement clean, themeable interfaces with modern UI libraries',
+ 'Work with analytics, tables, and chart-heavy product interfaces',
+ 'Understand how to extend an existing product used by real users'
+ ],
+ milestones: [
+ { title: 'Data Model Review', description: 'Understand the current portfolio model and map the mutual fund extension plan', dueDate: '2026-06-15', completed: false },
+ { title: 'Custom Dashboard Layouts', description: 'Build configurable dashboard views for different investor needs', dueDate: '2026-06-30', completed: false },
+ { title: 'Theme System', description: 'Add custom themes and polish visual consistency across key screens', dueDate: '2026-07-15', completed: false },
+ { title: 'Mutual Funds Support', description: 'Extend portfolio tracking to include mutual fund data and display', dueDate: '2026-07-31', completed: false },
+ { title: 'Analytics & Release', description: 'Refine charts, reports, and UX details before final review', dueDate: '2026-08-31', completed: false }
+ ],
+ season: 'DSOC 2026'
+ },
+ 'voiceybill': {
+ _id: 'voiceybill',
+ title: 'VoiceyBill',
+ description: 'VoiceyBill is an open source AI-powered finance tracker that lets people log income and expenses by voice, receipt scan, or manual entry.\nIt uses Gemini and UpliftAI to classify transactions, supports CSV imports and recurring entries, and keeps the experience fast for multilingual users.\nThe product is designed around a responsive, multi-theme UI with analytics and monthly reports.',
+ longDescription: `VoiceyBill is an open source, AI-powered personal finance platform designed for multilingual users who want to track money without fighting a form. It supports voice commands, receipt scanning, manual entry, CSV import, recurring transactions, analytics dashboards, and monthly email reports.
+
+The project is built on the MERN stack with TypeScript and integrates Google Gemini AI and UpliftAI to classify transactions from voice and image inputs. The codebase is split across a web frontend and a backend service, and DSOC contributors will extend it with expense splitting, budget planning, AI-powered financial insights, forecasting, and multi-currency support.`,
+ organization: 'Dev Weekends',
+ repositoryUrl: 'https://github.com/voiceyBill/voiceyBill-web',
+ websiteUrl: 'https://www.voiceybill.com/',
+ difficulty: 'intermediate',
+ duration: '10-12 weeks',
+ technologies: ['MongoDB', 'Express.js', 'React', 'Node.js', 'TypeScript', 'Google Gemini AI', 'UpliftAI', 'Cloudinary', 'Redux Toolkit', 'RTK Query'],
+ tags: ['full-stack', 'ai', 'finance', 'voice-input', 'open-source'],
+ mentors: [
+ {
+ _id: 'mentor-1',
+ name: 'Ahad Ali',
+ email: 'alex@devweekends.org',
+ linkedin: 'https://www.linkedin.com/in/ahadalireach/',
+ github: 'https://github.com/ahadalireach'
+ }
+ ],
+ selectedMentees: [],
+ maxMentees: 3,
+ status: 'open',
+ applicationDeadline: '2026-05-25',
+ startDate: '2026-06-01',
+ endDate: '2026-08-31',
+ requirements: [
+ 'JavaScript/TypeScript fundamentals',
+ 'Experience with React or Node.js',
+ 'Familiarity with MongoDB and REST APIs',
+ 'Comfort with Git and GitHub',
+ 'Ability to commit 10-15 hours per week'
+ ],
+ learningOutcomes: [
+ 'Build a production-style MERN application with AI integrations',
+ 'Implement voice and receipt-based transaction workflows',
+ 'Model financial data in MongoDB and build aggregation queries',
+ 'Create dashboards, reports, and notification flows',
+ 'Add multi-currency and internationalization support'
+ ],
+ milestones: [
+ { title: 'Voice Logging Pipeline', description: 'Build microphone capture, transcription, and transaction classification flow', dueDate: '2026-06-15', completed: false },
+ { title: 'Receipt Scanning', description: 'Add image upload and Gemini-based receipt extraction', dueDate: '2026-06-30', completed: false },
+ { title: 'CSV Import & Recurring Transactions', description: 'Support bulk imports and automated scheduled entries', dueDate: '2026-07-15', completed: false },
+ { title: 'Analytics & Monthly Reports', description: 'Finish dashboards, charts, and email summaries', dueDate: '2026-07-31', completed: false },
+ { title: 'Budgeting & Multi-Currency', description: 'Deliver smart alerts, insights, splitting, and currency support', dueDate: '2026-08-31', completed: false }
+ ],
+ season: 'DSOC 2026'
+ },
+ 'pathment': {
+ _id: 'pathment',
+ title: 'Pathment',
+ description: 'Pathment is a SaaS mentorship platform for organizations that want structured, mentor-guided employee training.\nIt connects mentees with real mentors, uses task-based workflows and progress tracking, and adds gamification to boost engagement and measurable outcomes.',
+ longDescription: `Pathment is a SaaS-based mentorship platform built for organizations and learning teams that want to run structured, mentor-guided programs. The platform centers on three roles (Admin, Mentor, and Mentee) and supports multi-level programs, mentor matching, task submission with feedback, gamification, and analytics to measure learning outcomes.
+
+ The codebase is a monorepo consisting of a public marketing site, a backend server (Node.js + Express + PostgreSQL with Sequelize), and a Next.js + TypeScript client interface. An AI layer (Groq/OpenAI) can generate personalized roadmaps and weekly task breakdowns, saving curriculum design time for admins. Real-time messaging is implemented with Socket.IO, and media is handled via Cloudinary. The project is contributor-friendly with many beginner-friendly issues: UI polish, accessibility, email templates, stricter API validation, test coverage, seed/demo data, and analytics improvements.`,
+ organization: 'Dev Weekends',
+ repositoryUrl: 'https://github.com/Sheryar-Ahmed/pathment.git',
+ websiteUrl: 'https://pathment.me/',
+ difficulty: 'intermediate',
+ duration: '10-12 weeks',
+ technologies: ['Next.js', 'TypeScript', 'Node.js', 'Express', 'PostgreSQL', 'Sequelize', 'Socket.io', 'Tailwind CSS', 'Tiptap', 'Cloudinary'],
+ tags: ['full-stack', 'real-time', 'developer-tools', 'collaboration'],
+ mentors: [
+ {
+ _id: 'mentor-1',
+ name: 'Alex Chen',
+ email: 'alex@devweekends.org',
+ company: 'GitHub',
+ jobTitle: 'Senior Software Engineer',
+ bio: 'Full-stack developer with 8+ years of experience building developer tools.',
+ linkedin: 'https://linkedin.com/in/alexchen',
+ github: 'https://github.com/alexchen'
+ },
+ {
+ _id: 'mentor-2',
+ name: 'Sarah Williams',
+ email: 'sarah@devweekends.org',
+ company: 'Vercel',
+ jobTitle: 'Staff Engineer',
+ bio: 'Passionate about building performant web applications and mentoring developers.',
+ linkedin: 'https://linkedin.com/in/sarahwilliams',
+ github: 'https://github.com/sarahwilliams'
+ }
+ ],
+ selectedMentees: [],
+ maxMentees: 3,
+ status: 'open',
+ applicationDeadline: '2026-05-25',
+ startDate: '2026-06-01',
+ endDate: '2026-08-31',
+ requirements: [
+ 'JavaScript/TypeScript fundamentals',
+ 'Experience with React or Next.js',
+ 'Familiarity with REST APIs and relational databases',
+ 'Comfort with Git and GitHub',
+ 'Ability to commit 10-15 hours per week'
+ ],
+ learningOutcomes: [
+ 'Build full-stack web applications with Next.js and Express',
+ 'Implement role-based flows (Admin/Mentor/Mentee) and task workflows',
+ 'Integrate real-time messaging with Socket.IO',
+ 'Work with relational databases (PostgreSQL + Sequelize)',
+ 'Add AI-assisted roadmap generation and analytics dashboards'
+ ],
+ milestones: [
+ { title: 'Project Setup & Onboarding', description: 'Get the monorepo running locally, seed demo data, and familiarise with architecture', dueDate: '2026-06-15', completed: false },
+ { title: 'Mentor Matching & Task Flow', description: 'Implement mentor assignment, task creation, and submission/feedback loop', dueDate: '2026-06-30', completed: false },
+ { title: 'AI Roadmap Integration', description: 'Add AI-generated roadmap/task suggestions for program levels', dueDate: '2026-07-15', completed: false },
+ { title: 'Real-time Messaging & Notifications', description: 'Enhance Socket.IO messaging and notification delivery', dueDate: '2026-07-31', completed: false },
+ { title: 'Analytics & Deploy', description: 'Complete admin analytics, polish UI, and deploy the marketing site', dueDate: '2026-08-31', completed: false }
+ ],
+ season: 'DSOC 2026'
+ },
+ 'goalslot': {
+ _id: 'goalslot',
+ title: 'GoalSlot',
+ description: "GoalSlot connects goals to your calendar and tracks every hour you work on them.",
+ longDescription: `GoalSlot is a productivity-focused project that helps users connect goals to scheduled work and measure actual time spent. Contributors will refine calendar syncing, time tracking, analytics, and onboarding flows while keeping the experience simple and useful.
+
+The project is designed to be practical and contributor-friendly, with a focus on clear workflows, useful reporting, and a polished interface. It is a strong fit for mentees who want to work on scheduling, productivity UX, and data-driven product features.`,
+ organization: 'Dev Weekends',
+ repositoryUrl: 'https://github.com/ZeeshanAdilButt/goal-slot-web',
+ websiteUrl: 'https://www.goalslot.io/',
+ difficulty: 'intermediate',
+ duration: '8-12 weeks',
+ technologies: ['Next.js', 'NestJS', 'TypeScript'],
+ tags: ['productivity', 'calendar', 'time-tracking', 'open-source'],
+ mentors: [
+ {
+ _id: 'mentor-goalslot-1',
+ name: 'Wajahat Islam Gul',
+ email: 'amina@devweekends.org',
+ company: 'Nector Social',
+ jobTitle: 'Software Engineer',
+ linkedin: 'https://www.linkedin.com/in/wajahatx1/',
+ github: 'https://github.com/Wajahat43'
+ }
+ ],
+ selectedMentees: [],
+ maxMentees: 3,
+ status: 'open',
+ applicationDeadline: '2026-06-30',
+ startDate: '2026-07-01',
+ endDate: '2026-09-30',
+ requirements: [
+ 'Familiarity with React and Next.js',
+ 'Comfort with TypeScript',
+ 'Willingness to work with calendar integrations and APIs',
+ 'Ability to commit 8-12 hours per week'
+ ],
+ learningOutcomes: [
+ 'Implement calendar syncing and time-tracking features',
+ 'Build end-to-end features across Next.js and NestJS',
+ 'Design analytics and reporting for goal progress'
+ ],
+ milestones: [
+ { title: 'Onboarding & Setup', description: 'Get the monorepo and local dev environment working', dueDate: '2026-07-07', completed: false },
+ { title: 'Calendar Sync', description: 'Implement calendar integration and event mapping', dueDate: '2026-08-01', completed: false },
+ { title: 'Time Tracking UI', description: 'Add time tracking flows and analytics dashboards', dueDate: '2026-08-31', completed: false }
+ ],
+ season: 'DSOC 2026'
+ },
+};
diff --git a/app/dsoc/projects/[id]/project-detail.tsx b/app/dsoc/projects/[id]/project-detail.tsx
new file mode 100644
index 0000000..13e8cf6
--- /dev/null
+++ b/app/dsoc/projects/[id]/project-detail.tsx
@@ -0,0 +1,679 @@
+'use client';
+
+import Link from "next/link";
+import { useState, useEffect } from "react";
+import { useParams } from "next/navigation";
+import type { ReactNode } from "react";
+import {
+ ArrowLeft,
+ Clock,
+ Users,
+ Calendar,
+ Github,
+ ExternalLink,
+ Linkedin,
+ CheckCircle,
+ AlertCircle,
+ BookOpen,
+ Target,
+ Code2,
+ MessageCircle,
+ Star,
+ ImageIcon,
+ X
+} from "lucide-react";
+import type { LucideIcon } from "lucide-react";
+import { Swiper, SwiperSlide } from "swiper/react";
+import { Navigation, Pagination, Keyboard } from "swiper/modules";
+import { resizedImage } from "@/lib/image-url";
+import "swiper/css";
+import "swiper/css/navigation";
+import "swiper/css/pagination";
+import { Card, container } from "@/components/site/page-kit";
+import DSOCNavbar from "../../components/DSOCNavbar";
+
+import { SAMPLE_PROJECTS, type Project } from "./project-data";
+
+/**
+ * The project view. `initialProject` is the project as the server read it, so
+ * the first HTML already holds the title and description. Without it (the
+ * database was unreachable on the server) the project is loaded here instead.
+ */
+export default function ProjectDetail({ initialProject }: { initialProject: Project | null }) {
+ const routeParams = useParams<{ id: string }>();
+ const projectId = routeParams?.id;
+ const [project, setProject] = useState(initialProject);
+ const [loading, setLoading] = useState(!initialProject);
+ const [error, setError] = useState('');
+ const [isMentee, setIsMentee] = useState(null);
+ const [lightboxImage, setLightboxImage] = useState(null);
+
+ const getRepoLabel = (url: string) => {
+ try {
+ const path = new URL(url).pathname;
+ const parts = path.split('/').filter(Boolean);
+ if (parts.length >= 2) {
+ return parts.slice(-2).join('/');
+ }
+ return 'Repository';
+ } catch {
+ return 'Repository';
+ }
+ };
+
+ const repoUrls = project
+ ? Array.isArray(project.repositoryUrls) && project.repositoryUrls.length > 0
+ ? project.repositoryUrls
+ : (project.repositoryUrl ? [project.repositoryUrl] : [])
+ : [];
+
+ useEffect(() => {
+ fetchProject();
+ checkMenteeSession();
+ }, [projectId]);
+
+ const checkMenteeSession = async () => {
+ try {
+ const res = await fetch('/api/dsoc/mentee/me', { credentials: 'include' });
+ const data = await res.json();
+ setIsMentee(Boolean(data?.success));
+ } catch (err) {
+ console.error('Error checking mentee session:', err);
+ setIsMentee(false);
+ }
+ };
+
+ const fetchProject = async () => {
+ // Already here from the server
+ if (initialProject) return;
+ if (!projectId) {
+ setLoading(true);
+ return;
+ }
+
+ // Check for sample project first
+ if (SAMPLE_PROJECTS[projectId]) {
+ setProject(SAMPLE_PROJECTS[projectId]);
+ setLoading(false);
+ return;
+ }
+
+ try {
+ const res = await fetch(`/api/dsoc/projects/${projectId}`);
+ const data = await res.json();
+
+ if (data.success) {
+ setProject(data.data);
+ } else {
+ setError(data.error || 'Project not found');
+ }
+ } catch (err) {
+ console.error('Error fetching project:', err);
+ setError('Failed to load project');
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ /** Difficulty in black and white: outline for beginner, grey fill for intermediate, black fill for advanced. */
+ const getDifficultyColor = (difficulty: string) => {
+ switch (difficulty) {
+ case 'beginner': return 'border border-[#D4D4D4] bg-white text-[#404040]';
+ case 'advanced': return 'border border-[#0A0A0A] bg-[#0A0A0A] text-white';
+ default: return 'border border-[#E6E6E6] bg-[#E6E6E6] text-[#262626]';
+ }
+ };
+
+ const getStatusColor = (status: string) => {
+ switch (status) {
+ case 'open': return 'border border-[#0A0A0A] bg-[#0A0A0A] text-white';
+ case 'in-progress': return 'border border-[#E6E6E6] bg-[#E6E6E6] text-[#262626]';
+ default: return 'border border-[#D4D4D4] bg-white text-[#404040]';
+ }
+ };
+
+ const formatDate = (dateString: string) => {
+ // Dates are stored as a calendar day at midnight UTC. Reading them in UTC
+ // shows that day to every visitor, and the same text on the server and in the browser.
+ return new Date(dateString).toLocaleDateString('en-US', {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ timeZone: 'UTC'
+ });
+ };
+
+ const getDeadlineEnd = (dateValue: string | Date) => {
+ if (dateValue instanceof Date) {
+ return new Date(
+ dateValue.getUTCFullYear(),
+ dateValue.getUTCMonth(),
+ dateValue.getUTCDate(),
+ 23,
+ 59,
+ 59,
+ 999
+ );
+ }
+
+ const [year, month, day] = dateValue.slice(0, 10).split('-').map(Number);
+
+ if (!year || !month || !day) {
+ return new Date(dateValue);
+ }
+
+ return new Date(year, month - 1, day, 23, 59, 59, 999);
+ };
+
+ const isDeadlinePassed = project ? new Date() > getDeadlineEnd(project.applicationDeadline) : false;
+ const spotsRemaining = project ? project.maxMentees - (project.selectedMentees?.length || 0) : 0;
+ const canApply = project ? project.status === 'open' && !isDeadlinePassed && spotsRemaining > 0 : false;
+
+
+
+ if (loading) {
+ return (
+
+ );
+ }
+
+ if (error || !project) {
+ return (
+
+
+
+
+
Project Not Found
+
{error || 'The project you\'re looking for doesn\'t exist.'}
+
+
+ Back to Projects
+
+
+
+ );
+ }
+
+ return (
+
+
+ {lightboxImage && (
+
setLightboxImage(null)}
+ className="fixed inset-0 z-[200] flex cursor-zoom-out items-center justify-center bg-black/80 p-4"
+ >
+
setLightboxImage(null)}
+ aria-label="Close image"
+ className="absolute right-4 top-4 flex h-11 w-11 items-center justify-center rounded-full bg-white text-[#0A0A0A] transition-colors hover:bg-[#E6E6E6]"
+ >
+
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
e.stopPropagation()}
+ />
+
+ )}
+
+ {/* Header */}
+
+
+
+
+ Back to Projects
+
+
+
+
+ {project.organization}
+
+
+ {project.status}
+
+
+ {project.difficulty}
+
+
+
+ {project.title}
+
+
+ {project.description}
+
+
+
+
+
+
+ {/* Main Content */}
+
+
+
+ {/* Left Column - Main Content */}
+
+ {/* Technologies */}
+
+ Technologies
+
+ {project.technologies.map((tech, i) => (
+
+ {tech}
+
+ ))}
+
+
+
+ {/* Gallery */}
+ {Array.isArray(project.gallery) && project.gallery.length > 0 && (
+
+ Gallery
+
+
1}
+ spaceBetween={0}
+ slidesPerView={1}
+ className="w-full"
+ >
+ {project.gallery.map((url, i) => (
+
+ setLightboxImage(url)}
+ className="block w-full cursor-zoom-in border-0 bg-transparent p-0"
+ aria-label={`Open gallery image ${i + 1}`}
+ >
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+
+
+ ))}
+
+
+
+ )}
+
+ {/* Long Description */}
+ {project.longDescription && (
+
+ About This Project
+ {project.longDescription}
+
+ )}
+
+ {/* Requirements */}
+ {project.requirements && project.requirements.length > 0 && (
+
+ Requirements
+
+ {project.requirements.map((req, i) => (
+
+
+ {req}
+
+ ))}
+
+
+ )}
+
+ {/* Learning Outcomes */}
+ {project.learningOutcomes && project.learningOutcomes.length > 0 && (
+
+ What You'll Learn
+
+ {project.learningOutcomes.map((outcome, i) => (
+
+
+ {i + 1}
+
+ {outcome}
+
+ ))}
+
+
+ )}
+
+ {/* Milestones */}
+ {project.milestones && project.milestones.length > 0 && (
+
+ Project Milestones
+
+ {project.milestones.map((milestone, i) => (
+
+
+
+
+ {milestone.completed && (
+
+ )}
+ {milestone.title}
+
+
{milestone.description}
+
+ {milestone.dueDate && (
+
+ {formatDate(milestone.dueDate)}
+
+ )}
+
+
+ ))}
+
+
+ )}
+
+ {/* Mentors */}
+
+ Mentors
+
+ {project.mentors.map((mentor) => (
+
+
+
+ {mentor.picture ? (
+ // eslint-disable-next-line @next/next/no-img-element
+
+ ) : (
+ mentor.name.charAt(0)
+ )}
+
+
+
{mentor.name}
+ {mentor.jobTitle && (
+
+ {mentor.jobTitle}
+ {mentor.company && ` @ ${mentor.company}`}
+
+ )}
+ {mentor.bio && (
+
{mentor.bio}
+ )}
+
+ {mentor.github && (
+
+
+
+ )}
+ {mentor.linkedin && (
+
+
+
+ )}
+
+
+
+
+ ))}
+
+
+
+
+ {/* Right Column - Sidebar */}
+
+ {/* Apply Card */}
+
+
Apply to This Project
+
+
+
+
Duration
+
+
+ {project.duration}
+
+
+
+
Spots Available
+
+
+ {spotsRemaining} / {project.maxMentees}
+
+
+
+
Deadline
+
+ {formatDate(project.applicationDeadline)}
+
+
+
+
Start Date
+ {formatDate(project.startDate)}
+
+
+
End Date
+ {formatDate(project.endDate)}
+
+
+
+ {canApply ? (
+ isMentee === null ? (
+
+ Checking eligibility...
+
+ ) : isMentee ? (
+
+ Apply Now
+
+ ) : (
+
+ Apply as Mentee First
+
+ )
+ ) : (
+
+ {isDeadlinePassed ? 'Deadline Passed' :
+ spotsRemaining <= 0 ? 'No Spots Available' :
+ 'Applications Closed'}
+
+ )}
+
+
+ By applying, you agree to commit {project.duration} to this project
+
+
+
+ {/* Star Card */}
+
+
+
+
Support This Project
+
+
+ Love this project? Show your support by starring the repository on GitHub! It helps increase visibility, motivates the mentors, and grows our open-source community.
+
+
+
+
+ {project.timelineUrl && (
+
+
+
+
+
+ Project Timeline
+
+
+ See the full schedule, milestones, and key dates before you apply.
+
+
+
+ New
+
+
+
+ View Timeline
+
+
+ )}
+
+ {/* Discord Card */}
+
+
+ Have Questions?
+
+ Join our Discord to chat with mentors and other mentees
+
+
+ Join Discord
+
+
+
+ {/* Tags */}
+ {project.tags && project.tags.length > 0 && (
+
+ Tags
+
+ {project.tags.map((tag, i) => (
+
+ #{tag}
+
+ ))}
+
+
+ )}
+
+
+
+
+
+ );
+}
+
+const primaryButton =
+ "inline-flex min-h-[52px] items-center justify-center gap-2 rounded-xl bg-[#0A0A0A] px-7 py-4 text-base font-semibold text-white transition-colors hover:bg-[#262626]";
+
+const secondaryButton =
+ "inline-flex min-h-[52px] items-center justify-center gap-2 rounded-xl border border-[#D4D4D4] px-7 py-4 text-base font-semibold text-[#0A0A0A] transition-colors hover:bg-[#F7F7F7]";
+
+const sidebarButton =
+ "flex min-h-[52px] w-full items-center justify-center rounded-xl px-7 py-4 text-base font-semibold transition-colors";
+
+/** Swiper is themed through its own CSS variables and class names, so the black and white overrides live here. */
+const galleryClasses = [
+ "overflow-hidden rounded-[14px] border border-[#E6E6E6] bg-white",
+ "[--swiper-theme-color:#0A0A0A] [--swiper-navigation-size:16px]",
+ "[&_.swiper-button-prev]:!h-11 [&_.swiper-button-prev]:!w-11 [&_.swiper-button-prev]:rounded-full [&_.swiper-button-prev]:bg-white [&_.swiper-button-prev]:shadow-md",
+ "[&_.swiper-button-next]:!h-11 [&_.swiper-button-next]:!w-11 [&_.swiper-button-next]:rounded-full [&_.swiper-button-next]:bg-white [&_.swiper-button-next]:shadow-md",
+ "[&_.swiper-pagination]:!relative [&_.swiper-pagination]:!bottom-auto [&_.swiper-pagination]:!py-3 [&_.swiper-pagination]:bg-white",
+].join(" ");
+
+function BlockTitle({ icon: Icon, children }: { icon: LucideIcon; children: ReactNode }) {
+ return (
+
+
+ {children}
+
+ );
+}
+
+function IconTile({ icon: Icon }: { icon: LucideIcon }) {
+ return (
+
+
+
+ );
+}
diff --git a/app/feed/feed-wall.tsx b/app/feed/feed-wall.tsx
index fed8e98..d128d8a 100644
--- a/app/feed/feed-wall.tsx
+++ b/app/feed/feed-wall.tsx
@@ -252,7 +252,7 @@ export function FeedWall({
tagged #DevWeekends
-
+
Export CSV
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 7089cee..65155c9 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -3,6 +3,7 @@ import path from 'path'
import matter from 'gray-matter'
import { MetadataRoute } from 'next'
+import { listDsocProjects } from '@/lib/dsoc-projects'
import { SITE_URL } from '@/lib/seo'
const baseUrl = SITE_URL
@@ -66,7 +67,10 @@ function contentEntries(folder: 'blog' | 'guides', priority: number): MetadataRo
})
}
-export default function sitemap(): MetadataRoute.Sitemap {
+// Rebuilt hourly so a new DSOC project appears without a deploy
+export const revalidate = 3600
+
+export default async function sitemap(): Promise {
// Static pages carry no lastModified: claiming every page changed "now" on each
// build tells search engines nothing. Posts and guides use their real dates.
const staticPages = pages.map((entry) => ({
@@ -75,5 +79,12 @@ export default function sitemap(): MetadataRoute.Sitemap {
priority: entry.priority,
}))
- return [...staticPages, ...contentEntries('blog', 0.6), ...contentEntries('guides', 0.6)]
+ const projects = (await listDsocProjects()).map((project) => ({
+ url: `${baseUrl}/dsoc/projects/${project.id}`,
+ lastModified: project.updatedAt,
+ changeFrequency: 'weekly' as const,
+ priority: 0.5,
+ }))
+
+ return [...staticPages, ...projects, ...contentEntries('blog', 0.6), ...contentEntries('guides', 0.6)]
}
diff --git a/lib/dsoc-projects.ts b/lib/dsoc-projects.ts
new file mode 100644
index 0000000..10a19da
--- /dev/null
+++ b/lib/dsoc-projects.ts
@@ -0,0 +1,45 @@
+import connectDB from '@/lib/db'
+import '@/models/DSOCMentor'
+import '@/models/DSOCMentee'
+import { DSOCProject } from '@/models/DSOCProject'
+
+/**
+ * DSOC projects read on the server, so a project page arrives with its
+ * content already in the HTML and search engines can read it. Both functions
+ * give up quietly when the database cannot be reached: the page then loads the
+ * project in the browser, as it always did.
+ */
+
+const OBJECT_ID = /^[a-f0-9]{24}$/i
+
+/**
+ * One active project as plain data. `null` means there is no such project;
+ * `undefined` means the database could not be read, which is not the same
+ * thing. Mentor email addresses are left out of the page.
+ */
+export async function getDsocProject(id: string): Promise | null | undefined> {
+ if (!OBJECT_ID.test(id)) return null
+ try {
+ await connectDB()
+ const project = await DSOCProject.findOne({ _id: id, isActive: true })
+ .populate('mentors', 'name picture company jobTitle bio linkedin github')
+ .populate('selectedMentees', 'name picture university')
+ .lean()
+ return project ? JSON.parse(JSON.stringify(project)) : null
+ } catch (error) {
+ console.error('Could not read the DSOC project on the server:', error)
+ return undefined
+ }
+}
+
+/** Ids of the active projects with the date each last changed, for the sitemap */
+export async function listDsocProjects(): Promise<{ id: string; updatedAt?: Date }[]> {
+ try {
+ await connectDB()
+ const projects = await DSOCProject.find({ isActive: true }).select('_id updatedAt').lean()
+ return projects.map((project) => ({ id: String(project._id), updatedAt: project.updatedAt }))
+ } catch (error) {
+ console.error('Could not list DSOC projects for the sitemap:', error)
+ return []
+ }
+}
diff --git a/next.config.js b/next.config.js
index 3455c64..c503751 100644
--- a/next.config.js
+++ b/next.config.js
@@ -85,6 +85,8 @@ const nextConfig = {
return [
{ source: '/:path*', headers: securityHeaders },
{ source: '/team', headers: [{ key: 'Link', value: discoveryLinkHeader }] },
+ // A slide template speakers download: reachable, but not a page for search results
+ { source: '/brand/session-template.html', headers: [{ key: 'X-Robots-Tag', value: 'noindex' }] },
...brandAssetFolders.map((folder) => ({
source: `/${folder}/${staticFile}`,
headers: brandAssetCache,
diff --git a/public/reports/fellowship-2025-impact-report.html b/public/reports/fellowship-2025-impact-report.html
index 7089e9a..8d248fb 100644
--- a/public/reports/fellowship-2025-impact-report.html
+++ b/public/reports/fellowship-2025-impact-report.html
@@ -4,6 +4,15 @@
Dev Weekends Fellowship 2025 Report
+
+
+
+
+
+
+
+
+