Welcome to Eventra! We're excited that you want to contribute to our open-source event management platform. This guide will help you get started with contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Development Workflow
- Coding Standards
- Testing Guidelines
- Submitting Changes
- Issue Guidelines
- Pull Request Process
- Communication
By participating in this project, you agree to abide by our Code of Conduct. Please treat all contributors with respect and create a welcoming environment for everyone.
- Be respectful: Treat everyone with kindness and respect
- Be inclusive: Welcome newcomers and help them learn
- Be collaborative: Work together and share knowledge
- Be constructive: Provide helpful feedback and suggestions
Before you begin, ensure you have the following installed:
- Node.js (v16 or higher)
- Java 11 or higher
- Maven 3.6+
- MySQL 8.0+
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/sandeepvashishtha/Eventra.git cd Eventra - Add upstream remote:
git remote add upstream https://github.com/SandeepVashishtha/Eventra.git
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm startThe frontend will be available at http://localhost:3000
# Navigate to backend directory
cd backend
# Install dependencies and build
mvn clean install
# Run the application
mvn spring-boot:runThe backend API will be available at http://localhost:8080
- Create a MySQL database named
eventra - Update
backend/src/main/resources/application.propertieswith your credentials:spring.datasource.url=jdbc:mysql://localhost:3306/eventra spring.datasource.username=your_username spring.datasource.password=your_password
Eventra/
├── frontend/ # React.js frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── common/ # Shared components
│ │ │ └── *.js # Feature-specific components
│ │ ├── pages/ # Page components
│ │ ├── App.js # Main App component
│ │ └── index.js # Entry point
│ ├── public/ # Static assets
│ └── package.json
├── backend/ # Spring Boot backend
│ ├── src/main/java/ # Java source code
│ ├── src/main/resources/ # Configuration files
│ └── pom.xml
├── README.md
├── CONTRIBUTING.md
└── LICENSE
- Components: Organized by feature and reusability
- Pages: Top-level page components
- Styling: CSS modules with shared layouts
- State: React hooks and context for state management
- Controllers: REST API endpoints
- Services: Business logic layer
- Repositories: Data access layer
- Models: Entity classes
Use descriptive branch names with prefixes:
- feature/: New features (
feature/event-creation) - bugfix/: Bug fixes (
bugfix/login-validation) - hotfix/: Critical fixes (
hotfix/security-patch) - docs/: Documentation (
docs/api-documentation) - refactor/: Code refactoring (
refactor/user-service)
Follow conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(frontend): add event creation form
fix(backend): resolve authentication token expiry
docs(readme): update installation instructions
-
Create a new branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following coding standards
-
Test your changes thoroughly
-
Commit your changes with descriptive messages
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- Use functional components with hooks
- Follow ES6+ syntax and features
- Use destructuring for props and state
- Implement proper error boundaries
// Good: Functional component with hooks
import React, { useState, useEffect } from 'react';
import './ComponentName.css';
const ComponentName = ({ prop1, prop2 }) => {
const [state, setState] = useState(initialValue);
useEffect(() => {
// Effect logic
}, [dependency]);
return (
<div className="component-name">
{/* Component JSX */}
</div>
);
};
export default ComponentName;- Use CSS modules for component-specific styles
- Follow BEM naming convention
- Use shared-layout.css for common styles
- Implement responsive design (mobile-first)
/* ComponentName.css */
.component-name {
/* Styles */
}
.component-name__element {
/* Element styles */
}
.component-name__element--modifier {
/* Modified element styles */
}- Use Spring Boot annotations appropriately
- Follow RESTful API conventions
- Implement proper exception handling
- Use dependency injection
@RestController
@RequestMapping("/api/v1/events")
public class EventController {
@Autowired
private EventService eventService;
@GetMapping
public ResponseEntity<List<Event>> getAllEvents() {
// Implementation
}
}# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Generate coverage report
npm test -- --coverage- Unit tests: Individual component testing
- Integration tests: Component interaction testing
- Accessibility tests: Screen reader compatibility
import { render, screen } from '@testing-library/react';
import ComponentName from './ComponentName';
test('renders component correctly', () => {
render(<ComponentName />);
const element = screen.getByText(/expected text/i);
expect(element).toBeInTheDocument();
});# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=EventControllerTest-
Update your branch with latest changes:
git fetch upstream git rebase upstream/main
-
Run all tests and ensure they pass
-
Check code formatting and style
-
Update documentation if needed
- Branch is up to date with main
- All tests pass
- Code follows project standards
- Documentation is updated
- Commit messages are descriptive
- No merge conflicts
When reporting bugs, include:
- Clear title describing the issue
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- Environment details (OS, browser, versions)
- Screenshots or error messages if applicable
For new features, provide:
- Clear description of the feature
- Use case and motivation
- Proposed solution or implementation ideas
- Alternatives considered
bug: Something isn't workingenhancement: New feature or requestdocumentation: Documentation improvementsgood first issue: Good for newcomershelp wanted: Extra attention needed
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Tests pass locally
- [ ] New tests added (if applicable)
## Screenshots
(If applicable)
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated- Automated checks must pass
- Code review by maintainers
- Testing in development environment
- Approval and merge
- All tests pass
- Code review approved
- No merge conflicts
- Documentation updated
- Follows coding standards
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and ideas
- Code Comments: For implementation questions
- Be respectful and constructive
- Help others learn and grow
- Share knowledge and resources
- Follow project guidelines
- UI/UX improvements
- Component development
- Animation and interactions
- Accessibility enhancements
- Performance optimizations
- API endpoint development
- Database optimization
- Security improvements
- Performance enhancements
- Integration features
- Code documentation
- User guides
- API documentation
- Tutorial creation
- Unit test coverage
- Integration tests
- End-to-end testing
- Performance testing
Contributors will be recognized in:
- GitHub contributor list
- Project documentation
- Release notes
- Community highlights
- GitHub Desktop - Git GUI
- VS Code - Code editor
- Postman - API testing
If you have any questions not covered in this guide, feel free to:
- Open an issue with the
questionlabel - Start a discussion in GitHub Discussions
- Reach out to maintainers
Thank you for contributing to Eventra! 🎉