# 1. Install WSL (PowerShell as Admin)
wsl --install -d Ubuntu-22.04
# Restart, create user when prompted# 2. Run setup script
cd /mnt/c/Users/YOUR_USERNAME/Documents/GitHub/ServerKit
chmod +x ./scripts/dev/*.sh
./scripts/dev/setup-wsl.sh
# 3. Start dev servers
./dev.shOpen http://localhost:41921 — login: admin / admin
Troubleshooting: If you get
bad interpretererror, fix line endings:sed -i 's/\r$//' ./scripts/dev/*.sh
./scripts/dev/setup-linux.sh
./dev.sh./scripts/dev/dev.bat up # Windows
docker compose up -d --build # Linux/MacThe compose stack runs the all-in-one panel container (Dockerfile) on
http://localhost:5000. It has no access to the host, so system-management
features (packages, firewall, systemd, host nginx) are unavailable — use
./dev.sh for those.
| Task | Command |
|---|---|
| Start both | ./dev.sh |
| Backend only | cd backend && source venv/bin/activate && python run.py |
| Frontend only | cd frontend && npm run dev |
| Build frontend | cd frontend && npm run build |
Click to expand manual setup steps
- Python 3.11+
- Node.js 20+
- Docker (optional)
- Git
git clone https://github.com/YOUR_USERNAME/ServerKit.git
cd ServerKit
git remote add upstream https://github.com/jhd3197/ServerKit.git
git checkout devcd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python run.pycd frontend
npm install
npm run devServerKit/
├── backend/ # Flask API
│ ├── app/
│ │ ├── api/ # API route blueprints
│ │ ├── models/ # SQLAlchemy models
│ │ └── services/ # Business logic
│ ├── config.py # Configuration
│ ├── run.py # Application entry point
│ └── requirements.txt
│
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API client
│ │ └── styles/ # SCSS stylesheets
│ ├── package.json
│ └── vite.config.js
│
├── docs/ # Documentation
├── nginx/ # Nginx configuration
└── docker-compose.yml
Backend:
backend/app/__init__.py- Flask app factorybackend/app/api/- API endpoints (one file per feature)backend/app/services/- Business logic servicesbackend/app/models/- Database models
Frontend:
frontend/src/App.jsx- Main app with routingfrontend/src/pages/- Page componentsfrontend/src/components/- Shared componentsfrontend/src/services/api.js- API clientfrontend/src/styles/- SCSS stylesheets
Use descriptive branch names:
feature/multi-server-support
fix/login-redirect-loop
docs/api-examples
refactor/notification-service
Write clear, concise commit messages:
Add Discord webhook notification support
- Create NotificationService for webhooks
- Add notification API endpoints
- Implement Discord embed formatting
- Add frontend notification settings
Format:
- First line: Brief summary (50 chars max)
- Blank line
- Body: Detailed description (wrap at 72 chars)
- Follow PEP 8 style guide
- Use type hints where helpful
- Document public functions with docstrings
- Use meaningful variable names
def get_system_stats() -> dict:
"""
Retrieve current system statistics.
Returns:
dict: CPU, memory, disk, and network stats
"""
cpu_percent = psutil.cpu_percent(interval=1)
memory = psutil.virtual_memory()
# ...- Use functional components with hooks
- Use meaningful component and variable names
- Keep components focused and small
- Use SCSS for styling (not inline styles)
const ServerStats = ({ serverId }) => {
const [stats, setStats] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetchServerStats(serverId).then(setStats);
}, [serverId]);
if (loading) return <LoadingSpinner />;
return <StatsDisplay stats={stats} />;
};- Use the existing design system variables
- Follow BEM-like naming conventions
- Keep specificity low
- Use the component/page file structure
.notification-card {
background: $bg-card;
border-radius: $radius-md;
&__header {
padding: $spacing-md;
}
&--expanded {
border-color: $primary-color;
}
}cd backend
pytest
pytest --cov=app # With coveragecd frontend
npm run lint # ESLint
npm run build # Production build (compile check)There is no frontend unit-test suite yet — linting and a clean production build are the current gate. See
dev.ps1 validate/dev.sh validatebelow for the full pre-submit check.
Run the dev validation suite to check for common issues:
# Windows
.\dev.ps1 validate# Linux/macOS
./dev.sh validateThis runs eslint, bandit (security scanner), pytest, and a frontend production build.
Before submitting, test your changes:
- Run the full application
- Test the feature in multiple browsers
- Test error cases and edge cases
- Verify responsive design (mobile/tablet)
-
Update your fork:
git fetch upstream git rebase upstream/dev
-
Push your branch:
git push origin feature/your-feature
-
Create Pull Request:
- Go to GitHub and create a PR targeting the
devbranch (notmain) - Fill out the PR template
- Link any related issues
- Go to GitHub and create a PR targeting the
Important: All PRs should target the
devbranch, notmain. Themainbranch is reserved for stable releases.
- PR Description:
- Describe what changed and why
- Include screenshots for UI changes
- List testing steps
- Note any breaking changes
- Code follows project style guidelines
- Self-reviewed the code
- Added/updated tests if needed
- Updated documentation if needed
- No console errors or warnings
- Tested on multiple browsers (for frontend)
For user-facing changes, add a short note to CHANGELOG.md under Unreleased.
Use Added, Changed, Deprecated, Removed, Fixed, or Security, with
each category appearing only once per version. Explain the behavior users gain
or the problem fixed; include upgrade actions for incompatible changes. Internal
refactors and test-only changes do not normally need an entry.
When preparing a stable release, move only the changes included in that release
into a ## [X.Y.Z] - YYYY-MM-DD section, newest first. Verify the version against
the release tag and the date against its actual UTC publication date; do not
invent dates for untagged development versions. Add the release link and a
comparison with the previous published panel tag. Keep subsequent development
work under Unreleased and update its comparison base. GitHub release notes
should include that version's summary or link directly to its changelog section.
Check the notes against the release's commit range before publishing. A version bump alone is not evidence that a release was published.
- Maintainers will review your PR
- Address any requested changes
- Once approved, your PR will be merged
We especially welcome contributions in these areas:
- Multi-Server Support - Agent development, remote monitoring
- Git Deployment - GitHub/GitLab webhooks, auto-deploy
- Backup System - S3/B2 integration, scheduled backups
- Security Enhancements - Fail2ban, SSH key management
- Email Server - Postfix/Dovecot integration
- API Improvements - Rate limiting, API keys
- Team Features - Multi-user, RBAC
- Bug fixes
- Documentation improvements
- Test coverage
- UI/UX improvements
- Performance optimizations
- Accessibility improvements
- Open a GitHub Discussion
- Check existing Issues
- Review the Documentation
Thank you for contributing to ServerKit!