Skip to content

Commit

Permalink
Merge pull request #376 from zurdi15/master
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
zurdi15 authored Oct 27, 2023
2 parents 5071020 + 1e2cfd9 commit dd9be8f
Show file tree
Hide file tree
Showing 124 changed files with 6,900 additions and 1,757 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
type=raw,value=${{ inputs.version }}
labels: |
org.opencontainers.image.version=${{ inputs.version }}
org.opencontainers.image.title="zurdi15/romm"
org.opencontainers.image.description="RomM (stands for Rom Manager) is a game library manager focused in retro gaming. Manage and organize all of your games from a web browser"
org.opencontainers.image.licenses="GPL-3.0"
- name: Build image
uses: docker/build-push-action@v4
with:
Expand Down
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v2.0.0 (_27-10-2023_)

## Added
- User management system. Closes [#24](https://github.com/zurdi15/romm/issues/24)
- Gallery bulk selection. Closes [#50](https://github.com/zurdi15/romm/issues/50)
- Roms upload feature.
- Custom cover art.
- Custom name for `roms` folder throught the `ROMS_FOLDER_NAME` environment variable. Closes [#356](https://github.com/zurdi15/romm/issues/356)
- Added `IGDB_CLIENT_ID` and `IGDB_CLIENT_SECRET` as environment variables. `CLIENT_ID` and `CLIENT_ID` are deprecated and will be removed in future versions.
- Added icons for more platforms: CD-i, 3DO, Neo Geo Pocket Color, Nintendo 64DD, Satellaview, Playdia, Pippin, Mac

## Fixed
- Fixed some checks before renaming a rom to avoid breaking names. Closes [#348](https://github.com/zurdi15/romm/issues/348)
- A lot of other minor bugs.

## Changed
- RomM internal port changed from `80` to `8080.
- RomM docker image size reduced significantly.
- Improved scanning and IGDB requests returning first the exact match.
- Scan now times out at 4 hours to improve scans for larger libraries.
- Other minimal changes in platform icons.

<br>

# v1.10 (_15-08-2023_)

## Added
Expand All @@ -12,8 +36,6 @@
- Improved scanning and IGDB requests logs. Fixes [#317](https://github.com/zurdi15/romm/issues/317)
- Improved downloading process. Fixes [#332](https://github.com/zurdi15/romm/issues/332)



<!-- **_Note_**: Experimental support for redis in the backend was added for anyone that wants to test it (it's experimental so expect some bugs). It's not required yet (check docker-compose.example.yml to check how to set the needed environment variables) but it will likely be introduced in 2.0. -->

<br>
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<a href="https://hub.docker.com/r/zurdi15/romm">
<img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/zurdi15/romm?style=flat-square">
<img alt="Docker Image Size (latest by date)" src="https://img.shields.io/docker/image-size/zurdi15/romm?style=flat-square">
<a href="https://discord.gg/P5HtHnhUDH">
<img alt="Discord" src="https://img.shields.io/discord/1138838206532554853?logo=discord&style=flat-square&label=discord">
</div>
<br>
<div align="center">
Expand Down Expand Up @@ -77,9 +79,9 @@ Inspired by [Jellyfin](https://jellyfin.org/), allows you to manage all your gam

Docker should be installed and set up before running the [image](https://hub.docker.com/r/zurdi15/romm/tags).

1. Generate an API key for [IGDB](https://www.igdb.com/), and set the `CLIENT_ID` and `CLIENT_SECRET` variables. _This is required to run a library scan._ Instructions on generating the ID and Secret are [here](https://api-docs.igdb.com/#about). Note that IDGB requires a Twitch account with 2FA enabled to generate the ID and Secret.
1. Generate an API key for [IGDB](https://www.igdb.com/), and set the `IGDB_CLIENT_ID` and `IGDB_CLIENT_SECRET` variables. _This is required to run a library scan._ Instructions on generating the ID and Secret are [here](https://api-docs.igdb.com/#about). Note that IDGB requires a Twitch account with 2FA enabled to generate the ID and Secret.
2. Verify that your library folder structure matches one of the options listed in the [following section](#folder-structure).
3. Create a docker-compose file. See the following example [docker-compose.yml](https://github.com/zurdi15/romm/blob/master/examples/docker-compose.example.yml) file for reference. Customize for your setup and include the `CLIENT_ID` and `CLIENT_SECRET` vareiables where indicated in the environment section of the file.
3. Create a docker-compose file. See the following example [docker-compose.yml](https://github.com/zurdi15/romm/blob/master/examples/docker-compose.example.yml) file for reference. Customize for your setup and include the `IGDB_CLIENT_ID` and `IGDB_CLIENT_SECRET` vareiables where indicated in the environment section of the file.
4. Launch the container:

```bash
Expand Down Expand Up @@ -299,3 +301,4 @@ Games can be tagged with region, revision or other tags using parenthesis in the
# 🎖 Credits

* Pc and Mac icon support - <a href="https://www.flaticon.com/free-icons/keyboard-and-mouse" title="Keyboard and mouse icons">Keyboard and mouse icons created by Flat Icons - Flaticon</a>
* Default user icon - <a target="_blank" href="https://icons8.com/icon/tZuAOUGm9AuS/user-default">User Default</a> icon by <a target="_blank" href="https://icons8.com">Icons8</a>
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Thanks for helping make RomM safer for everyone.

## Reporting Security Issues

If you believe you have found a security vulnerability in RomM, please report it to us through coordinated disclosure.

**Do not report security vulnerabilities through public GitHub issues, discussions, pull requests, or on our public Discord server.**

Instead, use the [vulnerability report form](https://github.com/zurdi15/romm/security/advisories/new) on GitHub.

Please include as much of the information listed below as you can to help us better understand and resolve the issue:

- The type of issue (e.g., permission bypass, remote code execution, etc.)
- Full paths of source file(s) related to the manifestation of the issue
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- Step-by-step instructions to reproduce the issue
- Proof-of-concept or exploit code (if possible)
- Impact of the issue (including how an attacker might exploit the issue)

This information will help us investigate and patch the issue more quickly.
47 changes: 47 additions & 0 deletions backend/alembic/versions/2.0.0_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""update to 2.0.0
Revision ID: 2.0.0
Revises: 1.8.3
Create Date: 2023-08-10 22:18:24.012779
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "2.0.0"
down_revision = "1.8.3"
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"users",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("username", sa.String(length=255), nullable=True),
sa.Column("hashed_password", sa.String(length=255), nullable=True),
sa.Column("enabled", sa.Boolean(), nullable=True),
sa.Column(
"role", sa.Enum("VIEWER", "EDITOR", "ADMIN", name="role"), nullable=True
),
sa.Column("avatar_path", sa.String(length=255), nullable=True),
sa.PrimaryKeyConstraint("id"),
)
with op.batch_alter_table("users", schema=None) as batch_op:
batch_op.create_index(
batch_op.f("ix_users_username"), ["username"], unique=True
)

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("users", schema=None) as batch_op:
batch_op.drop_index(batch_op.f("ix_users_username"))

op.drop_table("users")
# ### end Alembic commands ###
70 changes: 44 additions & 26 deletions backend/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,49 +1,67 @@
import os
import secrets
from dotenv import load_dotenv
from typing import Final

load_dotenv()

# Uvicorn
DEV_PORT: int = int(os.environ.get("VITE_BACKEND_DEV_PORT", "5000"))
DEV_HOST: str = "0.0.0.0"
# UVICORN
DEV_PORT: Final = int(os.environ.get("VITE_BACKEND_DEV_PORT", "5000"))
DEV_HOST: Final = "0.0.0.0"

# PATHS
ROMM_BASE_PATH: str = os.environ.get("ROMM_BASE_PATH", "/romm")
LIBRARY_BASE_PATH: str = f"{ROMM_BASE_PATH}/library"
FRONT_LIBRARY_PATH: str = "/assets/romm/library"
ROMM_USER_CONFIG_PATH: str = f"{ROMM_BASE_PATH}/config.yml"
SQLITE_DB_BASE_PATH: str = f"{ROMM_BASE_PATH}/database"
RESOURCES_BASE_PATH: str = f"{ROMM_BASE_PATH}/resources"
LOGS_BASE_PATH: str = f"{ROMM_BASE_PATH}/logs"
HIGH_PRIO_STRUCTURE_PATH: str = f"{LIBRARY_BASE_PATH}/roms"
ROMM_BASE_PATH: Final = os.environ.get("ROMM_BASE_PATH", "/romm")
ROMS_FOLDER_NAME: Final = os.environ.get("ROMS_FOLDER_NAME", "roms")
LIBRARY_BASE_PATH: Final = f"{ROMM_BASE_PATH}/library"
FRONT_LIBRARY_PATH: Final = "/assets/romm/library"
ROMM_USER_CONFIG_PATH: Final = f"{ROMM_BASE_PATH}/config.yml"
SQLITE_DB_BASE_PATH: Final = f"{ROMM_BASE_PATH}/database"
RESOURCES_BASE_PATH: Final = f"{ROMM_BASE_PATH}/resources"
LOGS_BASE_PATH: Final = f"{ROMM_BASE_PATH}/logs"
HIGH_PRIO_STRUCTURE_PATH: Final = f"{LIBRARY_BASE_PATH}/{ROMS_FOLDER_NAME}"

# DEFAULT RESOURCES
DEFAULT_URL_COVER_L: str = (
DEFAULT_URL_COVER_L: Final = (
"https://images.igdb.com/igdb/image/upload/t_cover_big/nocover.png"
)
DEFAULT_PATH_COVER_L: str = "default/default/cover/big.png"
DEFAULT_URL_COVER_S: str = (
DEFAULT_PATH_COVER_L: Final = "default/default/cover/big.png"
DEFAULT_URL_COVER_S: Final = (
"https://images.igdb.com/igdb/image/upload/t_cover_small/nocover.png"
)
DEFAULT_PATH_COVER_S: str = "default/default/cover/small.png"
DEFAULT_PATH_COVER_S: Final = "default/default/cover/small.png"

# MARIADB
DB_HOST = os.environ.get("DB_HOST", "127.0.0.1")
DB_PORT: int = int(os.environ.get("DB_PORT", 3306))
DB_USER = os.environ.get("DB_USER")
DB_PASSWD = os.environ.get("DB_PASSWD")
DB_NAME = os.environ.get("DB_NAME", "romm")
DB_HOST: Final = os.environ.get("DB_HOST", "127.0.0.1")
DB_PORT: Final = int(os.environ.get("DB_PORT", 3306))
DB_USER: Final = os.environ.get("DB_USER")
DB_PASSWD: Final = os.environ.get("DB_PASSWD")
DB_NAME: Final = os.environ.get("DB_NAME", "romm")

# REDIS
REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost')
REDIS_PORT = os.environ.get('REDIS_PORT', '6379')
ENABLE_EXPERIMENTAL_REDIS: Final = (
os.environ.get("ENABLE_EXPERIMENTAL_REDIS", "false") == "true"
)
REDIS_HOST: Final = os.environ.get("REDIS_HOST", "localhost")
REDIS_PORT: Final = os.environ.get("REDIS_PORT", "6379")

# IGDB
CLIENT_ID = os.environ.get("CLIENT_ID", "")
CLIENT_SECRET = os.environ.get("CLIENT_SECRET", "")
IGDB_CLIENT_ID: Final = os.environ.get(
"IGDB_CLIENT_ID", os.environ.get("CLIENT_ID", "")
)
IGDB_CLIENT_SECRET: Final = os.environ.get(
"IGDB_CLIENT_SECRET", os.environ.get("CLIENT_SECRET", "")
)

# STEAMGRIDDB
STEAMGRIDDB_API_KEY = os.environ.get("STEAMGRIDDB_API_KEY", "")
STEAMGRIDDB_API_KEY: Final = os.environ.get("STEAMGRIDDB_API_KEY", "")

# DB DRIVERS
ROMM_DB_DRIVER = os.environ.get("ROMM_DB_DRIVER", "sqlite")
ROMM_DB_DRIVER: Final = os.environ.get("ROMM_DB_DRIVER", "sqlite")

# AUTH
ROMM_AUTH_ENABLED: Final = os.environ.get("ROMM_AUTH_ENABLED", "false") == "true"
ROMM_AUTH_USERNAME: Final = os.environ.get("ROMM_AUTH_USERNAME", "admin")
ROMM_AUTH_PASSWORD: Final = os.environ.get("ROMM_AUTH_PASSWORD", "admin")
ROMM_AUTH_SECRET_KEY: Final = os.environ.get(
"ROMM_AUTH_SECRET_KEY", secrets.token_hex(32)
)
Loading

0 comments on commit dd9be8f

Please sign in to comment.