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 b5b2dd07ee Updated deps 2022-12-05 03:28:33 +01:00
.github Update node.js.yml 2022-08-28 17:42:18 +02:00
public Put an end to my useMemo craze + fixed ios 2022-12-04 15:31:11 +01:00
src Revalidate videos 2022-12-04 19:41:38 +01:00
.eslintignore Fixed eslint warnings + configure prettier 2022-08-28 17:40:41 +02:00
.eslintrc.js Fixed eslint warnings + configure prettier 2022-08-28 17:40:41 +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
.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 Put an end to my useMemo craze + fixed ios 2022-12-04 15:31:11 +01:00
design.config.js Some tailwind simplification 2022-09-21 18:12:04 +02: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 Updated deps 2022-12-05 03:28:33 +01:00
package.json Updated deps 2022-12-05 03:28:33 +01: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.js Put an end to my useMemo craze + fixed ios 2022-12-04 15:31:11 +01:00
tsconfig.json Improved CSS and design system 2022-10-29 16:22:49 +02:00

README.md

Accords-library.com

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

Technologies

Back

  • CMS: Stapi
    • GraphQL endpoint
    • Multilanguage support
    • Markdown format for the rich text fields
    • Use webhooks to notify the front-end and image processor of updates

Image Processor

  • Convert the images from the CMS to 4 formats
    • Small: 512x512, quality 60, .webp
    • Medium: 1024x1024, quality 75, .webp
    • Large: 2048x2048, quality 80, .webp
    • Og: 512x512, quality 60, .jpg

Front (this repository)

  • Language: TypeScript

  • Framework: Next.js 13 (React 18)

  • 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
  • Markdown: markdown-to-jsx

    • Support for arbitrary React Components and Component Props!
    • Autogenerated multi-level table of content and anchor links for the different headers
  • Styling: Tailwind CSS

    • Support for Material Icons
    • Support for creating any arbitrary theming mode 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
  • 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
  • SSG + ISR (Static Site Generation + Incremental Static Regeneration)

    • The website is built before running in production
    • Performances are great, and possibility 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 page.
  • 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:

nano .env.local

Enter the followind information:

URL_GRAPHQL=https://url-to.strapi-accords-library.com/graphql
ACCESS_TOKEN=abcdef0123456789
REVALIDATION_TOKEN=abcdef0123456789
SMTP_HOST=email.provider.com
SMTP_USER=email@example.com
SMTP_PASSWORD=mypassword123
NEXT_PUBLIC_URL_CMS=https://url-to.strapi-accords-library.com
NEXT_PUBLIC_URL_IMG=https://url-to.img-accords-library.com
NEXT_PUBLIC_URL_WATCH=https://url-to.watch-accords-library.com
NEXT_PUBLIC_URL_SELF=https://url-to-front-accords-library.com
NEXT_PUBLIC_URL_SEARCH=https://url-to.search-accords-library.com
NEXT_PUBLIC_UMAMI_URL=https://url-to.umami-accords-library.com
NEXT_PUBLIC_UMAMI_ID=abcdef0123456789

Run in dev mode:

./run_accords_dev.sh

OR build and run in production mode

npm run build
./run_accords_prod.sh