Skip to content

Latest commit

 

History

History
219 lines (161 loc) · 6.41 KB

File metadata and controls

219 lines (161 loc) · 6.41 KB

Contributing to Free Crypto News API

First off, thank you for considering contributing to Free Crypto News API! 🎉

It's people like you that make this project such a great tool for the crypto community.

📋 Table of Contents

📜 Code of Conduct

This project and everyone participating in it is governed by our commitment to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.

🤝 How Can I Contribute?

🐛 Reporting Bugs

Before creating bug reports, please check existing issues to avoid duplicates. When you create a bug report, include as many details as possible:

  • Use a clear and descriptive title
  • Describe the exact steps to reproduce the problem
  • Provide specific examples (curl commands, code snippets)
  • Describe the behavior you observed and what you expected
  • Include your environment (OS, Node.js version, etc.)

💡 Suggesting Features

Feature suggestions are welcome! Please:

  • Use a clear and descriptive title
  • Provide a detailed description of the suggested feature
  • Explain why this feature would be useful to most users
  • List any alternatives you've considered

🔧 Code Contributions

We love pull requests! Here are some ideas:

  • New news sources - Add more crypto news outlets
  • SDK improvements - Enhance existing SDKs or add new ones
  • Documentation - Improve docs, add examples, fix typos
  • Bug fixes - Fix reported issues
  • New endpoints - Add useful API endpoints
  • Performance - Optimize caching, reduce response times
  • Translations - Help translate to new languages

🚀 Getting Started

Prerequisites

  • Node.js 18+Download
  • pnpmnpm install -g pnpm (package manager)
  • Buncurl -fsSL https://bun.sh/install | bash (script runner)
  • GitDownload

Local Setup

# 1. Fork the repository on GitHub

# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/free-crypto-news.git
cd free-crypto-news

# 3. Install dependencies
pnpm install

# 4. Create environment file (optional)
cp .env.example .env.local

# 5. Start development server
bun run dev

# 6. Open http://localhost:3000

Note: The app runs with zero configuration. Redis, database, and AI keys are all optional — the app gracefully falls back.

Project Structure

├── src/
│   ├── app/           # Next.js pages and 150+ API routes
│   │   ├── [locale]/   # i18n-wrapped user-facing pages
│   │   └── api/        # Serverless API routes (Edge Runtime)
│   ├── components/    # 170+ React components
│   ├── hooks/         # Custom React hooks
│   ├── lib/           # 200+ utility modules
│   ├── types/         # TypeScript type definitions
│   └── __tests__/     # Unit tests
├── archive/           # Static JSON data store
├── sdk/               # 13 language SDKs
├── mcp/               # Claude MCP server
├── widget/            # Embeddable HTML widgets
├── scripts/           # Build and archive scripts
├── messages/          # i18n translations (42 locales)
├── drizzle/           # Database migrations
├── e2e/               # Playwright E2E tests
├── stories/           # Storybook component stories
└── docs/              # Documentation (MkDocs)

💻 Development Process

  1. Create a branch from main:

    git checkout -b feature/your-feature-name
    # or
    git checkout -b fix/bug-description
  2. Make your changes following our style guidelines

  3. Test your changes locally:

    bun run build        # Verify build succeeds
    bun run lint         # Check code style
    bun run typecheck    # Check TypeScript types
    bun run test         # Run unit tests
  4. Commit your changes with a clear message:

    git commit -m "feat: add new endpoint for market data"
    # or
    git commit -m "fix: resolve caching issue in /api/news"

    We follow Conventional Commits:

    • feat: - New feature
    • fix: - Bug fix
    • docs: - Documentation
    • style: - Code style (formatting, etc.)
    • refactor: - Code refactoring
    • test: - Adding tests
    • chore: - Maintenance tasks
  5. Verify changelog coverage:

    # Check if your changes are documented
    node scripts/analyze-commits.js --check --since=HEAD~5
  6. Push to your fork and open a PR

🔄 Pull Request Process

  1. Update documentation if you're changing functionality
  2. Update CHANGELOG.md for significant changes:
    # See what entries might be missing
    node scripts/analyze-commits.js
    
    # Auto-add missing entries (review before committing)
    node scripts/analyze-commits.js --update
  3. Add tests for new features if applicable
  4. Ensure CI passes - the build must succeed
  5. Request review from maintainers
  6. Address feedback promptly and constructively

PR Title Format

feat: Add whale transaction tracking endpoint
fix: Resolve memory leak in RSS parser
docs: Add Python SDK examples

📝 Style Guidelines

TypeScript/JavaScript

  • Use TypeScript for new code when possible
  • Use meaningful variable and function names
  • Add JSDoc comments for public functions
  • Keep functions small and focused

API Endpoints

  • Follow RESTful conventions
  • Return consistent response formats
  • Include proper error handling
  • Add response caching where appropriate

Documentation

  • Use clear, concise language
  • Include code examples
  • Keep README sections up to date

❓ Questions?

Feel free to:

  • Open an issue with the question label
  • Start a discussion in GitHub Discussions
  • Reach out to maintainers

🙏 Recognition

Contributors will be:

  • Listed in our README
  • Credited in release notes
  • Forever appreciated by the community! 💜

Thank you for contributing! Every contribution, no matter how small, helps make this project better for everyone. 🚀

Code of Conduct

Please read and follow our Code of Conduct.