Releases: y0ncha/calculator-api
Release list
Ex_07
What’s Changed
Persistence Layer Integration
- Added a database-backed persistence layer to the Calculator API, enabling durable storage of calculation operations using both PostgreSQL and MongoDB.
- Implemented PostgreSQL persistence via Prisma, including schema definitions, migrations, and typed data access for relational storage.
- Implemented MongoDB persistence via Mongoose, enabling document-based storage of operations alongside the relational model.
- Introduced explicit persistence method selection (e.g., POSTGRES or MONGO) with strict validation and predictable behavior.
Operation Recording and Data Consistency
- Calculation operations are now persisted only on successful execution.
Invalid requests, failed validations, or failed calculations are explicitly excluded from database writes. - Ensured consistent operation data models across PostgreSQL and MongoDB, allowing results fetched from either database to be logically comparable.
- Added safeguards and error handling to prevent partial writes and ensure database integrity.
In-Memory and Database History Behavior
- Preserved existing in-memory history as a fallback when no persistence method is provided.
- Clarified and enforced behavior when switching between in-memory, PostgreSQL, and MongoDB-backed history retrieval.
Documentation and Configuration Updates
- Updated project documentation to reflect the new persistence capabilities, configuration requirements, and runtime behavior.
- Added environment and setup guidance for running PostgreSQL and MongoDB alongside the API.
New Contributors
- @Copilot made their first contribution by implementing and integrating the persistence layers.
Full Changelog: Ex_05...Ex_07
Ex_05
Release Overview
The "Ex_05" release builds upon the foundation of Ex_04, offering a more refined and modular lightweight HTTP server developed using Node.js. This version continues to prioritize simplicity and usability while introducing improvements in structure, error handling, endpoint clarity, and new containerization support with Docker. It remains suitable for both learning purposes and lightweight production deployments.
Core Features
-
HTTP Request Handling:
The server retains its clear and structured routing system built on Express. Minor refinements improve code clarity and separation of concerns, making it even easier to build reliable web services and RESTful APIs. -
Calculator Functionality:
The modular calculator has been enhanced for better error reporting and modular separation. All previously supported operations—addition, subtraction, multiplication, division, exponentiation, absolute value, and factorials—remain, with improved handling of edge cases and response formatting. -
History and Stack Management:
History tracking and stack-based operations continue to be supported. Ex_04 refines the way responses are structured, and introduces more intuitive command handling for clearing and replaying batch operations. -
Docker Support:
Ex_05 introduces full Docker containerization support. The project now includes a Dockerfile and.dockerignoreto enable quick and portable deployment. A prebuilt image (y0ncha/calc-api:1.0) is available on Docker Hub, allowing users to run the server with a single command, no manual build required.
Technical Stack and Structure
-
Node.js & Express:
The server continues to use Node.js and the Express framework for robust routing and middleware support. Internal route definitions and middleware loading are further streamlined in this release. -
Modular Components:
The codebase now reflects cleaner separation between core components: calculation logic, operation history, stack control, and logging are each encapsulated in their own modules. This improves maintainability and testability. -
Configuration and Usability:
The server maintains a lightweight setup with minimal configuration. A clearer folder structure and usage documentation allow users to clone, install, and run the server with ease. Docker support further enhances usability by enabling consistent cross-platform deployment.
Changelog and Further Details
A comprehensive list of updates and changes included in this release can be found in the full changelog:
Release Overview
The "Ex_04" release builds upon the foundation of Ex_03, offering a more refined and modular lightweight HTTP server developed using Node.js. This version continues to prioritize simplicity and usability while introducing improvements in structure, error handling, endpoint clarity, and new containerization support with Docker. It remains suitable for both learning purposes and lightweight production deployments.
Core Features
-
HTTP Request Handling:
The server retains its clear and structured routing system built on Express. Minor refinements improve code clarity and separation of concerns, making it even easier to build reliable web services and RESTful APIs. -
Calculator Functionality:
The modular calculator has been enhanced for better error reporting and modular separation. All previously supported operations—addition, subtraction, multiplication, division, exponentiation, absolute value, and factorials—remain, with improved handling of edge cases and response formatting. -
History and Stack Management:
History tracking and stack-based operations continue to be supported. Ex_04 refines the way responses are structured, and introduces more intuitive command handling for clearing and replaying batch operations. -
Docker Support:
Ex_04 introduces full Docker containerization support. The project now includes a Dockerfile and.dockerignoreto enable quick and portable deployment. A prebuilt image (y0ncha/calc-api:1.0) is available on Docker Hub, allowing users to run the server with a single command, no manual build required.
Technical Stack and Structure
-
Node.js & Express:
The server continues to use Node.js and the Express framework for robust routing and middleware support. Internal route definitions and middleware loading are further streamlined in this release. -
Modular Components:
The codebase now reflects cleaner separation between core components: calculation logic, operation history, stack control, and logging are each encapsulated in their own modules. This improves maintainability and testability. -
Configuration and Usability:
The server maintains a lightweight setup with minimal configuration. A clearer folder structure and usage documentation allow users to clone, install, and run the server with ease. Docker support further enhances usability by enabling consistent cross-platform deployment.
Changelog and Further Details
A comprehensive list of updates and changes included in this release can be found in the full changelog:
Full Changelog for Ex_05
Summary
In summary, "Ex_05" improves upon Ex_04 by offering a more organized and maintainable codebase, clearer endpoint behavior, improved error handling, and seamless Docker deployment. It remains an effective platform for learning about Node.js servers, Express routing, and how to build extendable backend services with clean modular design.
Full Changelog: Ex_04...Ex_05
Ex_04
Release Overview
The "Ex_04" release builds upon the foundation of Ex_03, offering a more refined and modular lightweight HTTP server developed using Node.js. This version continues to prioritize simplicity and usability while introducing improvements in structure, error handling, and endpoint clarity. It remains suitable for both learning purposes and lightweight production deployments.
Core Features
-
HTTP Request Handling:
The server retains its clear and structured routing system built on Express. Minor refinements improve code clarity and separation of concerns, making it even easier to build reliable web services and RESTful APIs. -
Calculator Functionality:
The modular calculator has been enhanced for better error reporting and modular separation. All previously supported operations—addition, subtraction, multiplication, division, exponentiation, absolute value, and factorials—remain, with improved handling of edge cases and response formatting. -
History and Stack Management:
History tracking and stack-based operations continue to be supported. Ex_04 refines the way responses are structured, and introduces more intuitive command handling for clearing and replaying batch operations.
Technical Stack and Structure
-
Node.js & Express:
The server continues to use Node.js and the Express framework for robust routing and middleware support. Internal route definitions and middleware loading are further streamlined in this release. -
Modular Components:
The codebase now reflects cleaner separation between core components: calculation logic, operation history, stack control, and logging are each encapsulated in their own modules. This improves maintainability and testability. -
Configuration and Usability:
The server maintains a lightweight setup with minimal configuration. A clearer folder structure and usage documentation allow users to clone, install, and run the server with ease.
Changelog and Further Details
A comprehensive list of updates and changes included in this release can be found in the full changelog:
Full Changelog for Ex_04
Summary
In summary, "Ex_04" improves upon Ex_03 by offering a more organized and maintainable codebase, clearer endpoint behavior, and improved error handling. It remains an effective platform for learning about Node.js servers, Express routing, and how to build extendable backend services with clean modular design.
Ex_03
Release Overview
The "Ex_03" release showcases a lightweight HTTP server developed using Node.js. Designed with simplicity and efficiency in mind, this server provides a foundational solution for managing HTTP requests and responses. The project is intended for users seeking an easy-to-configure and straightforward web server setup, making it suitable for both learning purposes and lightweight production use.
Core Features
-
HTTP Request Handling:
The server processes HTTP requests and sends appropriate responses. Its structure supports clear routing and response logic, giving users a reliable basis for building web services or APIs. -
Calculator Functionality:
Integrated into the server is a modular calculator, capable of performing various arithmetic operations such as addition, subtraction, multiplication, division, exponentiation, absolute value, and factorials. This feature demonstrates how to extend the server with custom logic and endpoints. -
History and Stack Management:
The application tracks operation history, allowing users to review or clear past calculations. It also implements a stack mechanism for handling batch operations and advanced calculation flows.
Technical Stack and Structure
-
Node.js & Express:
The server is built on Node.js, using the Express framework to organize routes and middleware. This ensures robust request handling and extensibility. -
Modular Components:
Utilities for logging, operation history, and stack management are separated into modules. This modularity enhances maintainability and readability, making it easier to expand or adapt the codebase. -
Configuration and Usability:
The release prioritizes a lightweight footprint and simple configuration, so users can quickly clone the repository and start the server with minimal setup.
Changelog and Further Details
A comprehensive list of updates and changes included in this release can be found in the full changelog:
Full Changelog for Ex_03
Summary
In summary, "Ex_03" delivers a clean and efficient Node.js HTTP server with added calculator features, a focus on simplicity, and a modular codebase. It’s an excellent starting point for those interested in learning about web servers, Express routing, or building extendable backend services.