Thank you for your interest in contributing to First Strike Alert! This document provides guidelines for contributing to the project.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/first-strike-alert.git cd first-strike-alert - Install dependencies:
npm install
- Set up your environment:
cp env.example .env # Edit .env with your CTFd details
npm run devThis will start the server with nodemon, which automatically restarts when you make changes.
├── server.js # Main server file
├── index.html # Frontend interface
├── static/
│ ├── css/styles.css # Main stylesheet
│ ├── js/script.js # Frontend JavaScript
│ ├── img/ # Images and graphics
│ ├── sounds/ # Audio files
│ └── fonts/ # Custom fonts
├── package.json # Dependencies and scripts
└── README.md # Documentation
- Use 2 spaces for indentation
- Use camelCase for JavaScript variables and functions
- Use kebab-case for CSS classes
- Add comments for complex logic
- Keep functions small and focused
// Good
async function getFirstBloods() {
try {
const data = await ctfdApiRequest('/api/v1/submissions');
return processFirstBloods(data);
} catch (error) {
console.error('Error fetching first bloods:', error);
throw error;
}
}
// Avoid
function getFirstBloods(){
var data=ctfdApiRequest('/api/v1/submissions');
return data;
}/* Good */
.announcement-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Avoid */
.announcementScreen{
position:fixed;top:0;left:0;width:100%;height:100%;
}When reporting bugs, please include:
- Description of the issue
- Steps to reproduce the problem
- Expected behavior
- Actual behavior
- Environment details (OS, browser, Node.js version)
- Console errors (if any)
**Bug Description**
A clear description of what the bug is.
**To Reproduce**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Screenshots**
If applicable, add screenshots.
**Environment:**
- OS: [e.g. Windows 10]
- Browser: [e.g. Chrome 91]
- Node.js: [e.g. 16.14.0]For new features, please:
- Check existing issues to avoid duplicates
- Describe the feature clearly
- Explain the use case and benefits
- Consider implementation complexity
- Test your changes thoroughly
- Update documentation if needed
- Follow the code style guidelines
- Add comments for complex logic
- Ensure no console errors
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "Add: description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
Use clear, descriptive commit messages:
Add: new feature description
Fix: bug description
Update: change description
Remove: removed feature description
Docs: documentation changes
Style: formatting changes
We welcome contributions in these areas:
- New themes and color schemes
- Better responsive design
- Accessibility improvements
- Animation enhancements
- Additional CTFd API integrations
- Performance optimizations
- Better error handling
- New API endpoints
- Code comments
- API documentation
- Setup guides
- Troubleshooting guides
- Unit tests
- Integration tests
- Browser compatibility testing
- Performance testing
- New sound effects
- Visual themes
- Custom animations
- Graphics improvements
If you discover a security vulnerability, please:
- Do NOT open a public issue
- Email the maintainer directly
- Provide detailed information about the vulnerability
- Wait for a response before disclosing publicly
By contributing, you agree that your contributions will be licensed under the MIT License.
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Keep discussions on-topic
If you need help:
- Check the README first
- Search existing issues
- Create a new issue with the "question" label
- Join our community discussions
Thank you for contributing! 🎉