From d4ae19a0f517dee1eb09b9c77b92f9ce671340ba Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 14:55:24 +0100 Subject: [PATCH 01/11] feat: add Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..44be037 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 5000 + +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"] From 21ae022e887955a2b9bb4ec68f9bd567750528ac Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:15:30 +0100 Subject: [PATCH 02/11] fix: remove minor stuff --- app.py | 2 +- pyproject.toml | 1 + requirements.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 57a9799..01d1932 100644 --- a/app.py +++ b/app.py @@ -43,4 +43,4 @@ def main() -> str: if __name__ == "__main__": - app.run(debug=True) + app.run(debug=False) diff --git a/pyproject.toml b/pyproject.toml index b1ade20..7f45a28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ requires-python = ">=3.14" dependencies = [ "cachetools>=6.2.4", "flask>=3.1.2", + "gunicorn>=23.0.0", "numpy>=2.4.0", "pytest>=9.0.2", "requests>=2.32.5", diff --git a/requirements.txt b/requirements.txt index 7cda145..7f54269 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ certifi==2026.1.4 charset-normalizer==3.4.4 click==8.3.1 flask==3.1.2 +gunicorn==23.0.0 idna==3.11 iniconfig==2.3.0 itsdangerous==2.2.0 From efeb13ae80130517a93e18c7e7122caf540f7006 Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:25:39 +0100 Subject: [PATCH 03/11] feat: add dependabot --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..98a911f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + target-branch: "dev" + schedule: + interval: "monthly" + open-pull-requests-limit: 1 + groups: + all-python-deps: + patterns: + - "*" From baed5e712ab9fa6715ea0874dc45d1dcec935d9e Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:26:14 +0100 Subject: [PATCH 04/11] feat: add github sponsorships --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..b7dd43d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: oheyek +buy_me_a_coffee: ohey From 9f15a594a23cb6f45f9495b5fb1c064cb5b5ff8b Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:27:12 +0100 Subject: [PATCH 05/11] feat: add CI/CD unit tests --- .github/workflows/tests.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..309921e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tests + +on: + pull_request: + branches: [dev] + workflow_call: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - name: Install UV + uses: astral-sh/setup-uv@v2 + with: + enable-cache: true + + - name: Install dependencies & test tools + run: | + uv run pip install -r requirements.txt + uv run pip install pytest + + - name: Run tests + run: uv run pytest src/tests/ -v --tb=short From 665216e917a464dc5fe87739c94097aab685f43a Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:28:32 +0100 Subject: [PATCH 06/11] feat: add automatic doxygen documentation --- .github/workflows/ci_cd.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 0000000..8814dcf --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,47 @@ +name: CI/CD + +on: + push: + branches: [main] + paths-ignore: + - "requirements.txt" + workflow_dispatch: + +permissions: + contents: write + pages: write + id-token: write + +jobs: + run-tests: + uses: ./.github/workflows/tests.yml + + build-docs: + needs: run-tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Doxygen & Graphviz + run: | + sudo apt-get update + sudo apt-get install -y doxygen graphviz + + - name: Generate documentation + run: doxygen Doxyfile + + - name: Upload artifact for GitHub Pages + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/html + + deploy-docs: + needs: build-docs + runs-on: ubuntu-latest + environment: + name: github-pages + steps: + - name: Deploy to GitHub Pages + id: deploy + uses: actions/deploy-pages@v4 From 3f817f6189c5d9f07b6f96e94ad38eb5aa28fa49 Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:32:01 +0100 Subject: [PATCH 07/11] feat: add automatic docker image building --- .github/workflows/ci_cd.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8814dcf..6f8bf09 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -45,3 +45,25 @@ jobs: - name: Deploy to GitHub Pages id: deploy uses: actions/deploy-pages@v4 + + build-docker: + needs: build-docs + runs-on: ubuntu-latest + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + IMAGE_NAME: oheyek/coin-cast + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to Docker + run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin + + - name: Build Docker image + run: | + docker build -t $IMAGE_NAME:latest . + + - name: Push Docker image + run: | + docker push $IMAGE_NAME:latest From 0b2181b24ba63bc0d56f892839ea0896dfd1b92b Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:43:17 +0100 Subject: [PATCH 08/11] feat: add automatic deploy to render --- .github/workflows/ci_cd.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6f8bf09..b3e7334 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -67,3 +67,11 @@ jobs: - name: Push Docker image run: | docker push $IMAGE_NAME:latest + + deploy-render: + needs: build-docker + runs-on: ubuntu-latest + steps: + - name: Trigger Render deploy + run: | + curl -X POST ${{ secrets.RENDER_DEPLOY_HOOK }} From 9c8777d4856faadaa060969dc478a82adb05d7e5 Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:48:32 +0100 Subject: [PATCH 09/11] feat: remove deployment due to free api limits the site doesn't work online --- .github/workflows/ci_cd.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b3e7334..6f8bf09 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -67,11 +67,3 @@ jobs: - name: Push Docker image run: | docker push $IMAGE_NAME:latest - - deploy-render: - needs: build-docker - runs-on: ubuntu-latest - steps: - - name: Trigger Render deploy - run: | - curl -X POST ${{ secrets.RENDER_DEPLOY_HOOK }} From 593977fcd086a3e58f63331249713a7c6e1d00df Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 15:52:42 +0100 Subject: [PATCH 10/11] feat: change project discription --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7f45a28..435d4e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "coincast" -version = "0.1.0" -description = "Add your description here" +version = "1.0.0" +description = "An interactive crypto price analysis tool built in Python, featuring historical data visualization and short-term price forecasting. The project is fully containerized and deployed via automated cloud infrastructure." readme = "README.md" requires-python = ">=3.14" dependencies = [ From 44e6c099cdfeefab75383613b78a69d4ac939781 Mon Sep 17 00:00:00 2001 From: oheyek Date: Wed, 7 Jan 2026 16:03:12 +0100 Subject: [PATCH 11/11] feat: add readme --- README.md | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/README.md b/README.md index e69de29..f650f16 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,173 @@ +# CoinCast Logo CoinCast + +![Python Version](https://img.shields.io/badge/python-3.14%2B-blue?logo=python&logoColor=white) +[![License](https://img.shields.io/github/license/oheyek/CoinCast?color=green)](LICENSE) +![Platform](https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey) +[![Docker Pulls](https://img.shields.io/docker/pulls/oheyek/coin-cast)](https://hub.docker.com/r/oheyek/coin-cast) +[![Documentation](https://img.shields.io/badge/docs-github.io-blue)](https://oheyek.github.io/CoinCast/) + +A powerful web application for cryptocurrency price forecasting with an intuitive interface. + +## โœจ Features + +- **Multi-Crypto Support**: Fetch and analyze prices for various cryptocurrencies. +- **Real-Time Data Fetching**: Get up-to-date cryptocurrency prices instantly. +- **Price Predictions**: Predict future price trends using advanced algorithms. +- **Web-Based Interface**: Accessible from any device with a browser. +- **Linear Regression Predictions**: Predict future price trends using linear regression models. +- **Simple and Fast**: Analyze crypto data in the blink of an eye. +- **Cross-Platform**: Works seamlessly on Windows, macOS, and Linux. +- **Containerized**: Available as a Docker image for easy deployment. +- **Comprehensive Testing**: Thoroughly tested for reliability. + +## ๐Ÿ› ๏ธ Installation + +### Using Docker (Recommended) + +1. Pull the Docker image: + ```bash + docker pull oheyek/coin-cast + ``` +2. Run the container: + ```bash + docker run -p 5000:5000 oheyek/coin-cast + ``` +3. Open your browser and go to `http://localhost:5000` + +### Running from Source + +```bash +# Clone the repository +git clone https://github.com/oheyek/CoinCast.git +cd CoinCast + +# Install dependencies +pip install -r requirements.txt + +# Run the application +python app.py +``` + +## ๐ŸŽฏ Usage + +1. Open the application in your browser (locally only). +2. Select a cryptocurrency to analyze. +3. View real-time prices and predictions. +4. Explore forecast trends instantly. + +## ๐Ÿ“‹ Supported Cryptocurrencies + +| Category | Cryptocurrencies Available | +| ------------ | ----------------------------------- | +| **Major** | Bitcoin (BTC), Ethereum (ETH), etc. | +| **Altcoins** | Litecoin (LTC), Ripple (XRP), etc. | + +## โš ๏ธ Disclaimer + +This project is for educational and portfolio purposes only. It is not intended as financial or investment advice. Cryptocurrency investments are highly volatile and risky. Always do your own research and consult with a financial advisor before making investment decisions. + +## ๐Ÿ”ง Technical Details + +- **Language**: Python 3.14+ +- **Web Framework**: Flask 3.1.2+ +- **WSGI Server**: Gunicorn 23.0.0+ +- **Testing**: pytest 9.0.2+ +- **Deployment**: Docker + +### Key Dependencies + +``` +flask>=3.1.2 +gunicorn>=23.0.0 +pytest>=9.0.2 +``` + +## ๐Ÿ—๏ธ Building from Source + +### Docker Build + +```bash +# Build the Docker image +docker build -t coin-cast . + +# Run the container +docker run -p 5000:5000 coin-cast +``` + +## ๐Ÿ—‚๏ธ Project Structure + +``` +CoinCast/ +โ”œโ”€โ”€ app.py # Flask application entry point +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”œโ”€โ”€ fetch_crypto.py # Crypto data fetching logic +โ”‚ โ”œโ”€โ”€ predict.py # Prediction algorithms +โ”‚ โ””โ”€โ”€ tests/ +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”œโ”€โ”€ test_fetch_crypto.py # Fetching tests +โ”‚ โ””โ”€โ”€ test_predict.py # Prediction tests +โ”œโ”€โ”€ static/ +โ”‚ โ”œโ”€โ”€ css/ +โ”‚ โ”‚ โ””โ”€โ”€ style.css # Stylesheets +โ”‚ โ””โ”€โ”€ img/ +โ”‚ โ”œโ”€โ”€ icon-doxygen.png +โ”‚ โ”œโ”€โ”€ icon.ico +โ”‚ โ””โ”€โ”€ icon.png # Icons +โ”œโ”€โ”€ templates/ +โ”‚ โ”œโ”€โ”€ base.html # Base template +โ”‚ โ””โ”€โ”€ index.html # Home page +โ”œโ”€โ”€ pyproject.toml # Project configuration +โ”œโ”€โ”€ requirements.txt # Python dependencies +โ”œโ”€โ”€ Dockerfile # Docker configuration +โ”œโ”€โ”€ LICENSE # MIT License +โ””โ”€โ”€ README.md # This file +``` + +## ๐Ÿงช Testing + +The project includes simple unit tests for all fetching and prediction functions. + +### Running Tests + +```bash +# Install test dependencies +pip install pytest + +# Run all tests +pytest + +# Run specific test file +pytest tests/test_fetch_crypto.py + +# Run with verbose output +pytest -v +``` + +## ๐Ÿค Contributions + +Contributions are welcome! Here's how you can help: + +1. Fork the repository +2. Create a new feature branch (`git checkout -b feature/amazing-feature`) +3. Commit your changes (`git commit -m 'Add amazing feature'`) +4. Push to the branch (`git push origin feature/amazing-feature`) +5. Open a Pull Request + +## ๐Ÿ“„ License + +This project is open-source and available under the [MIT License](LICENSE). + +--- + +**Happy Forecasting! ๐ŸŽ‰** + +## Author + +Made with โค๏ธ by ohey
+[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ohey) + +--- + +Due to the short limit of the free API, the site is not deployed as it can even get data once. If you find this project useful, consider buying me a coffee! โ˜• +