- Node.js 20+ and npm
- Git for version control
- Code editor (VS Code recommended)
Clone the repository and navigate to the Next.js app:
git clone https://github.com/openml/openml.org.git
cd openml.org/app
npm installRun the development server:
npm run devOpen http://localhost:3000 in your browser.
The Next.js App Router uses a file-based routing system with the following structure:
src/
├── app/ # Next.js App Router (Pages)
│ ├── (pages)/ # Route group
│ │ ├── datasets/
│ │ │ ├── [id]/page.tsx # Single dataset page
│ │ │ └── page.tsx # Datasets list
│ │ ├── tasks/[id]/page.tsx
│ │ ├── flows/[id]/page.tsx
│ │ ├── runs/[id]/page.tsx
│ │ └── layout.tsx
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
│
├── components/
│ ├── ui/ # Reusable UI (shadcn)
│ ├── layout/ # Header, Footer, Sidebar
│ ├── header/ # Search, Notifications, Account
│ ├── home/ # Home page sections
│ ├── dataset/ # Dataset components
│ └── search/ # Search & filters
│
├── hooks/ # Custom React hooks
│
├── types/ # TypeScript types
│ ├── dataset.ts
│ ├── task.ts
│ ├── flow.ts
│ └── run.ts
│
└── lib/
├── api.ts # API client
└── utils.ts # Helper functions
page.tsx- Defines a route's UIlayout.tsx- Shared UI for route segmentsloading.tsx- Loading UI with Suspenseerror.tsx- Error boundary UInot-found.tsx- 404 page
- Use TypeScript for all new files
- Define proper types in
src/types/ - Avoid using
any- use proper types orunknown - Export types that are used across multiple files
- Use functional components with hooks
- Follow the component structure:
import { ... } from '...' interface ComponentProps { // Props definition } export function Component({ prop }: ComponentProps) { // Component logic return ( // JSX ) }
- Use Tailwind CSS for styling
- Follow existing design patterns
- Use the
cn()utility fromlib/utils.tsfor conditional classesimport { cn } from '@/lib/utils' <div className={cn("base-class", condition && "conditional-class")} />
- Components: PascalCase (
DatasetHeader.tsx) - Utilities: kebab-case (
use-entity.ts) - Pages: lowercase (
page.tsx,layout.tsx)
For questions, open an issue on GitHub or ask in team discussions.