intuitive-robots / pse-ss24-timetrack

Web application designed to simplify and streamline time tracking, vacation management, and timesheet verification for research assistants (HiWis) at the KIT Intuitive Robots Lab.
GNU General Public License v3.0
3 stars 0 forks source link
flask react

Intuitive Time Tracking Web-App for Research Assistants

Project Overview

This repository contains the code for a web application designed to simplify and streamline the process of time tracking for research assistants (HiWis) at Intuitive Robots Lab. The application facilitates accurate recording of work hours and ensures compliance with institutional regulations.

Features

Technologies

Documentation

Installation and Setup

Important note: To deploy the web app using Docker, make sure to use the Docker-Deployment branch. All other branches are intended for testing and are not suitable for production use.

1. MongoDB

The following command creates a MongoDB with authentication inside a Docker Container:

docker run --name mongoDB -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=<choose-db-username> -e MONGO_INITDB_ROOT_PASSWORD=<choose-db-password> -d mongodb/mongodb-community-server:latest

2. Flask-Backend

2.1 Generate the image

3.1 Find out IP-Address

3.2 Modify nginx.conf file within the /frontend directory

3.3 Modify package.json file within the /frontenddirectory

3.4 Generate the image

3.5 Run the image within a container

4.1 Retrieve Slack API Token

4.2 Write the token into the DB

Information around developing this project

Git Branch strategy for this repo & dev team

  1. Main branch: most stable version
  2. Docker-Deployment branch: used to create docker images and to deploy the Web-App
  3. Develop branch: contains changes that are in progress and may not be ready for production after all tests and the peer review have been successful, it is merged into Production
  4. Features / Fixes branches: Branches to work on specific features and fixes. Once the feature/fix is ready, you merge it into the develop branch.

Example of a workflow with this strategy:

  1. You want to develop a new feature.
  2. Create a branch called "newFeatureXYZ" based on the develop branch.
  3. Work on the feature in this topic branch unitil it's ready.
  4. Merge "newFeatureXYZ" into the develop branch and run tests.
  5. Make sure there are no merge conflicts - Change the code if necessary to resolve the conflicts - merge these changes into the develop branch
  6. Everything works fine - Merge develop into main
  7. Want to create a docker image? Merge into Docker-Deployment and follow the documentation above.

Installation and Setup in a Test Environment

Run the frontend

  1. Navigate to the "frontend" folder with the "cd" command in your terminal.
  2. Install all required dependencies with "npm install". Please make sure that you have Node.js installed.
  3. Start the Frontend with "npm start".

Run the backend

  1. Navigate to the "backend" folder with the "cd" command in your terminal.
  2. Run "pip install -r requirements.txt" to install all necessary packages.
  3. Use "python -m flask run" or "flask run" to run the flask project. Please make sure that you have all required pip packages installed.