A world-class, modular, and secure open-source web application for IP and subnet calculations. Built for production use, recruiter evaluation, and security auditor review.
Modern networks require accurate, secure, and user-friendly tools for subnet calculation and IP analysis. This project delivers a scalable, extensible, and production-ready solution for both IPv4 and IPv6, with a strong emphasis on:
- Code quality
- Security best practices
- Maintainability
- Professional documentation
- Python 3.8+
- Flask (Web Framework)
.
├── src/ # Core application logic (SOLID, DRY)
├── config/ # Environment & configuration
├── tests/ # Unit & integration tests (pytest)
├── docs/ # Architecture, changelog, security, contributing
├── scripts/ # Automation & developer utilities
├── .github/ # CI/CD workflows (GitHub Actions)
- ✅ IPv4 and IPv6 subnet calculations
- ✅ Subnet mask, CIDR, wildcard, and host range computation
- ✅ Download calculation results as CSV
- ✅ Secure-by-default configuration
- ✅ Modular, testable, and extensible architecture
- ✅ Production-ready documentation and ownership model
git clone https://github.com/JosephJonathanFernandes/ip-subnet-calculator-python
cd ip-subnet-calculatorpip install -r requirements.txtcp config/.env.example config/.envSet a secure secret key inside config/.env:
FLASK_SECRET_KEY=your-secure-secret-keyflask runAll core logic is fully tested using pytest.
pytest --cov=src- 🎯 Coverage Goal: 90%+ for core logic
- Linting
flake8 src/ tests/- Formatting
black src/ tests/- Pre-commit Hooks
See
.pre-commit-config.yaml
Automated using GitHub Actions (.github/workflows/ci.yml):
- Runs lint checks
- Executes unit & integration tests
- Measures test coverage
- Triggered on every push and pull request
- 🔐 No hardcoded secrets (
.env.exampleprovided) - 🛡️ All user input validated and sanitized
- 🌐 Secure HTTP headers enabled by default
- 📄 See
SECURITY.mdfor full security policy
- Contributing: See
CONTRIBUTING.md
Contributions are welcome and encouraged!
- ⭐ Recruiter- and reviewer-friendly
- 🧩 Clean, maintainable, and extensible codebase
- 🔐 Secure by default
- 🚀 Ready for production and open-source adoption
ARCHITECTURE.md– High-level system designCHANGELOG.md– Release historyCONTRIBUTING.md– Contribution guidelinesSECURITY.md– Security policy
- Recommended: pre-commit hooks
- Enforced linting & formatting
- Automated CI/CD ensures code quality on every PR
This project is licensed under the MIT License.