Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 1.85 KB

CONTRIBUTING.md

File metadata and controls

79 lines (52 loc) · 1.85 KB

Contribution Guide

Setup

We use pnpm to manage this monorepo.

To set the repository up:

Steps Command
1. Install Node.js, using the latest LTS -
2. Install pnpm npm i -g pnpm
3. Install dependencies under the project root pnpm i

Packages

animegarden

Package is located at packages/animegarden.

# Build project
pnpm -C packages/animegarden build

# Run test
pnpm -C packages/animegarden test

Web Application

Package is located at packages/app.

This package is built on the Astro.

# Build app
pnpm -C packages/app build

# Start dev server
pnpm -C packages/app dev

Deploy your own AnimeGarden

Make sure you have setup the environment.

Fetch initial data

pnpm animegarden fetch dmhy --output output/dmhy
pnpm animegarden fetch moe  --output output/moe

These two commands will fetch data from the remote and write to files in the dir output/dmhy and output/moe.

Fetching all the data usually takes several hours. You can use the --from <page> and --to <page> arguments to specify the fetching range.

Setup the database

Start dev postgres, meilisearch and redis with docker-compose.yml

docker compose --file=docker-compose.dev.yml up

Then migrate the dev postgres database and meilisearch.

pnpm animegarden db migrate --uri "postgres://root:example@0.0.0.0:5432/animegarden"
pnpm animegarden meili migrate --meili-url "http://0.0.0.0:7700" --meili-key "example"

Then insert the data to the database.

pnpm animegarden db insert dmhy output/dmhy \
  --uri "postgres://root:example@0.0.0.0:5432/animegarden" \
  --meili-url "http://0.0.0.0:7700" --meili-key "example"