{"id":20605236,"url":"https://github.com/arnab-developer/bloodsugartracking","last_synced_at":"2026-04-16T18:05:12.958Z","repository":{"id":40464679,"uuid":"268065769","full_name":"Arnab-Developer/BloodSugarTracking","owner":"Arnab-Developer","description":"Blood sugar tracking app","archived":false,"fork":false,"pushed_at":"2022-05-13T03:53:09.000Z","size":873,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T02:24:22.456Z","etag":null,"topics":["asp-net","docker","sql-server"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arnab-Developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-30T11:26:17.000Z","updated_at":"2022-02-20T02:37:53.000Z","dependencies_parsed_at":"2022-08-09T21:12:46.235Z","dependency_job_id":null,"html_url":"https://github.com/Arnab-Developer/BloodSugarTracking","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FBloodSugarTracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FBloodSugarTracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FBloodSugarTracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arnab-Developer%2FBloodSugarTracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arnab-Developer","download_url":"https://codeload.github.com/Arnab-Developer/BloodSugarTracking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242250932,"owners_count":20096895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net","docker","sql-server"],"created_at":"2024-11-16T09:27:14.301Z","updated_at":"2026-04-16T18:05:12.921Z","avatar_url":"https://github.com/Arnab-Developer.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blood sugar tracking app\n\nThis web app is to track blood sugar data for 'fasting' and 'PP'.\n\n- Register with email and password.\n- Login with the email and password.\n- Create an user for which you want to enter blood sugar data.\n- Add blood sugar data for that user.\n\nThe app shows the time difference between last meal and test time. If the data is higher than normal\nthen it shows that data as red. The normal range of blood sugar is mentioned in the appsettings.json file.\n\n```json\n{\n  \"FastingNormal\": 100,\n  \"TwoHoursNormal\": 140,\n}\n```\n\n## Screenshots\n\nHome page\n\n![Home page](https://github.com/Arnab-Developer/BloodSugarTracking/blob/main/Assets/HomePage.jpg)\n\nUsers\n\n![Users](https://github.com/Arnab-Developer/BloodSugarTracking/blob/main/Assets/Users.jpg)\n\nAdd blood sugar data\n\n![Add blood sugar data](https://github.com/Arnab-Developer/BloodSugarTracking/blob/main/Assets/AddBloodSugar.jpg)\n\nView blood sugar data\n\n![View blood sugar data](https://github.com/Arnab-Developer/BloodSugarTracking/blob/main/Assets/BloodSugarData.jpg)\n\n## Tech stack\n\nIt is an ASP.NET 6 MVC app with Entity Framework for data access with SQL Server database. xUnit has been used for \nunit testing. ASP.NET Identity has been used for authentication.\n\n## Docker image\n\nThis app is in a docker image and stored in dockerhub.\n\nhttps://hub.docker.com/r/45862391/bloodsugartracking\n\n## How to run from local machine\n\n- Clone the repo\n- Create two databases (one for the application and another for identity) with the below script before run this app.\n\n```sql\nUSE [master]\nGO\n\nCREATE DATABASE [BloodSugarDb]\nON PRIMARY\n( \n    NAME = N'BloodSugarDb', \n    FILENAME = N'[local path]\\BloodSugarDb.mdf' , \n    SIZE = 8192KB , \n    MAXSIZE = UNLIMITED, \n    FILEGROWTH = 65536KB \n)\nLOG ON \n( \n    NAME = N'BloodSugarDb_log', \n    FILENAME = N'[local path]\\BloodSugarDb.ldf' , \n    SIZE = 8192KB , \n    MAXSIZE = 2048GB , \n    FILEGROWTH = 65536KB \n)\nGO\n\nCREATE DATABASE [BloodSugarIdentityDb]\nON PRIMARY\n( \n    NAME = N'BloodSugarIdentityDb', \n    FILENAME = N'[local path]\\BloodSugarIdentityDb.mdf' , \n    SIZE = 8192KB , \n    MAXSIZE = UNLIMITED, \n    FILEGROWTH = 65536KB \n)\nLOG ON \n( \n    NAME = N'BloodSugarIdentityDb_log', \n    FILENAME = N'[local path]\\BloodSugarIdentityDb.ldf' , \n    SIZE = 8192KB , \n    MAXSIZE = 2048GB , \n    FILEGROWTH = 65536KB \n)\nGO\n```\n\n- Update the connection strings in appsettings.json file if applicable.\n\n- Open terminal and navigate to the project folder and execute below command. Copy the generated \nsql script and execute in the `BloodSugarDb` database.\n\n```\ndotnet ef migrations script -c BloodSugarContext\n```\n\n- Now execute below command and copy the generated sql script and execute in the `BloodSugarIdentityDb` database.\n\n```\ndotnet ef migrations script -c ApplicationDbContext\n```\n\nOpen the solution in Visual Studio and press F5.\n\n## Hosting\n\nWhen a new release is created then this app is stored inside a docker image and push to docker hub through GitHub action. \nHosting in Azure Web App is not done as a part of GitHub action. That needs to be done manually.\n\n- Create a new resource group in Azure.\n- In that resource group create the following resources\n  - App Service Plan for Linux\n  - Web App with docker hub image `45862391/bloodsugartracking:[use the latest tag]`\n  - Create two SQL Servers and databases (one for the application and another for identity)\n- Update the connection strings with the database details in Web App configuration\n- Clone the repo in your local machine\n- Open terminal and navigate to the project folder and execute below command. Copy the generated \nsql script and execute in the application database in Azure.\n\n```\ndotnet ef migrations script -c BloodSugarContext\n```\n\n- Now execute below command and copy the generated sql script and execute in the identity database in Azure.\n\n```\ndotnet ef migrations script -c ApplicationDbContext\n```\n\nOpen the Web App URL in web browser and you should access the app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnab-developer%2Fbloodsugartracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnab-developer%2Fbloodsugartracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnab-developer%2Fbloodsugartracking/lists"}