This document outlines the component folder structure and organisation in the Next.js application.
Navigation and menu components for app navigation.
CommandPalette.tsx- Smart search interface (Cmd+K) with fuzzy search and keyboard navigationCommandPaletteProvider.tsx- Context provider and keyboard handler for command paletteSidebarNavigation.tsx- Main sidebar navigation for desktopMobileNavigation.tsx- Mobile-responsive navigation menuAdminNavigation.tsx- Admin-specific navigation interface
Core layout components that structure the application.
UserBar.tsx- Top navigation bar with user information and actionsUserBarNav.tsx- Navigation items within the user barUserBarMenu.tsx- User dropdown menu with profile and settingsFooter.tsx- Application footer with links and brandingLogo.tsx- Brand logo component used across the application
Dashboard-specific components for data visualisation and monitoring.
ResourcesHealthDashboard.tsx- Overview of resource health and status monitoringStorageUsageDisplay.tsx- Visual representation of storage usage and limits
User management and profile related components.
UserInfo.tsx- Display user profile information and detailsInputUserImage.tsx- User avatar upload and management interfaceMemberList.tsx- List component for displaying team/organisation members
Project management and display components.
ProjectGrid.tsx- Basic grid layout for displaying projectsProjectCard.tsx- Project card with resource usage, allocation, and status badgesProjectDetailsClient.tsx- Enhanced project details page with resource managementEnhancedProjectGrid.tsx- Advanced project grid with filtering and searchProjectsToolbar.tsx- Toolbar with project actions and filters
Organisation management and display components.
OrganisationOverviewClient.tsx- Organisation dashboard with overview and quick actionsOrganisationCard.tsx- Reusable card component for displaying organisation summaryAllOrganisationsClient.tsx- Browse and manage all organisationsMembersManagementClient.tsx- Organisation member management interfaceRolesManagementClient.tsx- Organisation role and permission management
Reusable UI components and design system elements.
- Tremor Components - UI library components for consistent design
- Form Elements - Inputs, buttons, selectors, and form controls
- Data Display - Tables, cards, modals, and layout components
- Navigation - Breadcrumbs and other navigation utilities
Form-specific components for data input and management.
- Various form components for different entities (projects, teams, organisations, etc.)
- Specialised form controls and validation components
Modal dialogs and popup interfaces.
- Confirmation dialogs, galleries, sharing interfaces, and payment modals
Data table components and column definitions.
- Table components for different data types (resources, projects, users, etc.)
Search functionality and related components.
- Search interfaces and result displays
Resource management specific components.
- Resource-related UI components and wizards
Components that don't fit into specific categories.
GenericTable.tsx- Reusable table componentTeamFilter.tsx- Team filtering interfaceGenericSearch.tsx- Generic search component- And other utility components
- Domain-based grouping - Components are organised by their primary use case
- Reusability focus - Common components are easily discoverable in
/common/ - Feature isolation - Related components are grouped together for better maintainability
// Navigation components
import CommandPalette from '@/components/navigation/CommandPalette';
// Layout components
import UserBar from '@/components/layout/UserBar';
// Dashboard components
import StorageUsageDisplay from '@/components/dashboard/StorageUsageDisplay';
// Common/reusable components
import { Button } from '@/components/common/Button';- Page Components - Full page layouts and containers
- Feature Components - Business logic specific components
- UI Components - Reusable interface elements
- Layout Components - Structural page elements
- Form Components - Data input and validation
- Determine the appropriate folder based on the component's primary purpose
- Use common components when possible before creating new ones
- Follow existing patterns for imports and exports
- Consider reusability - if it might be used elsewhere, put it in
/common/
- Navigation: Any component that helps users move through the app
- Layout: Structural components that define page layout
- Dashboard: Data visualisation and monitoring components
- User: User profile, authentication, and member management
- Organisation: Organisation management, member management, and role assignment
- Project: Project-specific functionality and displays
- Resource: Resource deployment, status tracking, and management
- Common: Reusable UI components used across multiple features
For a complete list of all components and their purposes, refer to the individual folder contents. Each component follows the project's coding standards and includes proper TypeScript definitions.
This architecture supports scalable development and maintainable code organisation. When in doubt about component placement, consider the primary use case and follow the domain-based grouping strategy.