/EducAPI

Springboot API that provides contexts and challenges in a collaborative database.

Primary LanguageJava

Educ API

Springboot API that provides contexts and challenges in a collaborative database.

GitHub Type Badge enter image description here GitHub tag (latest by date)

🛠 Tech Stack

To make this project run you will need to have the following items installed:

  • Docker and Docker Compose
  • Java 11 or OpenJDK 11
  • PostgreSQL 12.3 (it is recommended to use a Docker container)
  • Intelij or other IDE of your choice

This project also uses the following technologies:

  • Spring Boot - 2.2.7.RELEASE
  • JPA
  • Hibernate
  • H2 Database
  • Maven 4.0.0
  • Swagger 2.9.2
  • JUnit 4

Note: Use Insomnia or another tool to test calls to API endpoints

🚀 Starting the project

You must open a terminal and clone this repository:

To clone this repository via HTTPS:

a4sufpb@a4sufpb:~$ git clone https://github.com/a4s-ufpb/EducAPI.git

Access the cloned repository through the IDE of your choice and change the spring.profiles.active variable in the EducAPI/src/main/resources/application.properties file to dev or test.

Create a .env file in the project's root directory, to set the environment variables used in the API, and fill this file with the following content:

EDUCAPI_VERSION=1.0.4
PROFILE_ACTIVE=dev
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=educapi
DB_URL=jdbc:postgresql://db:5432/${POSTGRES_DB}
TOKEN_KEY=educapi-dev

NOTE: Configure the environment variables above according to the PostgreSQL connection created on your machine.

NOTE: Remember to create a database with the name defined in the value of the POSTGRES_DB variable.

If you are NOT going to run the project using Docker, download the dependencies needed to run the project by right-clicking on the EducAPI/pom.xml file.

To run the API locally on your machine, open a terminal at the root of the project and enter the following commands:

a4sufpb@a4sufpb:~$ export $(cat .env | xargs)
a4sufpb@a4sufpb:~$ ./mvnw spring-boot:run

Go to http://localhost:8080/to access the API.

If you are going to run the project USING Docker, just open a terminal at the root of the project and type:

a4sufpb@a4sufpb:~$ docker-compose up --build

To stop the project just close the terminal.

Go to http://localhost:8080/to access the API.

NOTE: Whenever you want to test any changes that werw made to the code, repeat the commands above to stop and start again.

Note: Pull requests should only be accepted if the project is able to build using Docker.

📕Documentation

The API in production at https://api.apps4society.dcx.ufpb.br/educapi/ and the documentation can be obtained at https://api.apps4society.dcx.ufpb.br/educapi/swagger-ui.html. In addition, you can acess the API documentation locally on your machine by accessing localhost:8080/swagger-ui.html.

To learn more about Spring boot, how to install and how to use it, access the documentation.

Also access the JUnit, JPA and Hibernate documentation.

📄 Licence

This project is licensed under the MIT License, see also LICENSE.md for more details.

👩‍💻👨‍💻 Contributors


Amanda Azevedo


Emerson Dantas


Francivaldo Napoleão


Marcos Ludgero

Project coordinator


Ayla Dantas Rebouças


Carlos Hacks

🤝 How to contribute?

Please read CONTRIBUTING.md for more details regarding our content code and the process of submitting pull requests to us.

📫 Contact us

  • To learn more about the Apps4Society and SisAlfa project visit the websites Site Apps4Society Site Sisalfa
  • Follow the Apps4Society on Instagram Twitter URL
  • Contact us by email Gmail Badge Gmail Badge