Development guidelines for document classifier React component
Development instructions for working with the document classifier component codebase (ilb/classifiercomponent).
This is a React-based document classifier component built with Next.js. The project uses modern JavaScript/JSX with ESLint and Prettier for code quality.
When working with this codebase, use these npm scripts:
**Development:**
**Code Quality:**
**Testing:**
Follow these strict style guidelines when writing or modifying code:
```bash
npm run dev
```
Navigate to `http://localhost:3010` to view the application.
Before editing:
1. Read existing code to understand patterns
2. Check `Errors.mjs` for error handling conventions
3. Review component structure for consistency
When writing code:
1. Use appropriate file extensions (`.js`/`.mjs`)
2. Follow naming conventions strictly
3. Apply ESLint/Prettier rules automatically
Before committing:
```bash
npm run lint
npm run lint:fix
```
Run relevant tests:
```bash
npx jest path/to/test/file.test.js
```
```bash
npm run build
npm run start
```
Verify build succeeds without errors.
1. Create file with `.js` extension in appropriate directory
2. Use PascalCase for component name
3. Follow existing component structure
4. Import and use error patterns from `Errors.mjs`
5. Run linter before saving
1. Check browser console for client-side errors
2. Check terminal output for server errors
3. Review error messages from `Errors.mjs`
4. Use `npm run dev` for hot reloading during debugging
1. Use `.mjs` extension for new server files
2. Follow existing patterns in server-side code
3. Test with `npm run build` before deploying
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/document-classifier-component-development/raw