A full-stack web application to calculate how long you have until your coffee goes cold.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
is-my-coffee-cold
is a simple full-stack web application built to calculate the amount of time you have until your coffee goes cold, i.e., becomes undrinkable. The application achieves this through the combination of localised weather data sourced via external API calls alongside the Huen's method (otherwise referred to as the modified Euler method) for interpolating polynomials and Newton's law of cooling.
Essentially, the crux of this application is equating the point at which the temperature of a coffee,
To briefly summarise the mathematics utilised, in interpolation, we are generally given a set of
Given a derivative of a function is the limiting value of the slope of the line connecting two points on a curve, then for suitably small values of step-size
Then using Euler’s method to approximate
The remainder of the application follows standard paradigms for CRUD applications, albeit expanded to a full-stack pattern with a back-end API load-balanced via an API Gateway.
The following are the main languages and technologies utilised in building the application.
To run the entire application locally you can follow either one of two options:
- Using Docker
- Manual execution
The following are the assumed prerequisites required for local development and usage of the application.
For both pathways in local development and usage of the application, you will need your own Firebase Admin SDK configuration. You can get one here. Once this has been completed:
- Clone the repository
git clone https://github.com/jamestkelly/is-my-coffe-cold.git
- Copy the environment variables for each respective service
cd api && cp .env.template .env && cd ../frontend && cp .env.template .env
- Populate the environment variables for each service with the corresponding values.
- From the
root
of the repository:cd /path/to/is-my-coffee-cold docker compose up
-
Install the required packages
cd api go mod install cd ../frontend npm install
-
Initialise the back-end API server
cd api go run cmd/server/main.go
-
Initialise the front-end
cd frontend npm run start
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Build original application (re:
is-my-coffee-cold/v1
) - Create new design for the new brew, e.g., 2023 onwards.
- Build API microservice.
- Convert original
TypeScript
code toGo
for calculating coffee temperature decay. - Integrate Firebase Admin SDK.
- Implement an authentication (
auth
) service.
- Convert original
- Abstract API microservices behind API Gateway.
- Build new front-end application.
- Integrate with API microservice via API Gateway.
- Integrate API microservices with front-end client application.
- Establish application life-cycle.
- Create Docker images via corresponding
Dockerfiles
for local containerised development.- Front-end
- API
- Implement Kubernetes for application microservices.
- API
- API Gateway (Kong)
- Implement build and deploy pipeline for the front-end via Firebase.
- Implement build and deploy pipelines for the API and API Gateway to Oracle Cloud Infrastructure.
- Create Docker images via corresponding
- Add sub-repository specific
README.md
information, e.g., for the API and front-end. - Write up documentation covering application information and host it via GitHub repository Wiki.
- Push stable release of the application.
- Create long-term roadmap.
- Implement a way for users to provide feedback and bugs beyond GitHub issues.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU Affero General Public License. See LICENSE.txt
for more information.
Jim Tran kelly - [email protected]
Project Link: https://github.com/jamestkelly/is-my-coffee-cold
The following are several references and guides used in building the application that I would like to acknowledge.