Skip to content

guto-alves/fatecando-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

216 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fatecando REST API

This is the backend of the Fatecando application, providing only a REST API. There is no UI. The fatecando-web project is a front-end application that consumes the REST API.

Running locally

With maven command line

git clone https://github.com/guto-alves/fatecando-api.git
cd fatecando-api
mvnw spring-boot:run -Dspring-boot.run.profiles=dev,h2

You can then access fatecando here: http://localhost:8081

Swagger REST API documentation presented here (after application start):

You can reach the swagger UI with this URL http://localhost:8081/swagger-ui/

Screenshot of the Fatecando Application Client

everyone-screenshot

In case you find a bug/suggested improvement for Fatecando

Our issue tracker is available here: https://github.com/guto-alves/fatecando-api/issues

Database Configuration

In its default configuration, Fatecando uses an in-memory database (H2) which gets populated at startup with data. The h2 console is exposed at http://localhost:8081/h2-console, and it is possible to inspect the content of the database using the jdbc:h2:mem:testdb url.

A similar setup is provided for MySQL and PostgreSQL if a persistent database configuration is needed. Note that whenever the database type changes, the app needs to run with a different profile: spring.profiles.active=mysql for MySQL or spring.profiles.active=postgresql for PostgreSQL.

Working with Fatecando in Eclipse / Spring Tool Suite (STS)

Prerequisites

The following items should be installed in your system:

  • Java 17 or newer (full JDK, not a JRE).
  • git command line tool
  • Your preferred IDE
    • Spring Tools Suite (STS)
    • Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in Help -> About dialog. If m2e is not there, follow the install process here

Steps:

  1. On the command line run:
    git clone https://github.com/guto-alves/fatecando-api.git
    
  2. Inside Eclipse or STS:
    File -> Import -> Maven -> Existing Maven project
    

Looking for something in particular?

Layer Source
REST API controllers REST folder
Service Service folder
Spring Data JPA JPA folder
Security Security folder