Portfolio / Workspaces / C++ Calculator
FULL-STACK C++ · V10.2

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.

2Calculator modes
4REST endpoints
64-bitMaximum programmer word

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.

Browser
HTML · CSS · JS
HTTP + JSON
Drogon REST API
C++ Engines

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.

MethodEndpointPurpose
GET/healthHealth and capability summary
GET/api/infoMachine-readable metadata
POST/api/evaluateScientific evaluation
POST/api/programmerConversions 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

C++DrogonJsonCppCMakeDockerRESTHTML5CSS3JavaScriptGitHub ActionsRender
V10.2 · RELEASED

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.