|
| 1 | +# Contributing to HSCStack |
| 2 | + |
| 3 | +Thanks for your interest in HSCStack! This project is built by and for HSC students in Bangladesh, and we welcome help from fellow developers. |
| 4 | + |
| 5 | +## Before You Start |
| 6 | + |
| 7 | +HSCStack's codebase is **not open for general, unsolicited pull requests**. To contribute code, you first need to be onboarded as a core developer: |
| 8 | + |
| 9 | +1. Apply at [hscstack.mvp.bd/join](https://hscstack.mvp.bd/join) |
| 10 | +2. Once your application is reviewed and accepted, you'll be onboarded to the codebase. |
| 11 | +3. After that, you're free to open issues, pick up tasks, and submit PRs following the workflow below. |
| 12 | + |
| 13 | +If you're not yet a core developer but found a bug or have a suggestion, please [open a GitHub Issue](https://github.com/trtajim/hsc-stack/issues) instead — no membership required for that. |
| 14 | + |
| 15 | +## Tech Stack |
| 16 | + |
| 17 | +| Layer | Technology | |
| 18 | +|--------------|------------------------| |
| 19 | +| Backend | Laravel (PHP) | |
| 20 | +| Frontend | Vue.js via Inertia.js | |
| 21 | +| Storage | Public file storage | |
| 22 | +| Admin Panel | Built-in Laravel admin | |
| 23 | + |
| 24 | +## Development Setup |
| 25 | + |
| 26 | +```bash |
| 27 | +# Clone the repo |
| 28 | +git clone https://github.com/trtajim/hsc-stack.git |
| 29 | +cd hsc-stack |
| 30 | + |
| 31 | +# Install PHP dependencies |
| 32 | +composer install |
| 33 | + |
| 34 | +# Install JS dependencies |
| 35 | +pnpm install |
| 36 | + |
| 37 | +# Copy env file and configure |
| 38 | +cp .env.example .env |
| 39 | +php artisan key:generate |
| 40 | + |
| 41 | +# Run migrations |
| 42 | +php artisan migrate |
| 43 | + |
| 44 | +# Start dev servers |
| 45 | +php artisan serve |
| 46 | +pnpm dev |
| 47 | +``` |
| 48 | + |
| 49 | +## Workflow |
| 50 | + |
| 51 | +1. Create a new branch off `main`: |
| 52 | + ```bash |
| 53 | + git checkout -b feature/your-feature-name |
| 54 | + ``` |
| 55 | +2. Make your changes, following the code style guidelines below. |
| 56 | +3. Commit with a clear, descriptive message: |
| 57 | + ```bash |
| 58 | + git commit -m "Add: your feature" |
| 59 | + ``` |
| 60 | +4. Push your branch and open a Pull Request: |
| 61 | + ```bash |
| 62 | + git push origin feature/your-feature-name |
| 63 | + ``` |
| 64 | +5. Fill out the PR description explaining what changed and why, and link any related issue. |
| 65 | + |
| 66 | +### Branch naming |
| 67 | + |
| 68 | +- `feature/short-description` — new features |
| 69 | +- `fix/short-description` — bug fixes |
| 70 | +- `refactor/short-description` — code cleanup with no behavior change |
| 71 | +- `chore/short-description` — tooling, config, or maintenance tasks |
| 72 | + |
| 73 | +## Code Style & Quality |
| 74 | + |
| 75 | +Before submitting a PR, please run: |
| 76 | + |
| 77 | +```bash |
| 78 | +# PHP formatting |
| 79 | +./vendor/bin/pint |
| 80 | + |
| 81 | +# PHP static analysis |
| 82 | +./vendor/bin/phpstan analyse |
| 83 | + |
| 84 | +# JS/Vue linting |
| 85 | +pnpm lint |
| 86 | + |
| 87 | +# Tests |
| 88 | +php artisan test |
| 89 | +``` |
| 90 | + |
| 91 | +General guidelines: |
| 92 | +- Follow existing Laravel conventions (FormRequests for validation, resource controllers, etc.). |
| 93 | +- Keep Vue components under `resources/js/Pages` and `resources/js/Components` organized and reusable. |
| 94 | +- Avoid passing non-database fields into mass assignment (`create()`/`update()`); validate and filter explicitly. |
| 95 | +- Keep PRs focused — one feature or fix per PR is easier to review. |
| 96 | + |
| 97 | +## Project Structure |
| 98 | + |
| 99 | +``` |
| 100 | +hscstack/ |
| 101 | +├── app/ |
| 102 | +│ ├── Models/ # Subject, Node, Resource models |
| 103 | +│ ├── Http/Controllers/ # Web + Admin controllers |
| 104 | +│ └── ... |
| 105 | +├── resources/ |
| 106 | +│ ├── js/ |
| 107 | +│ │ ├── Pages/ # Inertia Vue pages |
| 108 | +│ │ └── Components/ # Reusable Vue components |
| 109 | +│ └── views/ # Blade layouts |
| 110 | +├── routes/ |
| 111 | +│ ├── web.php # Public routes |
| 112 | +│ └── admin.php # Admin routes |
| 113 | +├── public/storage/ # Uploaded files |
| 114 | +├── .env.example |
| 115 | +└── README.md |
| 116 | +``` |
| 117 | + |
| 118 | +## Content Contributions (Non-Code) |
| 119 | + |
| 120 | +If you want to contribute academic resources (notes, PDFs, questions, etc.) rather than code, you don't need to touch this repository at all. Instead: |
| 121 | + |
| 122 | +1. Become a member at [hscstack.mvp.bd/join](https://hscstack.mvp.bd/join) |
| 123 | +2. Log in to the platform and upload your resource under the relevant subject and chapter. |
| 124 | +3. Your submission goes live after a quick admin review. |
| 125 | + |
| 126 | +Please only upload content you created or have permission to share, and avoid copyrighted textbooks or board materials. |
| 127 | + |
| 128 | +## Reporting Bugs & Requesting Features |
| 129 | + |
| 130 | +- Use [GitHub Issues](https://github.com/trtajim/hsc-stack/issues) for bugs and feature requests. |
| 131 | +- Include steps to reproduce, expected vs. actual behavior, and screenshots if relevant (for UI bugs). |
| 132 | + |
| 133 | +## Questions? |
| 134 | + |
| 135 | +Reach out at **hello@tajimz.xyz** or open a discussion via GitHub Issues. |
0 commit comments