A React-based web application for managing the MBARI VARS (Video Annotation and Reference System) knowledge base. This application provides a comprehensive interface for taxonomic concept management, including concept editing, media management, user administration, and reference management.
- Frontend Framework: React 19.0.0 with JSX
- Build Tool: Vite 6.0.9
- UI Framework: Material-UI (MUI) v6.4.0
- Routing: React Router DOM v7.1.1
- HTTP Client: Axios v1.7.9
- Package Manager: Yarn v4.5.1
- Development: ES2022+ with ESLint
- π² Taxonomic Tree Management: Interactive concept hierarchy navigation
- π Concept Editing: Create, edit, and manage taxonomic concepts
- πΌοΈ Media Management: Associate and manage media files with concepts
- π₯ User Administration: Manage system users and permissions
- π Reference Management: Handle scientific references and citations
- π History Tracking: View concept change history and versioning
- π Authentication: Secure login with JWT tokens
- π± Responsive Design: Mobile-friendly interface
src/
βββ components/ # React components
β βββ auth/ # Authentication components
β βββ common/ # Reusable UI components
β βββ config/ # Configuration forms
β βββ kb/ # Knowledge base specific components
β β βββ panels/ # Main panel components
β β β βββ concepts/ # Concept management
β β β βββ history/ # History tracking
β β β βββ references/ # Reference management
β β β βββ templates/ # Template management
β β β βββ users/ # User management
β β βββ nav/ # Navigation components
β βββ modal/ # Modal dialogs
β βββ util/ # Utility components
βββ contexts/ # React contexts for state management
β βββ auth/ # Authentication context
β βββ concept/ # Concept state management
β βββ config/ # Configuration context
β βββ modal/ # Modal state management
β βββ references/ # References context
β βββ selected/ # Selection state
β βββ taxonomy/ # Taxonomy data context
β βββ templates/ # Templates context
β βββ users/ # Users context
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries
β βββ api/ # API service functions
β βββ auth/ # Authentication utilities
β βββ kb/ # Knowledge base models
β βββ services/ # External service integrations
β βββ store/ # State management stores
βββ App.jsx # Main application component
- Node.js 18+
- Yarn 4.5.1+
- Modern web browser
-
Clone the repository
git clone <repository-url> cd kb
-
Install dependencies
yarn install
-
Start development server
yarn dev
-
Open in browser Navigate to
http://localhost:5173/kbeditor/
Command | Description |
---|---|
yarn dev |
Start development server with hot reload |
yarn build |
Build production bundle |
yarn preview |
Preview production build locally |
yarn kb |
Build and preview (combined command) |
yarn lint |
Run ESLint code analysis |
yarn version:generate |
Generate version information |
- Base URL:
/kbeditor/
- Development Port: 5173
- Path Aliases:
@
maps to./src
- Source Maps: Enabled in production builds
- ESLint: Configured with React best practices
- React: Uses modern hooks and functional components
- JSX: Standard JSX syntax
- ES2022+: Modern JavaScript features
The application uses React Contexts for state management:
- AuthContext: User authentication and authorization
- ConceptContext: Concept editing and staging
- TaxonomyContext: Taxonomic tree data
- SelectedContext: Current selections (concepts, history)
- ModalContext: Modal dialog state
- ConfigContext: Application configuration
App.jsx
: Root component with routingKBContainer.jsx
: Main knowledge base containerKnowledgeBase.jsx
: Core KB interface
Concepts.jsx
: Concept management panelReferences.jsx
: Reference managementUsers.jsx
: User administrationTemplates.jsx
: Template managementHistory.jsx
: Change history tracking
TaxonomyTree.jsx
: Interactive concept treeConceptTreeItem.jsx
: Individual tree nodesConceptTreeLabel.jsx
: Tree item labels
API services are organized in src/lib/api/
:
concept.js
: Concept CRUD operationstaxonomy.js
: Taxonomic tree operationsreferences.js
: Reference managementusers.js
: User managementmedia.js
: Media file operations
- JWT-based authentication
- Role-based access control (Read-only, Editor, Admin)
- Automatic token refresh
- Secure route protection
- Material-UI: Consistent component library
- Theme: Custom MBARI-branded theme
- Typography: Roboto font family
- Responsive: Mobile-first design approach
- Accessibility: ARIA compliant components
- Panel Layout: Tabbed interface for different sections
- Tree Navigation: Expandable taxonomic hierarchy
- Modal Dialogs: Overlay forms for editing
- Data Grids: Sortable and filterable tables
- Form Validation: Real-time input validation
- ESLint configuration with React rules
- Strict mode enabled
- Error boundaries for graceful error handling
- TypeScript definitions available
- Modern browsers (Chrome, Firefox, Safari, Edge)
- ES2022+ features required
- JavaScript modules support needed
# Production build
yarn build
# Preview build locally
yarn preview
- Static files in
dist/
directory - Source maps included
- Optimized and minified assets
- Base path:
/kbeditor/
- Development: Vite dev server with HMR
- Production: Static file serving
- API endpoints configurable via context
Modify src/lib/theme.js
to customize:
- Color palette
- Typography settings
- Component variants
- Spacing and breakpoints
- Create components in appropriate directory
- Add contexts for state management if needed
- Implement API services in
src/lib/api/
- Update routing in
App.jsx
- Add navigation links in appropriate panels
[Add license information here]
[Add contribution guidelines here]
For technical support or questions about MBARI VARS:
- [Add contact information here]
- [Add documentation links here]