minetest / contentdb

A content database for Minetest mods, games, and more
https://content.minetest.net
GNU Affero General Public License v3.0
93 stars 45 forks source link

[Feature] Use Git Repository to Replace PostgreSQL Database #424

Closed snowyu closed 1 year ago

snowyu commented 1 year ago

I would like to suggest a new feature for the Minetest contentdb project: replacing the current PostgreSQL database with a Git repository. This would offer several benefits:

  1. Reduce server load: a. No need to deploy a separate database server. b. The entire contentdb project can even be made into a static website, with Git operations moved to the browser side using the isomorphic-git library.
  2. Quick setup of mirror sites, which will accelerate site access speeds.
  3. Simplify the development of various ContentDB front-end sites, with the Git repository serving as the backend. This would make it easier to create sites with different scenes such as education-based, RPG game-based, puzzle-based, etc.
  4. The proposed Git repository would also allow developers to choose from a variety of comment services, such as giscus, which is based on Github Discussions.
  5. Users can submit new mods and subgames through pull request operations.

The proposed Git repository should have the following directory structure: games, mods, textures, and maps subdirectories.

\
|-- games
  |-- minetest_game
    |-- README.md
    |-- screenshot.jpg
|-- mods
  |-- the_mod_or_modPack
    |-- README.md
    |-- screenshot.jpg
|-- textures
|-- maps

The configuration instructions should be included in the README.md file, and the configuration information should be placed in the front-matter section at the beginning of the README.md file. eg,

---
name: the_technical_name
title: human-readable title
description: a short description
type: mod
author:
  - the_author_name
tag:
  - tag1
url: https://the.mod.location.git
screenshot:
  - ./screenshot.jpg
---

## My Minetest Mod

here is the mod detail description
rubenwardy commented 1 year ago

You're welcome to try this as a new project, but ContentDB is designed the way it is for a reason - for user experience. For more information on ContentDB's design, see https://blog.rubenwardy.com/2022/03/24/contentdb/

For a while, I have been thinking that it would be good to see a cdblite. It wouldn't have much of a web interface, maybe read-only pages for packages at most. No reviews. It would support mirroring other ContentDB servers and adding new packages based on files which could be version controlled

But ContentDB is designed as it is to give the most value, with reviews and statistics for example

snowyu commented 1 year ago

The better design architecture is to completely decoupling:

  1. Index of Contents: The Git repo I designed above is.
  2. Content storage: The actual storage mods, subgame, texture packages can come from git, cloud storage, BT, ...
  3. Review/Comment service: There are many clouds or local services to choose from. The Open Source GISCUS service mentioned earlier is one of them.
  4. Statistics service: too common service.
rubenwardy commented 1 year ago

No idea where this is coming from, you don't have to use ContentDB. It already exists, I'm not rewriting it from scratch just for you