Giter VIP home page Giter VIP logo

dsfai2020 / task-and-nutrition-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 36.17 MB

An web application that displays body fat %, calorie ranges and more based on the input that you provide to it. The goal is to help users make more informed decisions with their physical training.

Python 95.34% PowerShell 0.02% Shell 0.01% C 1.01% JavaScript 0.18% CSS 0.03% HTML 0.01% Cython 3.10% C++ 0.21% Fortran 0.06% Forth 0.01% Smarty 0.02% XSLT 0.01% Dockerfile 0.01%

task-and-nutrition-manager's Introduction

About this App

Want a Easy to Use planner that encourages discussions without alienating your fitness? The goal of this app is to improve your production levels without ignoring your fitness. It's easy to get lost in the computer screen while having the gym on your backlog for what seems like forever. Whether its tracking a discussion by making sure that time efficiency is a priority, planning a simple to do list, planning an Agile Sprint or keeping track of the muscle groups that you've worked out in the week... This app aims to weave them all together into something easy to use right from the web. All you need is a Browser and your good to go. This project is meant to help people.

  • Link to site -

For Developers

Getting Started

If you'd like to hit the ground running make sure that you have Docker installed on your computer.

Navigate to the directory that has the Dockerfile in it and run the command:

What is Docker?

Think of Docker as it's own individual computer within your computer. In its world, it's capable of loading all of the neccessary settings needed to run the app without having to worry about what Operating System your running on.

For example, Let's say that you write an application on Linux. You might use the terminal and a lot of different commands to setup your app. You might have different packages installed on your computer.

Now let's say that you want to continue working on your app but from your Windows desktop. You might find out that your missing things like git. You might not have some of the dependencies setup like Nodejs. You might have to spend a good amount of time configuring you app each and every single time that you work on a different project from different computers.

Docker is here to help reduce the time spent on that process. Configuring Docker the first time has its own learning curve. But once its done on your computer, your apps can run all the dependencies that ran your app as though it were on any computer. Docker takes a snapshot image of it and makes it so that your computers can run the apps regardless of their operating systems.

Docker for Linux

Installing on linux Fedora https://docs.docker.com/desktop/install/fedora/

Once you go through the first step it's going to ask you to install the .rpm file. To do this navigate to the directory it downloaded into. Do not unzip or extract the files.

Instead run the command that the docker docs say to run on step 3.

Note:
    Replace version, without the arrows, with the version the .rpm file has from the download.
    Do the same thing for arch.  Arch just refers to the architecture your operating system is using.  You can find this by typing in the command. 
        <uname -m>

Docker for Windows

Installing on Windows 10 https://docs.docker.com/desktop/install/windows-install/

Using powershell to initiate docker commands. You'll need to run the powershell as with Admin Rights. Otherwise you won't be able to access commands like

If your having trouble using git to push or pull things from github. You can download gits GUI application. It has its own terminal (linux based) that allows you to run some git commands on your pc. Use this if your having a hard time getting git to work locally on your powershell (I use it).

Accessing the Application within Docker

Open up the Docker Desktop GUI and go into the containers tab. Your app will have a drop down arrow. Click it and it'll show an app image running on a port.

