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.