The challenge
Organize products and track incoming and outgoing stock.
The solution
Product registration, low-stock alerts, filters and movement history.
Main features
- Product registration, filters and minimum-stock alerts.
- Stock entries and withdrawals with movement history.
- Dashboard metrics and CSV export.
Architecture
Original object-oriented Python version and web version with Firestore.
- Web interface
- Inventory rules
- Firestore
Technical decisions and limitations
The web version preserves the original Python project rules. Stock cannot become negative. The demo uses anonymous authentication and should not receive real data.
Project status
Public source code.
Availability
- Source code
- Public
- Demo
- Available
- Case study
- Available
- Status
- Completed
Context and problem
One of the first projects of the Computer Science degree: a terminal inventory system with object orientation and validation. In 2026 it gained a web version on the same rules.
How it works
- Product setup
- Stock in or out
- Movement recorded
- Dashboard and filters
Business rules
- Every movement needs a whole quantity above zero, and stock out never exceeds stock.
- No duplicate product names, and negative values are rejected.
- Stock value is quantity times price.
- On the web, quantity changes only through movements, and history is immutable (Firestore rules forbid editing or deleting).
Technical challenges and solutions
- Challenge: Moving a terminal program to the web without changing the rules. Solution: A pure JavaScript engine (model.js) separated from the UI and Firestore.
- Challenge: Keeping history when products are deleted. Solution: The product name is denormalized in each movement.
Security and privacy
- Firebase anonymous authentication and Firestore rules that prevent altering movements.
Tests and evidence
- Tests with node --test: rule engine (model.test.mjs), movement transaction, Firestore rules and emulator, plus a Python test (tests/test_estoque.py). Existence confirmed from the repository file listing; the tests were not run in this audit.
Lessons learned
- Separating business rules from the interface allowed reusing the logic in another environment.
Current status
Academic project preserved and evolved. Public code, with the original Python version and the web version, which, as documented in the repository, is on Firebase Hosting.
Documented evidence
The README records 33 automated model tests, including validation, movements and metrics.