Click the port (It's a link) and it should open up the web app in your local browser.

Troubleshooting Start Issues (Page not Loading)

If the container is running but throws a page loading error there is a chance that you might have another server running on your local machine. If this happens try to close the other server and then run the container. If the react site doesn't load up then try to change the port settings on the container manually from inside of Docker-Desktop.

Changing the Port Settings

Go to the images tab on Docker Desktop. Then, in the local tab, select the image associated with your app by clicking on the underlined name.

It'll open up a screen with a lot of information on it. Look at the top of the screen and you'll see a box that says 'recommended fixes' and next to it you'll see a blue button that says Run with a drop down arrow next to it. Click on the Run button.

It'll open up a new screen that displays Optional Settings with a drop down arrow. Click the drop down arrow and look for the category that says ports. Enter a new port like 8000. This will run the application on that port and should fix the problem (If other ports are already being used.).

If you have to run any tests or get requests to the site make sure that your code is also making the correct calls to the correct URL's.

What are all the details in the compose.yaml file?

In a docker-compose.yaml file, everything indented under the services: section is considered as a separate service definition. Each service definition represents an individual container in your multi-container application.

Each service definition consists of properties like image, ports, environment, volumes, etc., which are specific to that particular container. These properties help configure the behavior of the container, including which image to use, which ports to expose, environment variables to set, volumes to mount, and more.

For example, in the following docker-compose.yaml file: version: '3'

services: web: image: nginx:latest ports: - "80:80" database: image: mysql:latest environment: MYSQL_ROOT_PASSWORD: example_password

There are two service definitions: web and database. The web service uses the nginx:latest image and maps port 80 of the container to port 80 of the host machine. The database service uses the mysql:latest image and sets the MYSQL_ROOT_PASSWORD environment variable.

Each service definition is isolated and represents a separate container in your application, allowing you to manage and orchestrate them together using Docker Compose.

Jenkins

Jenkins is a great tool for CI/CD - Continuous Integration and Development - and it runs as a Daemon on your computer or docker container. There are different ways to install it depending on your operating system or if you plan to use it within Docker (Which makes things a lot easier).

Installation documentation can be found below:

https://www.jenkins.io/doc/book/installing/linux/>

What it does?

Jenkins works as a server whether locally or within a Container. It has a great GUI to make things go really smooth. A small amount of account management is required (locally stored) and once its up and running you can: execute script chains that pull in an associated github branch repository setup virtual environments and install the packages from a requirements.txt file execute a pytest (assuming the venv had it installed) add more steps to the build process

If any step doesn't work the build is considered a Fail and Jenkins keeps a log of the output and names of the trial runs.

Before you install Jenkins (How to install Java Dependencies) Choose Long Term or Weekly

Long term support Java (Recommended Stable Version)

sudo wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade

Add required dependencies for the jenkins package

sudo dnf install java-17-openjdk sudo dnf install jenkins sudo systemctl daemon-reload

Weekly Release Java

sudo wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo dnf upgrade

Add required dependencies for the jenkins package

sudo dnf install java-17-openjdk sudo dnf install jenkins

How to start Jenkins on Fedora

Enable Jenkins: sudo systemctl enable jenkins

Start Jenkins: sudo systemctl start jenkins

Check Status of Jenkins: sudo systemctl status jenkins

Run Jenkins in the Browser

Open up your browser and go to:

localhost:8080

This should take you to the Login Screen

By default the logins are unique to each individual computer --Meaning that you'll have to configure your username and password per computer -- unless you use an advanced setup in a cloud or network structure (This scope of this project does not use this at this time but that may change in the future).

What to do after Jenkins is installed

Configure a build from a repository URL on Github

Steps coming soon...

Extra Notes

  • You started a backend created an env made its own folder didnt finish populating the env with the right packages you did install flask cors you made a requirements page You structured your folder so that it is heroku friendly when needed... It will be the contents of build (manaully made) that get pushed. Heroku asks for env, files etc...

  • You need to run the backend flask app you created and test it using a test client pytest.

  • After that you can push the backend to heroku for a build. Once thats done you'll be able to push the front end.

  • But before doing that you need to create the front end and run a basic test connection.

dont forget to link the two.

  • started a front end folder you did nothing but make a folder.

Resources for MongoDb and Python with Pandas

https://learn.mongodb.com/learn/course/mongodb-crud-operations-in-python/lesson-1-working-with-mongodb-documents-in-python/learn?client=customer

LINUX

You need to get HOW TO CONFIG the front end

You need to get HOW TO CONFIG the back end

DEVELOPMENT

You need to get HOW TO START the front end - REACT

You need to get HOW TO START the back end - FLASK

If you want to run a backend to use for testing purposes. Use the file named mock_server.py as an example. Then activate it by entering the following:

python -m flask --app mock_server run

You need to get HOW TO START the testing - pytest

PRODUCTION

You need to get HOW TO START the production front end - HEROKU

You need to get HOW TO START the production back end - AWS

task-and-nutrition-manager's People

Contributors

dsfai2020 avatar

Stargazers

 avatar

Watchers

 avatar

task-and-nutrition-manager's Issues

Sign in button needs to be repaired

Clicking the sign in doesn't connect users to their data.

It should connect them to their account/profile information for the site.

25-50-25 time ratio

  • - Feature test (direct)
  • Integration test (proximity)
  • Regression test (builds)

Docs for successful image/container Jenkins and docker installation for Windows needed

Since the Windows version, on your PC, is running within a container:

Check and see if Jenkins can execute commands in Linux (See if it takes build scripts)

  • Copy the build steps from Linux into Windows
  • Check if the container running Jenkins will accept linux commands (Does it run on a linux Kernel by default?)
  • IF it doesn't, translate a build from the Linux Jenkins (that is currently working) into Windows (terminal friendly).
  • Run a smoke test

Continue adding to the Readme Linux Jenkins configuration

Make sure the configuration for jenkins (post log in) is completed
Make sure that the github directions are included
Make sure the venv directions are included
Add steps from the already functioning jenkins site on the laptop
Explain

Restructure front end directory -- Clean up

Place files into directories that are relative.
Refactor any code that needs to be rerouted due to the name changes on file.
Run automated tests to ensure that everything works properly.

Run a smoke test on Docker/Jenkins using a basic pytest on windows

This process is to take place on Windows 10 using Docker. While also having Jenkins installed on a container that not only runs, but supports pytest from within docker as well.

ON WINDOWS 10

  • Smoke test a python app that runs through powershell
  • Get a python docker container file up and running on windows

ON JENKINS/DOCKER

  • make sure that it activates a venv and installs the packages from the python env of the repo from the terminal

  • make sure that properly runs a basic test

  • make sure that it then passes the test

  • ensure that the script for jenkins pulls the project in from github to its jenkins directory (which is hosted within Docker)

  • Once that is done, connect multiple containers (python and Jenkins) so that python is supported within Docker.

Failure in any of these areas results in a non completion.

Buttons aren't generating correctly

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Add Another Button
  2. Click on the button.
  3. Scroll down
  4. See error

Expected behavior
Clicking on the Add Another button should create a duplicate of the UI component (Title, Story, Estimate etc...) directly below it.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser FireFox
  • Version 121.0.1 64 Bit

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Linux docker test needed

Docker image needs to be pushed from windows to GitHub
Must install docker
Must successfully build from the docker file
Must run on Linux
The daemon must be activated as well
Must pass test from laptop

Template not working

Issue was is resolved. Instead of creating multiple markdown files for the different branch directories I just needed to go into the repository settings on GitHub. From there, go to issues and there is a place to configure the issue template. I'd been able to do this simply by creating the proper directories and file but creating one that didn't originate on the main branch might've caused the issue. It's still unknown EXACTLY what caused it but the issue itself has resolved and my template works. So I'll close this for now unless the need for an update should arise in the future.

User profiles with notification icons

X squared.

In coding the squared region is customizable. Make it so that it displays a red circle with a 1 to signify 1 new notification is ready. (UIX)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.