Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFT Backend

This is the backend of the CFT, accompanying the frontend in this repository. Written in Java with the help of Spring Boot, the backend performs CRUD operations on request of the frontend, interacting with a PostgreSQL database to store data. It also interacts with another server that provides AI predictions, uses Google's Drive and Sheets APIs to create and edit spreadsheets to save snapshots of the fighter position chart, and generates images on the fly that show further statistics.

Configuration Varaibles and Secrets

This application uses the configuration files application.properties and cft.properties to initialize values for configurations and secrets. Both of these files should be created and placed in the src/main/resources directory.

The application.properties file contains the core configuration settings and secrets used by the project, including database credentials, Hibernate configuration settings, and the port to run the server on. It should have the following structure:

spring.jpa.hibernate.ddl-auto=update

spring.datasource.url=jdbc:postgresql://<url>:<port>/<database name>
spring.datasource.username=<username>
spring.datasource.password=<password>
spring.datasource.driver-class-name=org.postgresql.Driver

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB

error.whitelabel.enabled=false

server.port=<server port>

The cft.properties file contains configuration settings that are specific to this application, such as the Google API related variables. It should have this structure:

cft.files.folder-name=<folder name on disk to store image files>
cft.google.credential-path=<path to the Google Service Account credential JSON file>
cft.google.snapshot-folder-id=<ID of the Google Drive folder containing the event snapshots>

About

Spring Boot backend for a simulation of an MMA league, with full customization for fighters, events, and fights.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages