- TypeScript 59.8%
- JavaScript 25.2%
- CSS 15%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Amp-Thread-ID: https://ampcode.com/threads/T-01a1d47e-cdb5-72af-b169-fc45b8be05bd Co-authored-by: Aadit Agrawal <[email protected]> |
||
| .github/workflows | ||
| branch-json | ||
| degree-json | ||
| public | ||
| scripts | ||
| src | ||
| tools/oxlint/anti-slop | ||
| .gitignore | ||
| .oxlintrc.json | ||
| _routes.json | ||
| bun.lock | ||
| components.json | ||
| contributing.md | ||
| next.config.ts | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| stylex.config.cjs | ||
| tsconfig.json | ||
| wrangler.jsonc | ||
Course Explorer
A modern course exploration platform built with Next.js, featuring an interactive network graph visualization of course relationships and a clean, responsive UI.
About the Project
Course Explorer is designed to help students and educators visualize and explore course relationships across different academic disciplines. The platform provides an intuitive way to understand course prerequisites, dependencies, and connections through an interactive network graph.
Features
- Interactive Course Network Visualization: Explore course relationships through an interactive graph powered by vis-network
- Advanced Search: Quickly find courses using the command menu with fuzzy search capabilities
- Course Details: View comprehensive information about each course including prerequisites and descriptions
- Dark/Light Mode: Toggle between themes for comfortable viewing
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Modern UI: Built with Radix UI components and Tailwind CSS for a polished user experience
Live Demo
The application is live at: https://courses.coolstuff.work
Technology Stack
- Framework: Next.js 16 with App Router
- Language: TypeScript
- UI Components: Radix UI, shadcn/ui
- Styling: Tailwind CSS
- Visualization: vis-network for course relationship graphs
- Icons: Lucide React
- State Management: React Context API
- Deployment: Vercel
Project Structure
/
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js app routes
│ ├── components/ # Reusable UI components
│ ├── lib/ # Utility functions and types
│ └── styles/ # Global styles
├── branch-json/ # Course data in JSON format
└── ...
Key Components
Network Graph
The interactive network graph visualizes course relationships using force-directed layout. Courses are represented as nodes and relationships as edges, allowing users to explore dependencies and connections.
Command Menu
A powerful search interface that allows users to quickly find courses using fuzzy search. The command menu supports keyboard navigation and provides instant results.
Course Details
Detailed course information including title, code, description, prerequisites, and related courses. The interface is designed to be clean and easy to navigate.
Getting Started
Prerequisites
- Node.js 18+ or Bun 1.0+
- npm, yarn, pnpm, or bun package manager
Installation
# Clone the repository
git clone https://github.com/your-username/course-web.git
cd course-web
# Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Running the Development Server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
Building for Production
npm run build
# or
yarn build
# or
pnpm build
# or
bun run build
Running the Production Server
npm start
# or
yarn start
# or
pnpm start
# or
bun run start
Linting
npm run lint
Deployment
The project deploys to Cloudflare Pages using @cloudflare/next-on-pages:
bun run pages:deploy
The root _routes.json keeps /, /index.html, and /index.rsc outside Pages Functions so homepage requests do not consume the Workers daily request allowance. API routes and dynamic course pages still run through Functions.
On courses.coolstuff.work, a Cloudflare URL Rewrite Rule maps GET and HEAD requests for / with the RSC: 1 header to /index.rsc, preserving the query string. This preserves Next.js client navigation when the homepage is served statically. public/_headers supplies the RSC response's text/x-component content type. Configure the same rewrite when moving the production site to another custom domain.
Navigation links disable automatic prefetching. The deployed Next.js adapter repeatedly refetched visible links while a page was idle, consuming Function requests. Links still fetch their destination when clicked.
Data Structure
Course data is stored in JSON files in the branch-json/ directory. Each file represents a different academic branch and contains:
- Course codes
- Course titles
- Prerequisites
- Descriptions
- Relationships to other courses
Inter-institute electives
branch-json/iie.json combines historical MIT curriculum records with recent public elective-allocation listings and official library archive labels. Every IIE record includes sources (title, URL, and scope) and notes that distinguish historical syllabi, recent allocation evidence, archive labels, and related MAHE certificate courses. Sources are also displayed on the course page and included in the course API response.
The official 2018–2022 Aeronautical course outline contains the historical inter-institute syllabi on PDF pages 26–28 (printed pages 285–287). Its credit structures describe that curriculum, not a guarantee of current credits or availability. Recent allocation evidence comes from the revision-pinned VI and VII semester datasets. Allocation listings establish course codes and titles, not syllabi or credits.
The archive_listing flag identifies public labels in the MIT Central Library question-paper catalogue. Those PDFs require SSO; catalogue labels do not verify internal PDF headings, exact examination dates, syllabi, or credits. Related curriculum with a placeholder code is not assigned to a numeric IIE code without an explicit mapping. Additional search-index excerpts (search_index_excerpt) and readable third-party examination previews (secondary_preview) are qualified individually in notes and sources. Examination coverage is not promoted to a formal syllabus; truncated or blurred material is not completed by inference.
Verified syllabi are stored as separate topic groups in the syllabus array rather than one paragraph per course. Group boundaries follow the subject matter; names, examples, and shared explanations stay together. Splitting topics preserves source wording and order rather than inventing additional units or teaching hours.
Unknown credits remain null, missing syllabi remain empty, and data-quality flags identify incomplete or historical records. A single offering semester is left unknown where the evidence is limited to dated allocation lists or varies by year. Related certificate-course descriptions belong in notes, not the MIT syllabus; related books are not listed as prescribed references without evidence. In particular, historical Yoga (IIE 4307) and recent Yoga (IIE 4324) remain separate until an official equivalence is established. These records do not automatically change any degree's elective pool.
Run bun test src/lib/courses.test.ts to check IIE catalogue and search integration. Run bun scripts/generate-data.ts if static JSON exports are needed; the application and API import the branch data directly.
Development Guidelines
Adding New Courses
- Create a new JSON file in the
branch-json/directory - Follow the existing data structure format
- Update the course data loader in
src/lib/courses.ts
Customizing the UI
- Modify components in the
src/components/directory - Update styles in the
src/styles/StyleX modules andsrc/app/globals.css - Configure theme in
src/components/theme-provider.tsx
Adding New Features
- Create a new branch for your feature
- Implement the feature following existing patterns
- Add appropriate tests
- Update documentation if needed
- Submit a pull request
Contributing
We welcome contributions! Please see our CONTRIBUTING.md file for detailed guidelines on how to contribute to this project.
License
This project is open source and available under the MIT License.
Contact
For questions or support, please open an issue on the GitHub repository.
Acknowledgements
- Built with Next.js
- UI components from Radix UI
- Network visualization powered by vis-network
- Icons from Lucide
Future Roadmap
- Add user authentication
- Implement course bookmarking
- Add course reviews and ratings
- Expand course database
- Add academic planning tools