feat: update M3 frontend setup with comprehensive requirements
- Add lucide-react dependency with Home, FileText, Settings icons - Create assets/ folder with styles/ subdirectory for global.css - Establish clear separation between pages/ (route-level) and components/ui/, components/articles/ - Implement Layout.tsx wrapper component for page structure - Update component list: Header, Layout, ArticleCard, AuthorAvatar, CategoryBadge - Add ArticlePage.tsx and CategoriesPage.tsx as placeholders in pages/ - Update scoring rubric to 40 points reflecting all new requirements
This commit is contained in:
1 parent
85490bc0a2
commit
b627ddc418
2 files changed
+255
-201
No files matched your search
@@ -4,31 +4,40 @@
|
||||
|
||||
| Score | Criteria |
|
||||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 0 | Agent failed to implement acceptance criteria:<br>- No Vite/React project created<br>- TypeScript not configured<br>- Project structure missing key folders<br>- Components incomplete<br>- Missing tests (unit + E2E)<br>- Dockerfile or docker-compose missing |
|
||||
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic React app with vite but no typescript<br>- Missing multiple required folders<br>- Components render but have errors<br>- npm scripts incomplete<br>- No test setup at all |
|
||||
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- Vite + React + TypeScript project in frontend/ folder<br>- All required directories (components/, pages/, types/, api/, tests/) created<br>- Article, Author, Category TypeScript interfaces defined<br>- Header and Home components created<br>- package.json scripts (dev, build, preview, test, e2e) working<br>- .gitignore excludes node_modules, dist/, IDE configs<br>- Playwright installed and configured |
|
||||
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes properly configured API client with error handling<br>- Types exported for all interfaces match backend models<br>- ESLint configuration present and passing<br- Unit tests in src/tests/ using Vitest and React Testing Library |
|
||||
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes comprehensive unit tests covering:<br>- Header component rendering and props validation<br>- Home page loads and renders article layout<br>- API client error handling scenarios |
|
||||
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- Playwright E2E tests in playwright/e2e/ passing successfully<br>- E2E tests verify homepage accessibility and API interactions<br>- Combined test coverage >60% across unit and E2E tests<br- Test scripts (npm run test, npm run e2e) execute without errors |
|
||||
| 0 | Agent failed to implement acceptance criteria:<br>- No Vite/React project created<br>- TypeScript not configured<br>- Missing multiple required folders<br>- Components incomplete<br>- Missing tests (unit + E2E)<br>- Missing lucide-react icons<br>- No Dockerfile or docker-compose missing |
|
||||
| 1 | Agent partially implemented acceptance criteria that builds successfully:<br>- Basic React app with vite but no lucide-icons<br>- Missing page/component separation<br>- Components render but have errors<br>- npm scripts incomplete<br>- No test setup at all |
|
||||
| 2 | Agent fully implemented acceptance criteria that builds successfully:<br>- Vite + React + TypeScript project in frontend/ folder<br>- All required directories (assets/, components/, pages/, types/, api/, tests/) created<br>- lucide-react installed with core icons (Home, FileText, Settings, Search)<br>- Article, Author, Category TypeScript interfaces defined<br>- Header component with navigation placeholder and lucide icons<br- package.json scripts (dev, build, preview, test, e2e) working<br>- .gitignore excludes node_modules, dist/, IDE configs<br>- Playwright installed and configured |
|
||||
| 3 | Agent fully implemented acceptance criteria that builds successfully, includes reusable article components created<br>- ArticleCard.tsx displays article data correctly<br- Layout wrapper component with proper structure<br- lucide-react icons integrated properly in Header |
|
||||
| 4 | Agent fully implemented acceptance criteria that builds successfully, includes comprehensive unit tests covering:<br>- Header rendering and icon display<br- Layout structure and header integration<br- API client error handling scenarios<br- Test coverage >50% on components |
|
||||
| 5 | Agent fully implemented acceptance criteria that builds successfully, includes all content from Score 4 AND:<br>- Playwright E2E tests in playwright/e2e/ passing successfully<br- E2E tests verify homepage layout and lucide icon navigation<br- API client makes requests correctly via browser<br- Combined test coverage >60% across unit and E2E tests<br- All tests execute without errors |
|
||||
|
||||
## Scoring Breakdown by Criterion
|
||||
|
||||
### Project Setup (Max 2 points)
|
||||
- **0 pts**: No Vite/React project or not in frontend/ folder<br>- TypeScript missing entirely
|
||||
- **1 pt**: Basic React app created but structure incomplete<br>- Missing api/, types/, pages/ folders
|
||||
- **2 pts**: Complete directory structure with all required folders (public/, src/, components/, pages/, types/, api/, tests/)
|
||||
- **1 pt**: Basic React app created but structure incomplete<br>- Missing pages/, components/ separation
|
||||
- **2 pts**: Complete directory structure with all required folders (public/, src/, assets/, components/, pages/, types/, api/, tests/)
|
||||
|
||||
### TypeScript Implementation (Max 3 points)
|
||||
- **0 pts**: No TypeScript or tsconfig.json<br>- Plain JavaScript only
|
||||
### TypeScript & Dependencies (Max 4 points)
|
||||
- **0 pts**: No TypeScript or tsconfig.json<br>- lucide-react not installed
|
||||
- **1 pt**: TypeScript enabled but no type definitions<br>- Partial interfaces
|
||||
- **2 pts**: Article, Author, Category interfaces properly defined<br>- Types used in components
|
||||
- **3 pts**: Comprehensive types including ApiResponse<T>, function signatures, validation
|
||||
- **2 pts**: Article, Author, Category interfaces properly defined<br>- lucide-react with core icons imported correctly
|
||||
- **3 pts**: Comprehensive types including ApiResponse<T>, function signatures<br>- Proper type exports across modules
|
||||
- **4 pts**: All type definitions validated and used in components<br- No TypeScript errors on build
|
||||
|
||||
### Components (Max 3 points)
|
||||
- **0 pts**: No components or App.tsx missing<br>- Application doesn't render
|
||||
- **1 pt**: Only Header component created<br>- Home page incomplete
|
||||
- **2 pts**: Header and Home components implemented correctly<br>- Components mount without errors
|
||||
- **3 pts**: Reusable UI components (ArticleCard, AuthorAvatar, CategoryBadge) created
|
||||
### UI Components (Max 5 points)
|
||||
- **0 pts**: No UI components or Header missing<br>- Application doesn't render properly
|
||||
- **1 pt**: Only Header component created<br>- Layout wrapper missing
|
||||
- **2 pts**: Header and Layout components implemented with lucide icons<br- Basic icon rendering works
|
||||
- **3 pts**: Reusable article components (ArticleCard, AuthorAvatar, CategoryBadge) created<br- Icons display correctly in components
|
||||
- **4 pts**: ArticleCard renders article data properly with all sub-components<br- Layout component integrates header and content sections
|
||||
- **5 pts**: All UI components responsive and accessible<br- Lucide icons use correct semantic HTML
|
||||
|
||||
### Page Components (Max 3 points)
|
||||
- **0 pts**: No page separation or Home.tsx missing<br>- Routes not defined in App.tsx
|
||||
- **1 pt**: Only Home page created<br- ArticlePage, CategoriesPage placeholders missing
|
||||
- **2 pts**: All three page components implemented (Home, ArticlePage, CategoriesPage)<br- Proper folder organization under pages/
|
||||
- **3 pts**: Page components properly separated from component library<br- Clear route-to-page mapping in App.tsx
|
||||
|
||||
### API Integration (Max 2 points)
|
||||
- **0 pts**: No API client or fetch not configured<br>- Cannot make requests to backend
|
||||
@@ -38,17 +47,18 @@
|
||||
### Unit Testing (Max 4 points)
|
||||
- **0 pts**: No Vitest or testing-library setup<br>- requirements.txt missing test dependencies
|
||||
- **1 pt**: Tests folder exists but no actual tests<br>- Test runner not configured in package.json
|
||||
- **2 pts**: Vitest configured, Header.test.tsx created<br- Basic component rendering tests
|
||||
- **3 pts**: Multiple unit tests covering components and API client<br- Uses react-testing-library for DOM queries
|
||||
- **4 pts**: Unit tests pass with >=50% coverage on tested components
|
||||
- **2 pts**: Vitest configured, Header.test.tsx created<br- Basic icon/component rendering tests
|
||||
- **3 pts**: Multiple unit tests covering components and API client<br- Uses @testing-library/react for DOM queries
|
||||
- **4 pts**: Unit tests pass with >=50% coverage on tested components<br- Tests verify lucide icon rendering
|
||||
|
||||
### E2E Testing (Max 5 points)
|
||||
### E2E Testing (Max 6 points)
|
||||
- **0 pts**: No Playwright installed or configured<br>- playwright.config.ts missing
|
||||
- **1 pt**: Playwright installed but no tests created<br>- npx playwright install not run
|
||||
- **2 pts**: playwright/e2e folder created with home.spec.ts and api.spec.ts<br- Tests discoverable by npm run e2e
|
||||
- **3 pts**: E2E tests verify homepage layout renders correctly<br- Basic accessibility checks pass
|
||||
- **4 pts**: E2E tests verify API client makes requests and backend responds<br- Proper selectors and wait conditions used
|
||||
- **5 pts**: All E2E tests pass successfully with comprehensive coverage of user flows
|
||||
- **3 pts**: E2E tests verify homepage layout renders correctly<br- Basic accessibility checks pass for lucide icons
|
||||
- **4 pts**: E2E tests verify API client makes requests and backend responds<br- Proper selectors used with lucide icon elements
|
||||
- **5 pts**: Navigation between pages tested via icon-based menus<br- All page routes accessible from home
|
||||
- **6 pts**: Full user flow verified (home → article click → article page)<br- Comprehensive accessibility compliance
|
||||
|
||||
### Docker Configuration (Max 3 points)
|
||||
- **0 pts**: No Dockerfile or .dockerignore<br>- Cannot containerize frontend
|
||||
@@ -59,14 +69,15 @@
|
||||
### Code Quality (Max 2 points)
|
||||
- **0 pts**: No ESLint or linting fails<br>- Poor code organization
|
||||
- **1 pt**: Basic ESLint rules configured but warnings present<br>- Inconsistent formatting
|
||||
- **2 pts**: ESLint passing with zero critical warnings<br>- Consistent code style, type hints on all functions
|
||||
- **2 pts**: ESLint passing with zero critical warnings<br>- Consistent React + TypeScript best practices
|
||||
|
||||
### Documentation (Max 2 points)
|
||||
### Documentation (Max 3 points)
|
||||
- **0 pts**: No README.md or incomplete<br>- No setup instructions
|
||||
- **1 pt**: README exists with basic info only<br>- Missing examples
|
||||
- **2 pts**: Comprehensive README with setup guide, API documentation, and usage examples |
|
||||
- **1 pt**: README exists with basic info only<br>- Missing lucide-react documentation
|
||||
- **2 pts**: Comprehensive README with setup guide, API documentation, and usage examples<br- Icons documented
|
||||
- **3 pts**: Complete component documentation with prop types and lucide icon usage guide |
|
||||
|
||||
## Total Possible Score: 33 points
|
||||
## Total Possible Score: 40 points
|
||||
|
||||
## Evaluation Notes
|
||||
- Partial credit given for incomplete but working implementations (Score 1)
|
||||
@@ -77,12 +88,12 @@
|
||||
## Bonus Points Consideration
|
||||
|
||||
**+1 point** for:
|
||||
- ESLint rules properly configured and enforcing best practices
|
||||
- ESLint rules properly configured and enforcing React/TypeScript best practices
|
||||
- .eslintrc.cjs or vite.config.ts includes meaningful linting rules
|
||||
|
||||
**+2 points** for:
|
||||
- TypeScript strict mode enabled in tsconfig.json
|
||||
- Components use proper TypeScript generics and props typing
|
||||
- Components use proper TypeScript generics and props typing with lucide icons typed
|
||||
|
||||
**+3 points** for:
|
||||
- docker-compose.yml at project root orchestrating both services
|
||||
|
||||
Reference in new issue
Block a user