ModelSEED-UI is the modern Next.js 16 + React 19 + MUI 7 interface for the ModelSEED platform. It provides biochemistry reference tables, public genomes/media, and authenticated user workflows (Build Model, My Models, My Media, My Jobs) interacting with the new modelseed-api backend while preserving legacy URL parity.
- Full Legacy Parity Achieved!
- FBA job submission (with plant-specific media and reaction KO options)
- Gapfill job submission
- Model reconstruction (genome → model)
- My Models, My Media, My Jobs pages
- Complete Model detail tab coverage (Reactions, Compounds, Genes, Compartments, Biomass, Pathways, FBA)
- Biochemical reference data (reactions, compounds via Solr with detail drawers)
- Inline metadata editing (Name, Description persist to backend)
- Organism/Taxonomy not saved during model reconstruction (backend fix needed)
- Reaction equations not returned in model data (API limitation)
- Gene functions not returned in model data (API limitation)
- RAST gapfill jobs may fail (backend issue)
modelseed.org/solrCORS issue block direct execution in test runner (handled gracefully in UI)
⚠️ Note: PATRIC and RAST are separate systems with different workspaces. A PATRIC user cannot access RAST workspace data and vice versa.
- Next.js 16 (App Router, Turbopack)
- React 19
- MUI 7
- TanStack Query 5
- TypeScript (strict)
- Backends:
- PATRIC/RAST auth services
- PATRIC Workspace (legacy JSON-RPC)
- ModelSEED REST API (
modelseed-api, Poplar) - Solr biochemistry index for reactions/compounds
Key configuration constants live in lib/api/config.ts:
MODELSEED_API_URL– base URL for Poplar (currentlyhttp://poplar.cels.anl.gov:8000in development).USE_MODELSEED_API– whentrue, user data flows (My Models, My Media, jobs) usemodelseed-api.USE_NEW_PROXY– whentrue, workspace calls route through the REST proxy at${MODELSEED_API_URL}/api/workspace.SOLR_BASE/USE_NEW_BIOCHEM– control whether biochem lookups use legacy Solr or the new biochem endpoints (by default, tables stay on Solr).
Install dependencies:
npm installStart the development server:
npm run devThen open http://localhost:3000 in your browser.
For a production build:
npm run build
npm startAuthentication is handled by components/auth/AuthProvider.tsx and lib/api/auth.ts:
- Users log in against RAST or PATRIC/BV-BRC.
- The resulting token is stored in
localStorage['auth']. - API clients (
lib/api/modelseed.ts,lib/api/workspace.ts,lib/api/biochem.ts) attach the raw token as:
Authorization: <raw-token>
There is a local-only developer bypass for testing:
- Username:
developer - Password:
developer
This returns a fixed developer token without hitting remote auth services. Use this only for local development.
-
Biochem tables (compounds, reactions):
- Served from Solr via
lib/api/biochem.ts. - Tables and detail views under
app/(reference-data)/biochem/....
- Served from Solr via
-
Workspace-backed reference data (public plant models, genomes, reference media):
- Use
workspaceLs/workspaceGetfromlib/api/workspace.ts. - When
USE_NEW_PROXY=true, these calls post to${MODELSEED_API_URL}/api/workspace/*; otherwise they fall back to the legacy JSON-RPC Workspace service.
- Use
-
User Models, Media, Jobs:
- Use
lib/api/modelseed.tsfor:GET /api/models,GET /api/models/data, export, delete, copy, gapfills, FBA.GET /api/media/public,GET /api/media/mine.GET /api/jobs,POST /api/jobs/reconstruct,/gapfill,/fba,/manage.
- Front-end surfaces:
app/(user-data)/my-models/page.tsxapp/(user-data)/myMedia/page.tsxapp/model/[...path]/page.tsxapp/(build-model)/plant/page.tsx
- Use
-
Jobs and Build Model:
- Reconstruct jobs are created via
submitReconstructJobFromApi. - FBA and gapfill jobs use
submitFbaJobFromApiandsubmitGapfillJobFromApi. lib/api/jobTracker.tsstores submitted job IDs soMy ModelsandModel Detailcan surface job status and cancellation controls.
- Reconstruct jobs are created via
For a deeper architectural view, see:
docs/ARCHITECTURE.mddocs/WORKSPACE.mddocs/AUTHENTICATION.md
INDEX.md– High-level map of files and folders (Primary entry point for onboarding).docs/README.md– Developer manual index.issues.md- Verified current API limitations and bug tracker..gsd/ROADMAP.md– Current phases and milestones.
When initializing a debugging or feature session, start by reading INDEX.md for the context protocol, then review issues.md to ensure you are not debugging a known backend limitation (such as 501 Not Implemented endpoints).
-
Start the development server:
npm run dev
-
Start SSH tunnel to Poplar API (for authenticated tests):
The ModelSEED API backend runs on Poplar and requires an SSH tunnel for local development:
ssh -L 8000:localhost:8000 [email protected]
Important: Keep this terminal session open while developing. The tunnel forwards
localhost:8000to the Poplar API server.Without the SSH tunnel:
- Version page will show endpoints as "error"
- Media tab (
/list-media) will be empty due to timeout - All authenticated API features will be unavailable
-
Configure
.env.local:# When using SSH tunnel NEXT_PUBLIC_MODELSEED_API_URL=http://localhost:8000 # For authenticated tests PATRIC_USERNAME=your_username PATRIC_PASSWORD=your_password
# Unit tests
npm run test:run
# E2E tests (requires dev server + SSH tunnel)
npm run test:e2e
# API endpoint tests (requires SSH tunnel)
npm run test:apiSee tests/README.md for full documentation.
Cause: SSH tunnel to Poplar API is not active.
Solution:
- Start the SSH tunnel:
ssh -L 8000:localhost:8000 [email protected] - Keep the terminal session open while developing
- Verify connection:
curl http://localhost:8000/health(should return 200)
Cause: Backend API not responding (SSH tunnel not active).
Solution:
- Check SSH tunnel is running (see above)
- Verify environment variable in
.env.local:NEXT_PUBLIC_MODELSEED_API_URL=http://localhost:8000
- Restart the development server after changing
.env.local - Test API connection:
curl http://localhost:8000/api/media/public
This is expected behavior, not a bug.
RAST and PATRIC are separate systems with different workspace folders. A PATRIC user cannot access RAST workspace data and vice versa. The same username on both systems will have different data because they point to different underlying workspace directories.
Cause: Network connectivity to PATRIC/RAST authentication servers or SSH tunnel issue.
Solution:
- Check internet connectivity to
p3.theseed.organdrast.nmpdr.org - Verify SSH tunnel is active for API calls
- Try the developer bypass (local testing only):
- Username:
developer - Password:
developer - Returns a fixed token without hitting remote auth services
- Username:
Solution:
# Clean build artifacts
rm -rf .next
rm -rf node_modules
npm install
# Run type check
npx tsc --noEmit
# Run linter
npm run lintFor more detailed troubleshooting and architecture documentation, see:
docs/README.md- Developer manualdocs/ARCHITECTURE.md- System architecturedocs/WORKSPACE.md- Workspace API detailsissues.md- Known backend limitations
- ✅ Build: Clean production build passes
- ✅ Lint: All errors fixed in application code
- ✅ TypeScript: Strict mode enabled, no type errors
- ✅ Unit Tests: 65 passing (7 test files)
| Area | Tests | Status |
|---|---|---|
| Job Tracker | 20+ | ✅ |
| Format Equation | 15+ | ✅ |
| ModelSEED API | 3 | ✅ |
| Workspace API | 2 | ✅ |
| E2E Auth Flows | 10+ | ✅ (requires tunnel) |
These issues are documented in E2E-REPORT-FIX-STATUS.md:
- Duplicate model rows - API returns same model multiple times
- Equation column shows N/A - Equations not in model data response
- Gene functions missing - Not returned by model API
- Organism/Taxonomy not saved - Reconstruct endpoint limitation
These require backend (
modelseed-api) fixes and cannot be resolved from the frontend.
- Removed all unused imports/variables
- Fixed React Compiler setState-in-effect patterns
- Fixed TypeScript
anytype usages - Added Suspense boundaries for Next.js 16 compatibility
- Created: 2026-03-12 20:18:13 CDT
- Review: 2026-03-13 (Comprehensive code review)