mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 19:05:11 +00:00
- /api/health — uptime, version, memory usage - /api/stats — request count, error rate, cache info - /api/openapi — OpenAPI 3.0.3 specification - Security headers: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection - Request counter middleware - CONTRIBUTING.md — contribution guidelines - test.js — integration test suite (18 endpoints)
2.2 KiB
2.2 KiB
Contributing to AniKotoAPI
Thank you for your interest in contributing! Here's how you can help.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/AniKotoAPI.git - Create a branch:
git checkout -b feature/amazing-feature - Make your changes
- Commit:
git commit -m 'feat: add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
Development Setup
# Install dependencies
npm install
# Start development server
npm run dev
# Server runs on http://localhost:4444
Project Structure
AniKotoAPI/
├── server.js # Express entry point
├── src/
│ ├── configs/ # URL patterns, headers, ID mappings
│ ├── controllers/ # Route handlers
│ ├── extractors/ # HTML scrapers (Cheerio)
│ ├── helper/ # Cache utilities
│ └── routes/ # Express routes
├── public/ # Static files (landing page)
└── docs/ # API documentation
Adding a New Endpoint
- Create extractor in
src/extractors/yourExtractor.js - Create controller in
src/controllers/yourController.js - Add route in
src/routes/apiRoutes.js - Update
docs/endpoints.mdwith documentation - Test with
curl http://localhost:4444/api/your-endpoint
Code Style
- Use ES6+ features (import/export, async/await)
- Add JSDoc comments for new functions
- Follow existing patterns in the codebase
- Keep extractors focused on one task
Commit Messages
Use Conventional Commits:
feat:new featurefix:bug fixdocs:documentation changesrefactor:code refactoringtest:adding testschore:maintenance
Pull Request Guidelines
- Keep PRs focused on one feature or fix
- Update CHANGELOG.md with your changes
- Test your changes locally before submitting
- Follow existing code style
Reporting Issues
- Use GitHub Issues for bug reports
- Include steps to reproduce
- Include expected vs actual behavior
- Include your Node.js version
License
By contributing, you agree that your contributions will be licensed under the MIT License.