A Quarkus / MongoDB app for educational purposes https://clientserveur-courses.clubinfo-clermont.fr/Notation.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexis Drai 6565b12586
🚑 Make trainer field fully nullable in PokemongCodec
2 years ago
docs 🗃️ 👔 Establish a basic backend (#4) 2 years ago
gradle/wrapper 🎉 Begin project 2 years ago
src/main 🚑 Make trainer field fully nullable in PokemongCodec 2 years ago
.dockerignore 🎉 Begin project 2 years ago
.gitignore 🗃️ 👔 Establish a basic backend (#4) 2 years ago
README.md 🗃️ 👔 Establish a basic backend (#4) 2 years ago
build.gradle 🗃️ 👔 Establish a basic backend (#4) 2 years ago
gradle.properties 🎉 Begin project 2 years ago
gradlew 🎉 Begin project 2 years ago
gradlew.bat 🎉 Begin project 2 years ago
settings.gradle 🎉 Begin project 2 years ago

README.md

PoKeMoNg

This is a Quarkus / MongoDB app for educational purposes.

Instructions are here for reference.

About

A "Pokemong" is a playful term for a MongoDB pocket monster.

The application is developed using the Quarkus framework and uses MongoDB as its database.

This application is a RESTful service designed to emulate a basic Pokemong management system. It allows users to perform CRUD operations on Pokemongs, trainers, moves, and types.

🗂️ DCM

Data Concept Model

🧬 UML Class diagram

UML Class Diagram

Prep steps

♨️ Java version

This project is set up to use Java 17.

Your build will fail if the version of Java that your build tools are using does not match that.

💻 Run from command line

You should have JDK 17 installed locally, and accessible to Gradle.

That may involve updating your JAVA_HOME and Path environment variables.

🛠️ Run from an IDE

If you're planning to run this app directly from an IDE like IntelliJ, make sure to update any Gradle JVM (or similar) settings to use JDK 17 for Gradle tasks

🔐 Database connection

Note that the DB connection properties are not included -- your src/main/resources/application.properties should look like this :

quarkus.mongodb.connection-string=mongodb+srv://<username>:<password>@<cluster>.<node>.mongodb.net
quarkus.mongodb.database=<database>
🏫 If you are the corrector

To be able to use this app, update application.properties with the provided database secrets.

If none were provided, that was a mistake. Sorry. Please request them to the owner of this repo.

👥 If you are another user or developer

To be able to use this app, first create a MongoDB database, either locally or on their Atlas Cloud, then update application.properties with your database secrets.

You may want to look up the nice MongoDB official documentation if you get stuck.

Running the application in dev mode

You can run the application in dev mode using:

./gradlew quarkusDev

API testing

🏴‍☠️ SwaggerUI

Thanks to this project's OpenAPI specs, you can explore the API in a lot of ways. A popular choice is SwaggerUI -- after you run the app, just go to http://localhost:8080/q/swagger-ui and have fun.

⚠️ Unfortunately, Swagger or Quarkus or SmallRye adds the field id to all request examples, but in fact you should not include id when you POST a new document.

🩺 API testing tools

You can use an API testing tool such as Postman or Insomnia to test this app.

📱 Front end (later)

Moving forward, the front end part of this app -- a different project -- might also come into play for trying out this API.