Front end for the Accord's Library website. Accord's Library is a archival project focused on the works of Yoko Taro, and the Drakegard & NieR universes.
Go to file
DrMint 3e979c4005 Small fixes 2023-05-16 12:50:53 +02:00
.github Update node.js.yml 2022-08-28 17:42:18 +02:00
.vscode Fix subpanel closing on mobile+ improvements 2023-02-10 13:17:45 +01:00
docs updated README 2023-01-31 23:36:37 +01:00
patches Updated deps 2023-04-30 13:24:26 +02:00
public Removed unused wording keys 2023-05-16 12:47:09 +02:00
src Small fixes 2023-05-16 12:50:53 +02:00
.env.example Small fixes 2023-05-16 12:50:53 +02:00
.eslintignore Updating deps 2023-04-08 17:30:08 +02:00
.eslintrc.js Updated meilisearch 2023-04-09 09:59:43 +02:00
.gitignore Moved db testing to a seperate page 2022-04-23 21:47:59 +02:00
.hintrc Applied more lint rules and fixed the code accordingly 2022-03-27 17:01:14 +02:00
.ncurc.yml Updated deps 2023-04-30 13:24:26 +02:00
.prettierignore Added prettier ignore config 2022-03-13 15:49:04 +01:00
CONTRIBUTING.md Lots of bs 2022-08-16 00:17:26 +02:00
DATA_TESTING.md useBoolean + many fixes 2022-07-13 03:46:58 +02:00
LICENSE Added stuff 2021-11-04 12:45:18 +01:00
README.md Add download button for scans archives 2023-05-11 11:24:36 +02:00
design.config.js Decreased shadow strength 2023-02-22 05:35:18 +01:00
graphql-codegen.config.js Fixed eslint warnings + configure prettier 2022-08-28 17:40:41 +02:00
next-env.d.ts Added animation to tooltip opening closing 2022-03-13 15:34:51 +01:00
next-sitemap.config.js Fixed eslint warnings + configure prettier 2022-08-28 17:40:41 +02:00
next.config.js Put an end to my useMemo craze + fixed ios 2022-12-04 15:31:11 +01:00
package-lock.json Removed unused wording keys 2023-05-16 12:47:09 +02:00
package.json Removed unused wording keys 2023-05-16 12:47:09 +02:00
postcss.config.js Ran prettier on more file type 2022-03-13 15:56:03 +01:00
prettier.config.js Fixed eslint warnings + configure prettier 2022-08-28 17:40:41 +02:00
run_accords_dev.sh Added npm run-scripts 2022-05-07 11:35:53 +02:00
run_accords_prod.sh Added npm run-scripts 2022-05-07 11:35:53 +02:00
tailwind.config.ts Improved perf on all browser 2023-05-13 10:09:57 +02:00
tsconfig.json Moved assert helpers into their own folder + activated some tsconfig strict options 2022-12-09 23:03:09 +01:00

README.md

Accords-library.com

Node.js CI GitHub Libraries.io dependency status for GitHub repo

Introduction

Accords Library is a fan-site that aims at gathering and archiving all of Yoko Taros work. Yoko Taro is a Japanese video game director and scenario writer. He is best-known for his work on the NieR and Drakengard (Drag-on Dragoon) franchises.

Technologies

Overview

Purple connections are actions done at build-time only. Grey connections can be at build-time or run-time.

strapi.accords-library.com

Our Content Management System (CMS) that uses Strapi.

  • Use the official GraphQL plugin
  • Multilanguage support
  • Markdown format for the rich text fields
  • Use webhooks to notify the front-end, search engine, and image processor when new content/media has been created/modified/deleted

img.accords-library.com

A custom made image processor to overcome the lack of customization offered by Strapi build-in image processor. There is a python script to bulk process all images uploaded to Strapi. Subsequent changes to Strapi's media library can be handled using webhooks. The repo includes a server that listen to these webhook calls, and another to serve the images.

