|
|
@ -1,5 +1,19 @@
|
|
|
|
# PoKeMoNg
|
|
|
|
# PoKeMoNg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* [About](#about)
|
|
|
|
|
|
|
|
+ [🗂️ DCM](#-dcm)
|
|
|
|
|
|
|
|
+ [🧬 UML Class diagram](#-uml-class-diagram)
|
|
|
|
|
|
|
|
+ [🗺 NoSQL Schema Versioning Strategy](#-nosql-schema-versioning-strategy)
|
|
|
|
|
|
|
|
- [Schema Versioning Pattern](#schema-versioning-pattern)
|
|
|
|
|
|
|
|
- [Incremental Document Migration](#incremental-document-migration)
|
|
|
|
|
|
|
|
* [Prep steps](#prep-steps)
|
|
|
|
|
|
|
|
+ [♨️ Java version](#-java-version)
|
|
|
|
|
|
|
|
+ [🔐 Database connection](#-database-connection)
|
|
|
|
|
|
|
|
* [Running the application in dev mode](#running-the-application-in-dev-mode)
|
|
|
|
|
|
|
|
+ [🏴☠️ SwaggerUI](#-swaggerui)
|
|
|
|
|
|
|
|
+ [🩺 API testing tools](#-api-testing-tools)
|
|
|
|
|
|
|
|
+ [📱 Front end (later)](#-front-end-later)
|
|
|
|
|
|
|
|
|
|
|
|
This is a [Quarkus](https://quarkus.io/) / [MongoDB](https://mongodb.com/) app for educational purposes.
|
|
|
|
This is a [Quarkus](https://quarkus.io/) / [MongoDB](https://mongodb.com/) app for educational purposes.
|
|
|
|
|
|
|
|
|
|
|
|
Instructions are [here](https://clientserveur-courses.clubinfo-clermont.fr/Notation.html) for reference.
|
|
|
|
Instructions are [here](https://clientserveur-courses.clubinfo-clermont.fr/Notation.html) for reference.
|
|
|
@ -20,9 +34,76 @@ CRUD operations on `Pokemongs`, `Trainers`, `Moves`, and `Types`.
|
|
|
|
|
|
|
|
|
|
|
|
### 🧬 UML Class diagram
|
|
|
|
### 🧬 UML Class diagram
|
|
|
|
|
|
|
|
|
|
|
|
<img src="./docs/nosql_uml.png" alt="UML Class Diagram" title="UML Class Diagram">
|
|
|
|
```mermaid
|
|
|
|
|
|
|
|
classDiagram
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Trainer {
|
|
|
|
|
|
|
|
+ id: ObjectId
|
|
|
|
|
|
|
|
+ name: string
|
|
|
|
|
|
|
|
+ dob: date
|
|
|
|
|
|
|
|
+ wins: int
|
|
|
|
|
|
|
|
+ losses: int
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Pokemong {
|
|
|
|
|
|
|
|
+ id: ObjectId
|
|
|
|
|
|
|
|
+ nickname: string?
|
|
|
|
|
|
|
|
+ dob: date
|
|
|
|
|
|
|
|
+ level: int
|
|
|
|
|
|
|
|
+ pokedexId: int
|
|
|
|
|
|
|
|
+ evoStage: int
|
|
|
|
|
|
|
|
+ evoTrack: PokemongName[]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Move {
|
|
|
|
|
|
|
|
+ id: ObjectId
|
|
|
|
|
|
|
|
+ name: string
|
|
|
|
|
|
|
|
+ category: MoveCategoryName
|
|
|
|
|
|
|
|
+ power: int
|
|
|
|
|
|
|
|
+ accuracy: int
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Type {
|
|
|
|
|
|
|
|
+ id: ObjectId
|
|
|
|
|
|
|
|
+ name: TypeName
|
|
|
|
|
|
|
|
+ weakAgainst: TypeName[]
|
|
|
|
|
|
|
|
+ effectiveAgainst: TypeName[]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TypeName {
|
|
|
|
|
|
|
|
<<enumeration>>
|
|
|
|
|
|
|
|
+ FIRE
|
|
|
|
|
|
|
|
+ WATER
|
|
|
|
|
|
|
|
+ ...
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PokemongName {
|
|
|
|
|
|
|
|
<<enumeration>>
|
|
|
|
|
|
|
|
+ BULBASAUR
|
|
|
|
|
|
|
|
+ IVYSAUR
|
|
|
|
|
|
|
|
+ ...
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MoveCategoryName {
|
|
|
|
|
|
|
|
<<enumeration>>
|
|
|
|
|
|
|
|
+ PHYSICAL
|
|
|
|
|
|
|
|
+ SPECIAL
|
|
|
|
|
|
|
|
+ STATUS
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Trainer --> "0..*" Trainer: pastOpponents
|
|
|
|
|
|
|
|
Trainer --> "0..*" Pokemong: pokemongs
|
|
|
|
|
|
|
|
Pokemong --> "0..1" Trainer: trainer
|
|
|
|
|
|
|
|
Pokemong --> "0..4" Move: moveSet
|
|
|
|
|
|
|
|
Pokemong --> "1..2" Type: types
|
|
|
|
|
|
|
|
Move --> Type: type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Type ..> TypeName
|
|
|
|
|
|
|
|
Pokemong ..> PokemongName
|
|
|
|
|
|
|
|
Move ..> MoveCategoryName
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### NoSQL Schema Versioning Strategy
|
|
|
|
### 🗺 NoSQL Schema Versioning Strategy
|
|
|
|
|
|
|
|
|
|
|
|
This application uses MongoDB, a NoSQL database, which provides flexibility in our data model. While this flexibility
|
|
|
|
This application uses MongoDB, a NoSQL database, which provides flexibility in our data model. While this flexibility
|
|
|
|
has
|
|
|
|
has
|
|
|
|