-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
363 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
# Contributing to UNT Robotics Website | ||
|
||
Thank you for considering contributing to the UNT Robotics website! This document provides guidelines and instructions for contributing to the project. | ||
|
||
## Code of Conduct | ||
|
||
All contributors are expected to adhere to our code of conduct: | ||
|
||
1. Be respectful and inclusive of all contributors | ||
2. Follow UNT's academic integrity policies | ||
3. Maintain professionalism in communications | ||
4. Report any inappropriate behavior to project maintainers | ||
|
||
## Getting Started | ||
|
||
1. Fork the repository | ||
2. Clone your fork locally | ||
3. Set up your development environment (see GETTING_STARTED.md) | ||
4. Create a new branch for your feature/fix | ||
5. Make your changes | ||
6. Submit a pull request | ||
|
||
## Development Workflow | ||
|
||
### 1. Branching Strategy | ||
|
||
- `main` - Production branch | ||
- `develop` - Development branch | ||
- Feature branches: `feature/your-feature-name` | ||
- Bugfix branches: `fix/bug-description` | ||
|
||
### 2. Commit Messages | ||
|
||
Follow conventional commits format: | ||
|
||
``` | ||
type(scope): description | ||
[optional body] | ||
[optional footer] | ||
``` | ||
|
||
Types: | ||
|
||
- `feat`: New feature | ||
- `fix`: Bug fix | ||
- `docs`: Documentation changes | ||
- `style`: Code style changes | ||
- `refactor`: Code refactoring | ||
- `test`: Adding/modifying tests | ||
- `chore`: Maintenance tasks | ||
|
||
Example: | ||
|
||
``` | ||
feat(merchandise): add size selection to t-shirt orders | ||
- Added size dropdown component | ||
- Integrated with Printful API | ||
- Updated order processing logic | ||
Closes #123 | ||
``` | ||
|
||
### 3. Pull Request Process | ||
|
||
1. Update documentation for any new features | ||
2. Add/update tests as needed | ||
3. Ensure all tests pass | ||
4. Update CHANGELOG.md | ||
5. Request review from maintainers | ||
6. Address review feedback | ||
|
||
### 4. Code Style Guidelines | ||
|
||
#### PHP | ||
|
||
- Follow PSR-12 coding standards | ||
- Use type hints where possible | ||
- Document classes and methods with PHPDoc | ||
|
||
```php | ||
/** | ||
* Process a new merchandise order | ||
* | ||
* @param int $orderId Order identifier | ||
* @param array $items List of ordered items | ||
* @return bool Success status | ||
*/ | ||
public function processOrder(int $orderId, array $items): bool | ||
``` | ||
|
||
#### JavaScript | ||
|
||
- Use ES6+ features | ||
- Follow Airbnb JavaScript Style Guide | ||
- Document functions with JSDoc | ||
|
||
```javascript | ||
/** | ||
* Updates the shopping cart total | ||
* @param {Array} items - Cart items | ||
* @returns {number} Cart total | ||
*/ | ||
function updateCartTotal(items) { | ||
``` | ||
#### HTML/CSS | ||
- Use semantic HTML5 elements | ||
- Follow BEM naming convention for CSS | ||
- Maintain responsive design principles | ||
### 5. Testing Guidelines | ||
1. **Unit Tests** | ||
- Write tests for new features | ||
- Update existing tests when modifying functionality | ||
- Aim for high coverage of critical paths | ||
2. **Integration Tests** | ||
- Test PayPal integration using sandbox | ||
- Test Discord bot functionality in test server | ||
- Verify email notifications | ||
3. **Manual Testing** | ||
- Test on multiple browsers | ||
- Verify mobile responsiveness | ||
- Check accessibility compliance | ||
### 6. Documentation | ||
1. **Code Documentation** | ||
- Document complex logic | ||
- Explain non-obvious decisions | ||
- Keep documentation up to date | ||
2. **API Documentation** | ||
- Document new endpoints | ||
- Include request/response examples | ||
- Note any authentication requirements | ||
3. **User Documentation** | ||
- Update user guides for new features | ||
- Include screenshots where helpful | ||
- Document configuration changes | ||
## Areas for Contribution | ||
1. **High Priority** | ||
- Payment processing improvements | ||
- Discord integration enhancements | ||
- Security updates | ||
- Performance optimization | ||
2. **Feature Requests** | ||
- Event management system | ||
- Member dashboard improvements | ||
- Automated testing | ||
- Analytics integration | ||
3. **Documentation** | ||
- API documentation | ||
- Setup guides | ||
- User documentation | ||
- Code comments | ||
## Getting Help | ||
- Join our [Discord server](https://discord.gg/untrobotics) | ||
- Check our [Jira board](https://untrobotics.atlassian.net) | ||
- Check existing issues and discussions | ||
- Contact project maintainers | ||
- Review documentation | ||
## Project Management | ||
We use Jira to track our development work. You can find our project board at [untrobotics.atlassian.net](https://untrobotics.atlassian.net). | ||
1. **Creating Issues** | ||
- Check existing issues first | ||
- Use provided templates when available | ||
- Include clear reproduction steps for bugs | ||
- Tag appropriate components | ||
2. **Working with Jira** | ||
- Assign yourself to issues you're working on | ||
- Update issue status as you progress | ||
- Link pull requests to issues | ||
- Add time tracking if applicable | ||
## Security Issues | ||
For security issues: | ||
1. **DO NOT** create a public issue | ||
2. Email webmaster@untrobotics.com | ||
3. Include detailed description | ||
4. Wait for confirmation before disclosure | ||
## License | ||
By contributing, you agree that your contributions will be licensed under the project's license. | ||
## Questions? | ||
If you have questions about contributing: | ||
1. Check existing documentation | ||
2. Search closed issues | ||
3. Ask in Discord | ||
4. Contact maintainers | ||
Thank you for contributing to UNT Robotics! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# Getting Started with UNT Robotics Web Platform | ||
|
||
This guide will help you set up and run the UNT Robotics web platform locally for development. | ||
|
||
## Prerequisites | ||
|
||
- PHP 7.4 or higher | ||
- MySQL/MariaDB | ||
- Apache or Nginx web server | ||
- NodeJS | ||
|
||
## Environment Setup | ||
|
||
1. **Clone the Repository** | ||
|
||
```bash | ||
git clone https://github.com/UNTRobotics/website.git | ||
cd website | ||
``` | ||
|
||
2. **Database Configuration** | ||
- Create a new MySQL database | ||
- Copy `config.sample.php` to `config.php` | ||
- Update database credentials in `config.php`: | ||
|
||
```php | ||
define('DATABASE_HOST', 'localhost'); | ||
define('DATABASE_USER', 'your_username'); | ||
define('DATABASE_PASSWORD', 'your_password'); | ||
define('DATABASE_NAME', 'untrobotics'); | ||
``` | ||
|
||
3. **Import Database Schema** | ||
- Import all SQL files from the schema directory: | ||
|
||
```bash | ||
mysql -u your_username -p your_database < schema/botathon_registration.sql | ||
mysql -u your_username -p your_database < schema/dues_payments.sql | ||
# ... (repeat for other .sql files) | ||
``` | ||
|
||
4. **Configure External Services** | ||
Update `config.php` with the following API credentials: | ||
- PayPal API credentials | ||
- Discord bot token | ||
- SendGrid API key | ||
- Printful API key | ||
```php | ||
define('PAYPAL_BUSINESS_ID', 'your_paypal_id'); | ||
define('DISCORD_BOT_TOKEN', 'your_discord_token'); | ||
define('SENDGRID_API_KEY', 'your_sendgrid_key'); | ||
``` | ||
|
||
5. **Web Server Configuration** | ||
- For Apache, ensure mod_rewrite is enabled | ||
- Configure your virtual host to point to the project's public directory | ||
- Sample Apache configuration: | ||
```apache | ||
<VirtualHost *:80> | ||
ServerName untrobotics.local | ||
DocumentRoot /path/to/website/public | ||
<Directory /path/to/website/public> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
</VirtualHost> | ||
``` | ||
6. **File Permissions** | ||
```bash | ||
# Set proper permissions on storage directories | ||
chmod -R 775 storage/ | ||
chown -R www-data:www-data storage/ | ||
``` | ||
## Running the Application | ||
1. **Start your web server and MySQL** | ||
```bash | ||
sudo service apache2 start | ||
sudo service mysql start | ||
``` | ||
2. **Access the Application** | ||
- Visit http://localhost or your configured domain | ||
- The default admin credentials are: | ||
- Username: admin | ||
- Password: Change this on first login! | ||
## Key Features | ||
- **Membership Management**: Track member dues and registrations | ||
- **Event Management**: Handle event registrations like Botathon | ||
- **Payment Processing**: Integration with PayPal for merchandise and dues | ||
- **Discord Integration**: Automatic role management and notifications | ||
- **Merchandise Store**: Integration with Printful for merchandise fulfillment | ||
## Troubleshooting | ||
1. **Permission Issues** | ||
- Ensure storage directories are writable by web server | ||
- Check log files in `/var/log/apache2/` or equivalent | ||
2. **Database Connection Issues** | ||
- Verify MySQL is running: `sudo service mysql status` | ||
- Check database credentials in config.php | ||
- Ensure database user has proper permissions | ||
3. **Payment Integration Issues** | ||
- Verify PayPal API credentials | ||
- Check IPN (Instant Payment Notification) URL configuration | ||
- Review payment logs in `/logs` directory | ||
## Development Guidelines | ||
1. **Code Style** | ||
- Follow PSR-12 coding standards | ||
- Use meaningful variable and function names | ||
- Comment complex logic | ||
2. **Testing** | ||
- Test payment flows using PayPal sandbox | ||
- Test Discord integrations in a test server | ||
- Verify email notifications using SendGrid sandbox | ||
3. **Security** | ||
- Never commit sensitive credentials | ||
- Use prepared statements for database queries | ||
- Validate and sanitize all user input | ||
## Additional Resources | ||
- [UNT Robotics Website](https://untrobotics.com) | ||
- [Discord Server](https://discord.gg/untrobotics) | ||
- [PayPal Developer Documentation](https://developer.paypal.com/docs) | ||
- [Discord API Documentation](https://discord.com/developers/docs) | ||
- [Printful API Documentation](https://www.printful.com/docs) |