Del-Norte-Farmers-Iowa-Hawkeyes-Fanclub / IHF-Frontend

Blogs and Issues for project Planning
https://del-norte-farmers-iowa-hawkeyes-fanclub.github.io/Del-Norte-Association-of-Sustainable-Farmers-Saftey-OSHA-and-Fantasy-Log-Book/
Apache License 2.0
0 stars 0 forks source link

Rohin, Vishnu, Akshat, Vardaan - Python & Java Backend #20

Open rohinsood opened 6 months ago

rohinsood commented 6 months ago

Objective

The objective of this final sprint and feature addition is to integrate the Java Spring application and Python Flask application within a single backend repository. This involves setting up a Dockerized environment where both applications can run concurrently, share a common SQLite database, and utilize the same data. This integration aims to streamline development, improve efficiency, and ensure both applications can seamlessly interact with the shared database.

Tasks

Plan

Requirements

Docker Setup

Database Schema Integration

Configuration & Deployment

Utilization

Schedule

Example Configuration

docker-compose.yml

version: '3.8'

services:
  spring-app:
    build:
      context: ./spring-app
    volumes:
      - ./db.sqlite:/app/db.sqlite
    ports:
      - "8080:8080"
    environment:
      - SPRING_DATASOURCE_URL=jdbc:sqlite:/app/db.sqlite

  flask-app:
    build:
      context: ./flask-app
    volumes:
      - ./db.sqlite:/app/db.sqlite
    ports:
      - "5000:5000"
    environment:
      - DATABASE_URL=sqlite:///app/db.sqlite

volumes:
  db-data:
akshat122805 commented 6 months ago

Akshat Big Progress Check #3 Overview & Reflection

The "Hoops to Harvest" simulator is a game where players simulate the life of a character who starts as either a basketball player or a farmer. Players make decisions at various points, influencing the character's success, primarily measured by accumulated money. The results are stored on a leaderboard for comparison with other players.

Accomplishments

PyJava Backend Infrastructure

Screenshot 2024-05-27 at 9 27 08 PM

For our backend infrastructure, we run both servers under one docker instance and then there are two separate containers within the same instance that each server runs on a unique port. So, this essentially allows us to manage and monitor the status of both servers using docker and once we have that, we run into a few issues, which we documented in this blog.

Functionality and Contributions of Dual Login Authentication & Adding Protected Routes

So basically there is an integrated database where two servers are able to access and change in the same database. And this allows for like two different applications to be able to be used in the same projects for like data science applications vs. like a spring boot specific application. Anyways, what I personally worked on was a dual login authenticator. How this works is that in the flask server and in the spring boot server, there is two different models for the user and the person, and what we do is that in the frontend we create two separate requests with the same email and password, and what this allows us to do is to basically login into both web servers, login into both backend servers, and we are able to access protected routes, once we’re logged on both ends. And we login into both ends mainly so we can have protected routes in the backend or the JWT. Although, we should only need one in a typical application but you can see here via postman and different requests, that this was our main approach of constructing a dual login authenticator.

AP Exam Side Project | Mortensen's Awesome AP Exam Guide

Challenges:

Pair Programming Dynamics:

TheoH32 commented 6 months ago

Team Features

Individal Features

Takeaways

F1nnC commented 6 months ago

Observation:

Feature Presenting:

Technical

Demo

Questions