Git Product home page Git Product logo

website's Introduction

Faithful Mods

Prerequisites

  • Node 20
  • Docker

Project installation

Clone the repository

git clone "https://github.com/Juknum/faithful-mods"
cd ./faithful-mods

# install dependencies
npm install

Setup .env file

# local/prod postgres database url
DATABASE_URL="postgresql://postgres:postgres@localhost:5555/fm_postgres?schema=public"

# openssl rand -base64 32
AUTH_SECRET=

NEXT_PUBLIC_APP_URL="http://localhost:3000"

# Github OAuth credentials, create a new OAuth app at
# https://github.com/settings/developers
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

Setup the database

Download docker and run the following command to start a Postgres container:

docker compose up -d --force-recreate

Setup Prisma

# generate prisma client types (this is done when doing "npm install")
npx prisma generate
# apply migrations
npm run db:apply
# create a new migration file
npm run db:migrate

Start the app

npm run dev

website's People

Contributors

juknum avatar dependabot[bot] avatar

Watchers

 avatar

website's Issues

feat: change notify popup

Remove it as its only used to show errors which the end user doesn't care (they should be displayed in the console instead)

OR

Make something better out of it, (annoying bug currently: the popup is shown behind modals on the z axis)

feat: add MCMETA support

Make animated textures animated in the browser using their MCMETA

Use the old script from dokucraft team for mcmeta animation

  • Keep the MCMETA with the texture when fetching it from the JAR
  • Display it in the council/textures page
  • Allow council members to edit it (use JSON Text area from mantine)

feat: add "Team" support

People (or only admins?) can create teams of people (eg. f32.me team) that can be selected as co-authors (or author if you're part of the team) when submitting a contribution

feat: add a way to report users

First idea

This should be a follow up of #2 where REJECT AND BAN buttons should ask for a reason and end date (optional) before banning the user, the reason + time left are therefore displayed in the users dashboard and on the user settings page (not accessible by banned people but still accessible by admins)

  • Create a table for bans
  • Update the user role when banned (to BANNED)
  • Add a new card in the settings/me page to show past bans (hide it if no previous bans)
  • Display the reason somewhere? Maybe make the settings/me page accessible to banned people
    • If so, remove the banned badge on the navbar

New

Add a report tab in the /user page where users can reports other users for specific reason;

  • Rename /settings/me to /user/me
  • Force redirect to /user/me when /user/:id is the ID of the logged in user
  • Create a report table to keep a trace of all reports, each report should:
    • Reference a "report reason"
    • A user to be reported
    • The report author
    • Additional context
  • Create a report reasons table
    • name
    • description
  • Admins accessing others users pages can accept/dismiss reports
  • Admins can ban/pardon users from this tab
  • User can only see pending & accepted reports

feat: export default textures to their repository

Old:

Instead of storing default textures to public/files/default, push them to the default-textures repo;

The repository should work like so:

  • main branch for prod
  • dev/{github_username} for developers (which can be deleted at anytime)

The main branch should only be pushed by a dedicated github account.
The devs branches should be pushed by local dev git config.

  • Add user github credentials to .env (bot for prod, personnal for dev)
  • Add branch name to be pushed to .env config

Update:

Instead of trying to sync local repositories with github's ones, just do regular backup (once a day)

  • Use GitHub's actions to trigger a workflow that push all changes to their repositories (as planned previously), need #15 first though

feat: add block/item models 3D support

Because sometimes custome block/item models can help with higher resolutions

Those contributions always comes with a textures (to avoid mismatch between a model and current contribution), thus it allows the reviewer to see the changes directly in the browser

Use ThreeJS for models

Needs to find a solution to determine what textures are used on the model, maybe use the JSON model ?

feat: add webhook support

  1. Emit a webhook each time :
  • Default textures are added
  • Contributions are added, see #2
  • A user is banned, see #17
  1. Prerequisities
  • Add support for multiple URLs per endpoint (each scenario above)
  • Should support Discord Embeds format

feat: add texture aliases

Requirements:

Description:
Textures can have multiple names across multiple mods, some mods may not use the "right" way/convention to name their textures which can lead to contributors not finding their textures when selecting the texture to their contribution.

To do:

  • keep a name field, set when the texture is first added to the database
  • add an aliases field (string[]), where the texture already exist in the database but uploaded again (only add the name in the aliases array iff : different from name and not already in aliases
  • update contribution draft modal to allow aliases search.
  • remove hash from texture name in database, filepath already have it

feat: add contributions support

  • Contribute page

    • Accessible for all non-banned users
    • Link in the navbar (disabled for banned people)
    • A drag and drop zone to import contributions with resolution settings & co-authors multi select
    • Once dragged-and-dropped, create draft contributions
      • For which the author as to select to which texture it originally correspond in a modal, then the author can submit the submission for review (status goes from DRAFT to PENDING)
      • After selecting the texture, the user can look for others contributions of that texture and their up/down votes count.
      • The author can also edit co-authors & resolution on the draft modal.
    • A zone that shows all PENDING / ACCEPTED / REJECTED contributions, the author can still edit the contribution authors but nothing else. Making so switch the contribution status back to PENDING. reported
    • A zone that shows all contributions where the user is mentionned as a co-author; he (the user) can decide to be removed from the co-authors of each contribution
  • Council page for reviewing contributions (and for other stuff later?)

    • A zone showing which contributions the counselor has to vote for.
    • A zone showing which contributions the counselor has voted but their voting period isn't finished.
    • A report button for each contribution to report abuse reported

fix: update README

  • Remove conventional commits mention and mention how commits should be written instead
  • Add info about prisma migration process, see #10
  • Add .env settings related to #1

fix: theme icons are in the wrong order

They were made in this order:

Moon (when light, to announce dark after)
Sun (when dark to announce light after)

But it doesn't work as the auto theme is placed in between those two

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.