Compare commits
3 Commits
f0b22f6a06
...
eba92ed64b
Author | SHA1 | Date | |
---|---|---|---|
eba92ed64b | |||
92787448bb | |||
bf1729cf0d |
19
README.md
19
README.md
@ -1,7 +1,12 @@
|
||||
# Wikipedia Game Solver
|
||||
|
||||
> \[!IMPORTANT\]
|
||||
> This project is a work in progress, at an early stage of development.
|
||||
> The project is a work in progress, at an early stage of development.
|
||||
|
||||
> \[!NOTE\]
|
||||
> The project is also a way to learn and experiment with a clean monorepo architecture, with [Turborepo](https://turbo.build/repo), and [TypeScript](https://www.typescriptlang.org/) as the main language.
|
||||
>
|
||||
> The project setup **can be used as a template/boilerplate for new projects**.
|
||||
|
||||
## About
|
||||
|
||||
@ -11,11 +16,6 @@ The Wikipedia Game involves players competing to navigate from one [Wikipedia](h
|
||||
|
||||
Available online: <https://wikipedia-game-solver.theoludwig.fr>
|
||||
|
||||
> \[!NOTE\]
|
||||
> The project is also a way to learn and experiment with a monorepo architecture, with [Turborepo](https://turbo.build/repo), and [TypeScript](https://www.typescriptlang.org/) as the main language.
|
||||
>
|
||||
> The project setup **can be used as a template/boilerplate for new projects**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
@ -51,6 +51,9 @@ node --run dev
|
||||
# Start the development Docker services (e.g: Database)
|
||||
docker compose --file compose.dev.yaml up
|
||||
|
||||
# Database migrations
|
||||
node --run database:migrate
|
||||
|
||||
# Lint
|
||||
node --run lint:editorconfig
|
||||
node --run lint:prettier
|
||||
@ -73,6 +76,10 @@ node --run ace -- list
|
||||
```sh
|
||||
# Setup and run all the services for you
|
||||
docker compose up --build
|
||||
|
||||
# To execute database migrations
|
||||
docker compose exec wikipedia-game-solver-api sh
|
||||
node --run database:migrate
|
||||
```
|
||||
|
||||
#### Services started
|
||||
|
@ -2,11 +2,13 @@ FROM node:22.4.1-slim AS node-pnpm
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
ENV TURBO_TELEMETRY_DISABLED=1
|
||||
ENV DO_NOT_TRACK=1
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
RUN pnpm install --global turbo@2.0.14
|
||||
COPY ./ ./
|
||||
RUN pnpm install --global turbo@2.0.14
|
||||
RUN turbo prune @repo/api --docker
|
||||
|
||||
FROM node-pnpm AS installer
|
||||
|
@ -15,6 +15,7 @@
|
||||
"ace": "node --import=tsx ./bin/console.ts",
|
||||
"tuyau": "node --run ace -- tuyau:generate && node --run ace -- tuyau:generate:openapi --destination=\".adonisjs/openapi.yaml\"",
|
||||
"build": "node --run tuyau",
|
||||
"database:migrate": "node --run ace -- migration:run",
|
||||
"test": "c8 node --import=tsx ./bin/test.ts",
|
||||
"test-shortest-paths": "node --import=tsx ./shortest-paths-tests.ts",
|
||||
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import "@repo/config-tailwind/styles.css"
|
||||
import { defaultTranslationValues, Locale } from "@repo/i18n/config"
|
||||
import { defaultTranslationValues } from "@repo/i18n/config"
|
||||
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import type { Preview } from "@storybook/react"
|
||||
import { NextIntlClientProvider } from "next-intl"
|
||||
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
||||
|
@ -5,7 +5,6 @@ import { checkA11y, configureAxe, injectAxe } from "axe-playwright"
|
||||
|
||||
/*
|
||||
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api
|
||||
* to learn more about the test-runner hooks API.
|
||||
*/
|
||||
const config: TestRunnerConfig = {
|
||||
async preVisit(page) {
|
||||
|
@ -16,6 +16,7 @@
|
||||
"@repo/config-tailwind": "workspace:*",
|
||||
"@repo/i18n": "workspace:*",
|
||||
"@repo/ui": "workspace:*",
|
||||
"@repo/utils": "workspace:*",
|
||||
"@repo/wikipedia-game-solver": "workspace:*",
|
||||
"next": "catalog:",
|
||||
"next-intl": "catalog:",
|
||||
|
@ -1,3 +1,4 @@
|
||||
TZ=UTC
|
||||
HOSTNAME=0.0.0.0
|
||||
PORT=5000
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
|
@ -2,11 +2,13 @@ FROM node:22.4.1-slim AS node-pnpm
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
ENV TURBO_TELEMETRY_DISABLED=1
|
||||
ENV DO_NOT_TRACK=1
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
RUN pnpm install --global turbo@2.0.14
|
||||
COPY ./ ./
|
||||
RUN pnpm install --global turbo@2.0.14
|
||||
RUN turbo prune @repo/website --docker
|
||||
|
||||
FROM node-pnpm AS installer
|
||||
|
@ -36,8 +36,6 @@ services:
|
||||
POSTGRES_DB: ${DATABASE_NAME}
|
||||
command: |
|
||||
--max_wal_size=4GB
|
||||
ports:
|
||||
- "${DATABASE_PORT-5432}:${DATABASE_PORT-5432}"
|
||||
volumes:
|
||||
- "wikipedia-solver-postgres-data:/var/lib/postgresql/data"
|
||||
- "./data:/data/"
|
||||
|
@ -11,6 +11,7 @@
|
||||
"scripts": {
|
||||
"dev": "turbo run dev --parallel",
|
||||
"start": "turbo run start --parallel",
|
||||
"database:migrate": "turbo run database:migrate",
|
||||
"build": "turbo run build",
|
||||
"test": "turbo run test",
|
||||
"lint:editorconfig": "editorconfig-checker",
|
||||
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -432,6 +432,9 @@ importers:
|
||||
'@repo/ui':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/ui
|
||||
'@repo/utils':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/utils
|
||||
'@repo/wikipedia-game-solver':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/wikipedia-game-solver
|
||||
|
@ -31,6 +31,9 @@
|
||||
"start": {
|
||||
"dependsOn": ["build"],
|
||||
"persistent": true
|
||||
},
|
||||
"database:migrate": {
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user