Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtg-organizer/mtg-organizer-backend
Magic: The Gathering (MTG) is a collectible card tabletop game, one of the issues of which is the cluttering of the table with cards, tokens, and counters during gameplay, complicating the experience. A solution to this problem would be an application that serves as a virtual table with a library of cards that can be displayed on it.
https://github.com/mtg-organizer/mtg-organizer-backend
aws flyway java jetbrains-annotations jpa lombok mapstruct maven postgresql spring-boot spring-security spring-web
Last synced: 14 days ago
JSON representation
Magic: The Gathering (MTG) is a collectible card tabletop game, one of the issues of which is the cluttering of the table with cards, tokens, and counters during gameplay, complicating the experience. A solution to this problem would be an application that serves as a virtual table with a library of cards that can be displayed on it.
- Host: GitHub
- URL: https://github.com/mtg-organizer/mtg-organizer-backend
- Owner: MTG-Organizer
- Created: 2024-10-31T15:45:23.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T07:11:53.000Z (about 1 month ago)
- Last Synced: 2024-12-03T08:20:53.981Z (about 1 month ago)
- Topics: aws, flyway, java, jetbrains-annotations, jpa, lombok, mapstruct, maven, postgresql, spring-boot, spring-security, spring-web
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Приложение разделено на три слоя:
1. Слой работы с БД (пакет db): JPA сущности, репозитории
2. Слой бизнес логики (пакет core): сущности бизнес логики, сервисы (в сервисах в основном вызываются методы
репозиториев)
3. Слой API (пакет api): DTO, контроллеры* JPA сущности конвертируются в сущности бизнес логики через библиотеку MapStruct (пакет common.converter)
# Как юзать (докер файла нет, всё руками)
1. Установить PostgreSQL:
```
sudo apt-get install lsb-release
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql
```2. Изменить пароль у пользователя `postgres`:
```
sudo -u postgres psql
ALTER USER postgres PASSWORD 'postgres';
```3. Создать БД `mtg_organizer`: `CREATE DATABASE mtg_organizer;`
4. Проверить, что установлены Java 21 и Maven 3.9.9:
```
java --version
mvn --version
```5. Запустить: `mvn spring-boot:run` (за `.env` файлом в ЛС в ТГ @sysfutex)