Code Calendar is a Next.js web application for tracking upcoming and past programming contests from Codeforces, CodeChef, and LeetCode. It features contest filtering and bookmarking.
- View upcoming and past contests from multiple platforms.
- Filter contests by platform and date range.
- Bookmark contests for quick access.
- Responsive UI with dark/light theme toggle.
- Node.js (v18+ recommended)
- npm
-
Clone the repository:
git clone https://github.com/yourusername/code-calendar.git cd code-calendar -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env.localfile and add:NEXT_PUBLIC_ADMIN_USERNAME=admin NEXT_PUBLIC_ADMIN_PASSWORD=password123 API_CONTESTS_URL=http://localhost:3001/contests -
Start the backend API server:
node src/lib/api.mjs
-
Start the Next.js development server:
npm run dev
-
Open http://localhost:3000 in your browser.
src/app/– Next.js app directory (pages, layout, global styles)src/components/– UI components (contest table, tracker, theme, etc.)src/components/ui/– Reusable UI primitives (button, card, table, etc.)src/lib/– Utility functions and API server
- The backend API is implemented in
src/lib/api.mjs. - Endpoints:
/contests– Get all contests./contests/:platform– Get contests by platform.
- UI is built with shadcn/ui and Tailwind CSS.
- Theme switching is provided via next-themes.