3.3 KiB
3.3 KiB
Project Requirements
This document outlines the key requirements, goals, and constraints for the frontend project.
Core Goals
- Unified User Experience: Create a consistent user experience across all applications within the monorepo.
- Code Reusability: Maximize code reuse through shared components and utilities.
- Team Autonomy: Allow different teams to work independently on their applications while maintaining consistency.
- Performance Optimization: Ensure fast loading times and smooth user interactions across all applications.
- Accessibility: Make all applications accessible to users with disabilities.
- Maintainability: Ensure the codebase is easy to maintain and extend over time.
Technical Requirements
Architecture
- Maintain the monorepo structure using pnpm workspaces and Turborepo.
- Follow the established project structure:
apps/: Contains the applicationscommon/: Common features provided by the main companycs/,wr/,as/: Applications developed by different teams
packages/: Contains shared packagescommon/: Common packages provided by the main companyassets/: Shared assets (styles, images, etc.)components/: Shared UI componentsbusiness_components/: Business-specific componentsconfig/: Shared configurationnetwork/: Network-related utilities
Development Standards
- Use TypeScript for all code to ensure type safety.
- Follow ESLint and Prettier configurations for consistent code style.
- Implement comprehensive testing using Storybook for component development and testing.
- Use Zustand for state management across applications.
- Implement TanStack Query (React Query) for data fetching and caching.
- Use Axios for HTTP requests.
UI/UX Requirements
- Use Tailwind CSS for styling with consistent design patterns.
- Implement Radix UI for accessible UI primitives.
- Follow Shadcn UI patterns for component design.
- Use TanStack Table for data tables and Chart.js for charts.
- Ensure responsive design for all screen sizes.
- Maintain a consistent color scheme and typography across all applications.
Constraints
-
Performance Budgets:
- First Contentful Paint (FCP): < 1.8s
- Time to Interactive (TTI): < 3.5s
- Total Bundle Size: < 500KB (compressed)
-
Browser Support:
- Support the last two versions of major browsers (Chrome, Firefox, Safari, Edge)
- No support required for Internet Explorer
-
Deployment Constraints:
- CI/CD pipeline must complete within 10 minutes
- Zero-downtime deployments required
-
Team Constraints:
- Multiple teams working on different applications
- Need for clear boundaries and interfaces between teams
- Varying levels of expertise with the technology stack
-
Technical Debt:
- Some legacy code exists in certain applications
- Need to gradually migrate to the new architecture
Future Considerations
- Internationalization: Prepare for multi-language support in the future.
- Theming: Consider implementing a theming system for white-labeling.
- Mobile Applications: Prepare for potential React Native integration.
- Micro-frontends: Evaluate the possibility of moving to a micro-frontend architecture.