The Ferreandina backend lives in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/ferreandina-nosql/llms.txt
Use this file to discover all available pages before exploring further.
app/bc module. It is a Java 21 REST API built on top of Javalin 7 and backed by MongoDB. The server listens on port 7070 and is managed entirely by the Gradle 9 build system — no additional tooling installation is required.
Prerequisites
- Java 21 or later must be installed and available on your
PATH. The Gradle toolchain block inbuild.gradle.ktspins the JDK version to 21, so the build will fail fast if an incompatible JDK is detected. - Gradle wrapper is included (
gradlew/gradlew.bat). You do not need to install Gradle separately — all commands below use the wrapper.
Project Structure
Dependencies
The following key libraries are declared inapp/build.gradle.kts:
| Artifact | Version | Purpose |
|---|---|---|
io.javalin:javalin | 7.2.2 | HTTP framework and route DSL |
org.mongodb:mongodb-driver-bom | 5.7.0 | MongoDB Java driver (BOM — pins all sub-modules) |
org.mongodb:mongodb-driver-sync | (from BOM) | Synchronous MongoDB client |
com.fasterxml.jackson.core:jackson-databind | 2.21.2 | JSON serialization used by Javalin |
io.github.cdimascio:dotenv-java | 3.2.0 | Loads .env file into the runtime environment |
org.json:json | 20260522 | JSON object/array building for responses |
org.slf4j:slf4j-simple | 2.0.17 | Logging backend for Javalin |
Running the Server
Navigate to the backend module
All Gradle commands must be run from the
app/bc directory, where the Gradle wrapper and build.gradle.kts reside.Create the .env file
The application reads database credentials from a See the Configuration page for full details, including MongoDB Atlas URIs.
.env file placed in the same directory you run the command from (i.e., app/bc/). Create it with the two required variables:Start the server
Use the Gradle wrapper to compile and launch the application:Gradle will resolve dependencies on the first run, compile all source files, and start the Javalin server. You should see output similar to:
Entry Point — App.java
TheApp class is the single entry point for the entire server. It creates a Javalin instance, wires up all routes via Routes, enables CORS, and starts the HTTP listener on port 7070.
The
run task in build.gradle.kts is configured with inputs.files pointing at src/main/java/**/*.java. This tells Gradle to treat any Java source change as an input change, so re-running ./gradlew run after editing a source file will trigger a recompile rather than using the cached output.