A new Next.js-based frontend for the Network Data Exchange (NDEx) platform, providing a user-friendly interface for network biology data management, sharing, and visualization.
NDEx3 is a complete rewrite of the NDEx frontend using web technologies including Next.js, TypeScript, and Tailwind CSS. It provides users with tools to manage, share, and explore biological network data through an intuitive web interface.
- π Keycloak Authentication - Secure user authentication and authorization
- π Network Management - Upload, organize, and manage biological networks
- π Folder Organization - Hierarchical organization of networks and data
- π Advanced Search - Search networks and users across the platform
- π¨ Modern UI - Responsive design with dark/light theme support
- π Dynamic Content - Configurable home page content from external sources
- π Performance Optimized - Built with Next.js App Router for optimal performance
NDEx3 features a dynamic content configuration system that allows updating home page content without code deployments:
- Remote Configuration: Content fetched from external JSON files
- Direct Browser Fetching: No server-side proxies needed
- Four Content Types: Featured content carousel, featured networks, blog content, and logo carousel
- Error Handling: Comprehensive fallback states for content loading failures
See CONTENT_SYSTEM_README.md and CONTENT_CONFIGURATION.md for detailed documentation.
- Node.js 18+
- npm, yarn, pnpm, or bun
-
Clone the repository
git clone https://github.com/ndexbio/ndex3.git cd ndex3 -
Install dependencies
npm install
-
Configure the application
Copy and customize the configuration:
cp public/config-example-root.json public/config.json
Edit
public/config.jsonwith your settings:{ "ndexBaseUrl": "your-ndex-server.com", "keycloakConfig": { "url": "https://your-keycloak-server/auth", "clientId": "your-client-id", "realm": "your-realm" }, "uiContent": { "contentRootPath": "https://your-content-server.com/content/v1", "featuredContent": "featured_content.json", "featuredNetwork": "featured_networks.json", "mainContent": "main.json", "logos": "logos.json" } } -
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
NDEx3 follows a modern Next.js App Router architecture with a focus on feature-based colocation, server components, and static export compatibility.
public/ # Static assets and configuration
βββ config.json # Application configuration
βββ config-example-root.json # Configuration template
src/
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout with providers
β βββ page.tsx # Root page (home + client-side routing)
β βββ loading.tsx # Global loading UI
β βββ error.tsx # Global error boundary
β β
β βββ _components/ # Home page components (feature-based)
β β
β βββ search/ # Search feature
β β βββ page.tsx
β β βββ loading.tsx
β β βββ error.tsx
β β βββ _components/ # Search-specific components
β β
β βββ my-account/ # Account management feature
β β βββ page.tsx
β β βββ loading.tsx
β β βββ error.tsx
β β βββ _components/ # Account-specific components
β β
β βββ folders/[uuid]/ # Dynamic folder feature
β β βββ page.tsx
β β βββ loading.tsx
β β βββ error.tsx
β β
β βββ (other features...)
β
βββ components/ # Shared React components
β βββ ui/ # Base UI components (shadcn/ui)
β βββ SearchBox.tsx # Example shared component
β βββ UserAvatar.tsx # Example shared component
β
βββ hooks/ # Custom React hooks (e.g., use-network-search)
β
βββ lib/ # Utilities, API clients, and contexts
β βββ api/ # API clients (NDEx, content service)
β βββ contexts/ # React contexts (Config, Keycloak)
β βββ utils/ # Utility functions
β
βββ stores/ # State management (Zustand)
β
βββ types/ # TypeScript type definitions
- Feature-Based Colocation: Components are located with the features that use them (
src/app/[feature]/_components/), improving maintainability. - Shared Components: Truly shared components reside in
src/components/. - Hybrid Routing: Due to
output: 'export'for static deployment, the app uses a hybrid routing strategy:- File-System Routing: For all static routes (
/search,/my-account). - Client-Side Routing: The root
page.tsxhandles dynamic routes with unlimited UUIDs (/folders/[uuid]) that cannot be pre-generated.
- File-System Routing: For all static routes (
- Loading & Error Boundaries: Each route has its own
loading.tsxanderror.tsxfor a resilient and user-friendly experience, leveraging React Suspense and Error Boundaries automatically. - Static Export: The application is optimized for static hosting, with
output: 'export'configured innext.config.ts.
See ROUTING_REFACTOR_PLAN.md for a detailed breakdown of the routing architecture.
The main configuration file defines:
- ndexBaseUrl: NDEx server URL
- keycloakConfig: Authentication server settings
- uiContent: Dynamic content configuration
- urlBaseName: Optional URL base path
Content is fetched from external JSON files defined in the uiContent configuration:
- contentRootPath: Base URL for all content files
- Content files:
featured_content.json,featured_networks.json,main.json,logos.json
Build and export the application for static hosting:
npm run buildThe exported files will be in the out/ directory.
For Apache deployments, see APACHE_STATIC_DEPLOYMENT.md for detailed configuration instructions.
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Modern UI component library
- SWR - Data fetching with caching
- Keycloak - Authentication and authorization
- Zustand - Lightweight state management
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript checks
NDEx3 uses Keycloak for authentication. Configure your Keycloak server details in the keycloakConfig section of public/config.json.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
CONTENT_SYSTEM_README.md- Content system overviewCONTENT_CONFIGURATION.md- Detailed content configurationAPACHE_STATIC_DEPLOYMENT.md- Apache deployment guideROUTING_REFACTOR_PLAN.md- Application routing documentation
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions, please contact the NDEx team or create an issue in the GitHub repository.