Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)