Scientific and Programmer Calculator.
A deployed web application powered by a real C++ backend, a custom mathematical expression parser, a fixed-width programmer engine, REST APIs, Docker and automated testing.
The Challenge
Building more than a browser-only calculator.
The goal was to demonstrate C++ as the backend of a modern web application. The project needed to parse scientific expressions without JavaScript eval(), preserve exact 64-bit programmer values, model signed and unsigned fixed-width behavior, provide a responsive interface and remain testable from development through production.
Architecture
Presentation and calculation logic are deliberately separated.
HTML · CSS · JS
Core Capabilities
Scientific mathematics and low-level integer behavior in one application.
Scientific Engine
- Custom parser with precedence, parentheses and unary values
- Functions including trig, logarithms, roots and factorials
- DEG and RAD angle modes
- Memory and history with previous-answer recall
Programmer Engine
- BIN, OCT, DEC and HEX representations
- 8/16/32/64-bit signed and unsigned words
- AND, OR, XOR, NOT, shifts and rotations
- Interactive bit editor and wrap-to-width behavior
REST API
The C++ service owns validation and calculation.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /health | Health and capability summary |
| GET | /api/info | Machine-readable metadata |
| POST | /api/evaluate | Scientific evaluation |
| POST | /api/programmer | Conversions and bitwise operations |
Engineering Decisions
Exact 64-bit transport
Programmer values travel as JSON strings, preventing JavaScript precision loss before values reach C++.
Backend-owned correctness
The frontend is never trusted to enforce calculation rules; the API validates every request independently.
Explicit overflow behavior
Results wrap to the selected width, matching real fixed-width integer behavior.
One deployable container
Docker provides a consistent environment for development, GitHub Actions and Render.
Technology Stack
Outcome
A deployed, tested and documented full-stack C++ portfolio project demonstrating parsing, REST API design, binary arithmetic, frontend integration, responsive design, containerization, continuous integration and production deployment.