-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
aicoder2009 edited this page Jan 29, 2026
·
1 revision
Thank you for your interest in contributing to OpenCitation! This project is open source and welcomes contributions from everyone.
Found a bug? Let us know!
- Use the Report Issue button on the website (easiest)
- Or open an issue on GitHub
Include:
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Browser and device info
- Screenshots if helpful
Have an idea? We'd love to hear it!
- Check existing issues to avoid duplicates
- Open a new issue with the "Feature Request" label
- Describe the feature and why it would be useful
Want to code? Great!
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Write or update tests
- Submit a pull request
Documentation improvements are always welcome:
- Fix typos or unclear explanations
- Add examples
- Improve wiki pages
- Translate documentation
Help ensure citation accuracy:
- Test generated citations against official style guides
- Report any formatting errors
- Suggest corrections with references to style guides
- Node.js 18+
- npm or yarn
- Git
# Clone the repository
git clone https://github.com/aicoder2009/opencitation.git
cd opencitation
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your values
# Run development server
npm run devRequired for full functionality:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# AWS DynamoDB (optional for local dev)
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=us-east-1
# GitHub Token (for issue reporting)
GITHUB_TOKEN=github_pat_...# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch- Write clean, readable code
- Add comments only where logic isn't self-evident
- Keep functions focused and single-purpose
- Avoid over-engineering
- Use TypeScript for all new code
- Define types for all function parameters and returns
- Avoid
anytype when possible
- Use Prettier for code formatting
- Use ESLint rules (run
npm run lint) - 2-space indentation
- Single quotes for strings
- Write clear, concise commit messages
- Use present tense ("Add feature" not "Added feature")
- Reference issues when applicable (#123)
opencitation/
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── api/ # API routes
│ │ ├── cite/ # Citation page
│ │ ├── lists/ # Lists pages
│ │ └── projects/ # Projects pages
│ ├── components/
│ │ └── wiki/ # Wikipedia-style UI components
│ ├── lib/
│ │ ├── citation/ # Citation engine
│ │ │ └── formatters/ # Style formatters (APA, MLA, etc.)
│ │ └── db/ # Database utilities
│ └── types/ # TypeScript types
├── public/ # Static assets
└── tests/ # Test files
- Keep PRs focused - One feature or fix per PR
- Write tests - For new features and bug fixes
- Update docs - If your change affects documentation
-
Test locally - Ensure
npm run buildpasses - Describe changes - Explain what and why in the PR description
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Code refactoring
## Testing
How did you test this?
## Screenshots
If applicable- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- No harassment or discrimination
- Open a GitHub Discussion
- Check the FAQ
- Use the Report Issue feature on the website
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make OpenCitation better!