Each image in Strapi's media library is converted to four different formats:

  • Small: 512x512, quality 60, .webp
  • Medium: 1024x1024, quality 75, .webp
  • Large: 2048x2048, quality 80, .webp
  • Og: 512x512, quality 60, .jpg

search.accords-library.com

A search engine that uses Meilisearch. The repo includes a docker-compose file to run an instance of Meilisearch. There is also a server that populates Meilisearch's documents at startup, then listen to webhooks sent by Strapi for subsequent changes.

gallery.accords-library.com

An image board engine, uses Szurubooru, a lighweight engine inspired by Danbooru (and Booru-type galleries in general). Unlike the other subdomains, this repo is completely separated from the rest of the stack.

watch.accords-library.com

A set of tools to archive videos on multiple platforms. The repo contains a CLI tool to archive YouTube videos. There is also a Python script which import the videos metadata to Strapi using GraphQL mutations. Finally, there's a server to serve the video files and thumbnail.

umami.accords-library.com

An open-source self-hosted alternative to Google Analytics which doesn't require a cookie notice to be GDPR compliant.

accords-library.com (this repository)

A detailled look at the technologies used in this repository:

  • Language: TypeScript

  • Framework: Next.js 13 (React 18)

  • SSG + ISR (Static Site Generation + Incremental Static Regeneration)

    • The website is built before running in production
    • Performances are great, and it's possible to deploy the app on a CDN
    • On-Demand ISR to continuously update the website when new content is added or existing content is modified/deleted
    • UI localizations are downloaded separetely into the public/local-data to avoid fetching the same static props for every pages.
  • Queries: GraphQL Code Generator

    • Fetch the GraphQL schema from the GraphQL back-end endpoint
    • Read the operations and fragments stored as graphql files in the src/graphql folder
    • Automatically generates a typesafe ready to use SDK using graphql-request as the GraphQL client
  • Styling: Tailwind CSS

    • Support for creating any arbitrary theme by swapping CSS variables
    • Support for Container Queries (media queries at the element level)
    • The website has a three-column layout, which turns into one-column + 2 toggleable side-menus if the screen is too narrow.
    • Check out our Design System Showcase
  • State Management: Jōtai

    • Jōtai is a small-weighted library for atomic state management
    • Persistent app state using LocalStorage and SessionStorage
  • Markdown

    • Use Marked to convert markdown to HTML (which is then sanitized using DOMPurify)
    • Support for arbitrary React Components and Component Props using markdown-to-jsx
    • Autogenerated multi-level table of content and anchor links for the different headers
  • Accessibility

  • Multilingual

    • By default, use the browser's language as the main language
    • Fallback languages are used for content which are not available in the main language
    • Main and fallback languages can be ordered manually by the user
    • At the content level, the user can know which language is available
    • Furthermore, the user can temporary select another language then the one that was automatically selected
  • UI Localizations

    • The translated wordings use ICU Message Format to include variables, plural, dates...
    • Use a custom ICU Typescript transformation script to provide type safety when formatting ICU wordings
    • Fallback to English if a specific working isn't available in the user's language
  • SEO

    • Good defaults for the metadata and OpenGraph properties
    • Each page can provide a custom thumbnail, title, description to be used
    • Automatic generation of the sitemap using next-sitemap
  • Data Quality Testing

    • Data from the CMS is subject to a battery of tests (about 20 warning types and 40 error types) at build time
    • Each warning/error comes with a front-end link to the incriminating element, as well as a link to the CMS to fix it
    • Check for completeness, conformity, and integrity
  • Code Quality and Style

  • Other

Installation

git clone https://github.com/Accords-Library/accords-library.com.git
cd accords-library.com
npm install

Create a env file based on the example one:

cp .env.example .env.local
nano .env.local

Change the variables

Run in dev mode:

./run_accords_dev.sh

OR build and run in production mode

npm run build
./run_accords_prod.sh