feat: Vollständiges Rebranding zu MiChess, Copyright Tom Misch
- Alle @chessu/ → @michess/ (Package-Namen und Imports) - Theme-Namen chessuDark/Light → michessDark/Light - Alle Display-Texte: chessu/Michess → MiChess - Autor: dotnize → Tom Misch - Copyright: Nathaniel Tampus → Tom Misch - README komplett neu (Deutsch, MiChess-spezifisch) - CONTRIBUTING.md neu - FUNDING.yml + CODE_OF_CONDUCT.md entfernt - Fork-Hinweis auf chessu bleibt im README erhalten (MIT-Pflicht) - pnpm-lock.yaml entfernt (wird beim Build neu generiert) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
|||||||
github: [dotnize]
|
|
||||||
14
Brain.md
14
Brain.md
@@ -1,13 +1,13 @@
|
|||||||
# Brain.md — Michess Project Memory
|
# Brain.md — MiChess Project Memory
|
||||||
|
|
||||||
> Dieses Dokument ist mein aktives Gedächtnis während der Entwicklung von Michess.
|
> Dieses Dokument ist mein aktives Gedächtnis während der Entwicklung von MiChess.
|
||||||
> Ich denke hier, notiere Entscheidungen, Probleme und Fortschritt.
|
> Ich denke hier, notiere Entscheidungen, Probleme und Fortschritt.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Projektziel
|
## Projektziel
|
||||||
|
|
||||||
Michess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Docker, mit Stockfish-Engine.
|
MiChess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Docker, mit Stockfish-Engine.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ Michess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Doc
|
|||||||
1. **Stockfish AI-Gegner** — verschiedene Schwierigkeitsgrade (Level 1-8, ELO-basiert)
|
1. **Stockfish AI-Gegner** — verschiedene Schwierigkeitsgrade (Level 1-8, ELO-basiert)
|
||||||
2. **Admin-Panel** — Nutzerverwaltung, Git-Pull-Button, Statistiken
|
2. **Admin-Panel** — Nutzerverwaltung, Git-Pull-Button, Statistiken
|
||||||
3. **Freundessystem** — Freundschaftsanfragen, Freundesliste, Freunde herausfordern
|
3. **Freundessystem** — Freundschaftsanfragen, Freundesliste, Freunde herausfordern
|
||||||
4. **Branding** — Alles auf "Michess" umbenennen
|
4. **Branding** — Alles auf "MiChess" umbenennen
|
||||||
5. **Docker NAS-Deployment** — docker-compose für NAS, Auto-Update-Script
|
5. **Docker NAS-Deployment** — docker-compose für NAS, Auto-Update-Script
|
||||||
6. **DB-Schema Erweiterungen** — admin-Flag, friends-Tabelle, friend_requests-Tabelle
|
6. **DB-Schema Erweiterungen** — admin-Flag, friends-Tabelle, friend_requests-Tabelle
|
||||||
7. **E-Mail-basierte Registrierung** — (email-Feld schon da, braucht UI-Flow: email → unique username wählen)
|
7. **E-Mail-basierte Registrierung** — (email-Feld schon da, braucht UI-Flow: email → unique username wählen)
|
||||||
@@ -91,7 +91,7 @@ Michess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Doc
|
|||||||
- [x] Brain.md erstellt
|
- [x] Brain.md erstellt
|
||||||
- [x] Plan.md erstellt
|
- [x] Plan.md erstellt
|
||||||
- [ ] Git remote auf `git.mischlabs.de` gesetzt
|
- [ ] Git remote auf `git.mischlabs.de` gesetzt
|
||||||
- [ ] Projekt auf "Michess" umbenannt
|
- [ ] Projekt auf "MiChess" umbenannt
|
||||||
- [ ] DB-Schema erweitert (admin, friends, friend_requests)
|
- [ ] DB-Schema erweitert (admin, friends, friend_requests)
|
||||||
- [ ] Stockfish integriert
|
- [ ] Stockfish integriert
|
||||||
- [ ] Admin-Panel gebaut
|
- [ ] Admin-Panel gebaut
|
||||||
@@ -103,7 +103,7 @@ Michess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Doc
|
|||||||
|
|
||||||
## Bekannte Probleme / Offene Fragen
|
## Bekannte Probleme / Offene Fragen
|
||||||
|
|
||||||
- chessu's Dockerfile nutzt `CMD ["start"]` — muss für Michess angepasst werden (Server + Client separat oder zusammen)
|
- chessu's Dockerfile nutzt `CMD ["start"]` — muss für MiChess angepasst werden (Server + Client separat oder zusammen)
|
||||||
- Stockfish binary muss im Docker-Image vorhanden sein (Alpine Linux: `apk add stockfish` oder npm-Paket)
|
- Stockfish binary muss im Docker-Image vorhanden sein (Alpine Linux: `apk add stockfish` oder npm-Paket)
|
||||||
- Admin-Git-Pull: funktioniert nur wenn Container read-write Zugriff auf sein eigenes Verzeichnis hat — besser: Host-Script via webhook triggern
|
- Admin-Git-Pull: funktioniert nur wenn Container read-write Zugriff auf sein eigenes Verzeichnis hat — besser: Host-Script via webhook triggern
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ Michess = Lichess-inspirierte Schachplattform, self-hosted auf einer NAS, in Doc
|
|||||||
## Nächste Schritte (immer aktuell)
|
## Nächste Schritte (immer aktuell)
|
||||||
|
|
||||||
1. Git remote setzen → push
|
1. Git remote setzen → push
|
||||||
2. Umbenennen chessu → Michess
|
2. Umbenennen chessu → MiChess
|
||||||
3. DB-Schema erweitern
|
3. DB-Schema erweitern
|
||||||
4. Stockfish backend einbauen
|
4. Stockfish backend einbauen
|
||||||
5. Admin-Panel UI + Backend
|
5. Admin-Panel UI + Backend
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, religion, or sexual identity
|
|
||||||
and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
|
||||||
community include:
|
|
||||||
|
|
||||||
- Demonstrating empathy and kindness toward other people
|
|
||||||
- Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
- Giving and gracefully accepting constructive feedback
|
|
||||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
- Focusing on what is best not just for us as individuals, but for the
|
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
|
||||||
|
|
||||||
- The use of sexualized language or imagery, and sexual attention or
|
|
||||||
advances of any kind
|
|
||||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
- Public or private harassment
|
|
||||||
- Publishing others' private information, such as a physical or email
|
|
||||||
address, without their explicit permission
|
|
||||||
- Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement at
|
|
||||||
admin@ches.su.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series
|
|
||||||
of actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or
|
|
||||||
permanent ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within
|
|
||||||
the community.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
||||||
version 2.0, available at
|
|
||||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
||||||
enforcement ladder](https://github.com/mozilla/diversity).
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
https://www.contributor-covenant.org/faq. Translations are available at
|
|
||||||
https://www.contributor-covenant.org/translations.
|
|
||||||
@@ -1,60 +1,14 @@
|
|||||||
# Contributing
|
# Beitragen zu MiChess
|
||||||
|
|
||||||
Welcome! We're glad you're interested in contributing to the project.
|
Issues und Pull Requests sind willkommen auf [git.mischlabs.de/MrDiderot/MiChess](https://git.mischlabs.de/MrDiderot/MiChess).
|
||||||
|
|
||||||
We welcome contributions of any kind; however, for **feature changes or additions**, please open an issue first for discussion.
|
## Entwicklungsumgebung
|
||||||
|
|
||||||
## Getting Started
|
1. Node.js 20+ und pnpm installieren
|
||||||
|
2. Repository klonen und `pnpm install` ausführen
|
||||||
|
3. `.env.example` nach `.env` kopieren und anpassen
|
||||||
|
4. `pnpm dev` starten
|
||||||
|
|
||||||
1. [Fork this repository](https://github.com/dotnize/chessu/fork) to your GitHub account. You can then clone the repository to your local machine and create a new branch for your changes.
|
## Commit-Stil
|
||||||
```sh
|
|
||||||
git clone https://github.com/[your-username]/chessu.git
|
|
||||||
cd chessu
|
|
||||||
git checkout -b my-feature-branch
|
|
||||||
```
|
|
||||||
2. Follow the [setup guide](./README.md#getting-started) from the README to install the necessary dependencies and run the development servers.
|
|
||||||
3. You may now make your changes and commit them to your branch.
|
|
||||||
|
|
||||||
When adding new dependencies or running other commands from the root directory, you can specify the workspace with the `--filter` flag before the command. For example, `pnpm --filter client lint` or `pnpm --filter server add express`.
|
Prefixe: `feat:`, `fix:`, `ui:`, `admin:`, `docker:`, `docs:`
|
||||||
|
|
||||||
### Formatting and linting
|
|
||||||
|
|
||||||
We use ESLint and Prettier to enforce code style and formatting. Please make sure to run `pnpm lint:fix` and `pnpm format` before committing your changes.
|
|
||||||
|
|
||||||
### Environment variables
|
|
||||||
|
|
||||||
You may create a `.env` file in each package directory to set their environment variables.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>client</summary>
|
|
||||||
|
|
||||||
```env
|
|
||||||
NEXT_PUBLIC_API_URL=http://localhost:3001 # replace with backend URL
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>server</summary>
|
|
||||||
|
|
||||||
```env
|
|
||||||
CORS_ORIGIN=http://localhost:3000 # replace with frontend URL
|
|
||||||
PORT=3001
|
|
||||||
SESSION_SECRET=randomstring # replace for security
|
|
||||||
|
|
||||||
# PostgreSQL connection info (required)
|
|
||||||
PGHOST=db.example.com
|
|
||||||
PGUSER=exampleuser
|
|
||||||
PGPASSWORD=examplepassword
|
|
||||||
PGDATABASE=chessu
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Guidelines
|
|
||||||
|
|
||||||
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
||||||
- Make sure your changes are thoroughly tested.
|
|
||||||
- Keep your commits atomic and descriptive.
|
|
||||||
- Ensure that your code is formatted and linted using `pnpm lint:fix` and `pnpm format`.
|
|
||||||
- Make your pull requests as descriptive as possible.
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023-present, Nathaniel Tampus
|
Copyright (c) 2024-present, Tom Misch
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
14
Plan.md
14
Plan.md
@@ -1,10 +1,10 @@
|
|||||||
# Plan.md — Michess Entwicklungsplan
|
# Plan.md — MiChess Entwicklungsplan
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Vision
|
## Vision
|
||||||
|
|
||||||
**Michess** ist eine selbst-gehostete Schachplattform für eine private Community, inspiriert von Lichess.org.
|
**MiChess** ist eine selbst-gehostete Schachplattform für eine private Community, inspiriert von Lichess.org.
|
||||||
Läuft als Docker-Container auf einer Synology/QNAP NAS, komplett ohne Cloud-Abhängigkeit.
|
Läuft als Docker-Container auf einer Synology/QNAP NAS, komplett ohne Cloud-Abhängigkeit.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -14,12 +14,12 @@ Läuft als Docker-Container auf einer Synology/QNAP NAS, komplett ohne Cloud-Abh
|
|||||||
### 1.1 Projekt-Setup
|
### 1.1 Projekt-Setup
|
||||||
- [x] chessu (MIT) als Basis klonen
|
- [x] chessu (MIT) als Basis klonen
|
||||||
- [x] Brain.md & Plan.md erstellen
|
- [x] Brain.md & Plan.md erstellen
|
||||||
- [ ] Git remote auf `https://git.mischlabs.de/MrDiderot/Michess.git` setzen
|
- [ ] Git remote auf `https://git.mischlabs.de/MrDiderot/MiChess.git` setzen
|
||||||
- [ ] Initaler Push (chessu-Basis + eigene Dateien)
|
- [ ] Initaler Push (chessu-Basis + eigene Dateien)
|
||||||
|
|
||||||
### 1.2 Rebranding chessu → Michess
|
### 1.2 Rebranding chessu → MiChess
|
||||||
- [ ] `package.json` Namen anpassen
|
- [ ] `package.json` Namen anpassen
|
||||||
- [ ] README durch Michess-README ersetzen
|
- [ ] README durch MiChess-README ersetzen
|
||||||
- [ ] Alle Titel/Meta-Tags im Frontend ändern
|
- [ ] Alle Titel/Meta-Tags im Frontend ändern
|
||||||
- [ ] Logo-Platzhalter anpassen
|
- [ ] Logo-Platzhalter anpassen
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ CREATE TABLE IF NOT EXISTS "friendship" (
|
|||||||
### Aktueller chessu-Flow:
|
### Aktueller chessu-Flow:
|
||||||
`name + email + password` → Account erstellt
|
`name + email + password` → Account erstellt
|
||||||
|
|
||||||
### Gewünschter Michess-Flow:
|
### Gewünschter MiChess-Flow:
|
||||||
1. `email + password` → Account erstellt (noch kein Nutzername)
|
1. `email + password` → Account erstellt (noch kein Nutzername)
|
||||||
2. Weitergeleitet zu "Nutzername wählen" (einmalig, nicht änderbar)
|
2. Weitergeleitet zu "Nutzername wählen" (einmalig, nicht änderbar)
|
||||||
3. Nutzername prüfen: verfügbar? gültig? → bestätigen
|
3. Nutzername prüfen: verfügbar? gültig? → bestätigen
|
||||||
@@ -157,7 +157,7 @@ CREATE TABLE IF NOT EXISTS "friendship" (
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Einmalige Erstinstallation auf der NAS:
|
# Einmalige Erstinstallation auf der NAS:
|
||||||
git clone https://git.mischlabs.de/MrDiderot/Michess.git michess
|
git clone https://git.mischlabs.de/MrDiderot/MiChess.git michess
|
||||||
cd michess
|
cd michess
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
# .env anpassen (Passwörter, Admin-Email, etc.)
|
# .env anpassen (Passwörter, Admin-Email, etc.)
|
||||||
|
|||||||
108
README.md
108
README.md
@@ -1,83 +1,59 @@
|
|||||||
<h1 align="center">
|
# MiChess
|
||||||
<img src="./assets/chessu.png" alt="chessu" height="128" />
|
|
||||||
</h1>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://ches.su">
|
|
||||||
<img src="https://img.shields.io/github/deployments/dotnize/chessu/Production?label=deployment&style=for-the-badge&color=blue" alt="ches.su" />
|
|
||||||
</a>
|
|
||||||
<img src="https://img.shields.io/github/last-commit/dotnize/chessu?style=for-the-badge" alt="Last commit" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">Yet another Chess web app.
|
Eine selbst-gehostete Schachplattform, inspiriert von Lichess.org.
|
||||||
|
Läuft als Docker-Container auf einer NAS — lokal, privat, ohne Cloud.
|
||||||
|
|
||||||
<p align="center">
|
> Basiert auf [chessu](https://github.com/dotnize/chessu) (MIT) von dotnize — vielen Dank für die solide Basis.
|
||||||
<img src="./assets/demo.jpg" alt="chessu" width="640" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
- play against other users in real-time
|
## Features
|
||||||
- spectate and chat in ongoing games with other users
|
|
||||||
- _optional_ user accounts for tracking stats and game history
|
|
||||||
- ~~play solo against Stockfish~~ (wip)
|
|
||||||
- mobile-friendly
|
|
||||||
- ... and more ([view roadmap](https://github.com/users/dotnize/projects/2))
|
|
||||||
|
|
||||||
Built with Next.js 14, Tailwind CSS + daisyUI, react-chessboard, chess.js, Express.js, socket.io and PostgreSQL.
|
- Echtzeit-Multiplayer (Spieler vs. Spieler)
|
||||||
|
- Stockfish KI in 6 Schwierigkeitsgraden (Anfänger bis Meister)
|
||||||
|
- Nutzeraccounts mit E-Mail & Passwort
|
||||||
|
- Freundessystem mit Anfragen und Freundesliste
|
||||||
|
- Admin-Panel: Nutzerverwaltung, Sperren/Entsperren, Git-Update per Knopfdruck
|
||||||
|
- Spielarchiv & Statistiken
|
||||||
|
- Zuschauer & Chat
|
||||||
|
- Mobil-optimiert
|
||||||
|
|
||||||
## Development
|
## Tech Stack
|
||||||
|
|
||||||
> Node.js 20 or newer is recommended.
|
Next.js 14 · Tailwind CSS · daisyUI · react-chessboard · chess.js · Express.js · Socket.io · PostgreSQL · TypeScript · Docker
|
||||||
|
|
||||||
This project is structured as a monorepo using **pnpm** workspaces, separated into three packages:
|
## Deployment (NAS / Docker)
|
||||||
|
|
||||||
- `client` - Next.js application for the front-end, ~~deployed to ches.su via Vercel~~.
|
```bash
|
||||||
- `server` - Node/Express.js application for the back-end, ~~deployed to server.ches.su via Railway~~.
|
# 1. Repository klonen
|
||||||
- `types` - Shared type definitions required by the client and server.
|
git clone https://git.mischlabs.de/MrDiderot/MiChess.git michess
|
||||||
|
cd michess
|
||||||
|
|
||||||
### Getting started
|
# 2. Konfiguration anpassen
|
||||||
|
cp .env.example .env
|
||||||
|
nano .env # Passwörter, ADMIN_EMAIL etc. setzen
|
||||||
|
|
||||||
1. Install [pnpm](https://pnpm.io/installation).
|
# 3. Starten
|
||||||
2. Install the necessary dependencies by running `pnpm install` in the root directory of the project.
|
docker compose up -d --build
|
||||||
3. In the `server` directory, create a `.env` file for your PostgreSQL database. You can try [ElephantSQL](https://www.elephantsql.com/) or [Aiven](https://aiven.io/postgresql) for a free hosted database.
|
|
||||||
```env
|
|
||||||
PGHOST=db.example.com
|
|
||||||
PGUSER=exampleuser
|
|
||||||
PGPASSWORD=examplepassword
|
|
||||||
PGDATABASE=chessu
|
|
||||||
```
|
|
||||||
4. Run the development servers with `pnpm dev`.
|
|
||||||
- To run the frontend and backend servers separately, use `pnpm dev:client` and `pnpm dev:server`, respectively.
|
|
||||||
5. You can now access the frontend at http://localhost:3000 and the backend at http://localhost:3001.
|
|
||||||
|
|
||||||
## Running chessu with Docker
|
|
||||||
|
|
||||||
To build the project with Docker, you can use the provided `Dockerfile`.
|
|
||||||
```sh
|
|
||||||
docker build -t chessu .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will build the Docker image with the name `chessu`. You can then run the image with the following command:
|
Frontend: `http://deine-nas-ip:3000`
|
||||||
```sh
|
Backend API: `http://deine-nas-ip:3001`
|
||||||
docker run -p 3000:3000 -p 3001:3001 chessu
|
|
||||||
|
## Update
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Manuell via Script
|
||||||
|
./scripts/update.sh
|
||||||
|
|
||||||
|
# Oder im Admin-Panel → "Jetzt aktualisieren"
|
||||||
```
|
```
|
||||||
|
|
||||||
Once built, to start the project with POSTGRES, you can use the provided `docker-compose.yml` file.
|
## Entwicklung (lokal)
|
||||||
```sh
|
|
||||||
docker-compose up
|
```bash
|
||||||
|
pnpm install
|
||||||
|
pnpm dev
|
||||||
```
|
```
|
||||||
Please make sure to modify the values in the `server/.env` file to match the values in the `docker-compose.yml` file or vice versa.
|
|
||||||
|
|
||||||
The entrypoint for the Docker image is set to run pnpm.
|
## Lizenz
|
||||||
The Dockerfile's `CMD` instruction is set to run the project in production mode.
|
|
||||||
If you want to run the project in development mode, you can override the `CMD` instruction by running the following command:
|
|
||||||
```sh
|
|
||||||
docker run -p 3000:3000 -p 3001:3001 chessu dev # runs both client and server in development mode
|
|
||||||
docker run -p 3000:3000 -p 3001:3001 chessu dev:client # runs only the client in development mode
|
|
||||||
docker run -p 3000:3000 -p 3001:3001 chessu dev:server # runs only the server in development mode
|
|
||||||
```
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Please read our [Contributing Guidelines](./CONTRIBUTING.md) before starting a pull request.
|
[MIT](./LICENSE) · Copyright © 2024-present Tom Misch
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
[MIT](./LICENSE)
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@chessu/client",
|
"name": "@michess/client",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"socket.io-client": "^4.7.5"
|
"socket.io-client": "^4.7.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@chessu/types": "workspace:*",
|
"@michess/types": "workspace:*",
|
||||||
"@types/node": "^20.14.10",
|
"@types/node": "^20.14.10",
|
||||||
"@types/react": "^18.3.3",
|
"@types/react": "^18.3.3",
|
||||||
"@types/react-dom": "^18.3.0",
|
"@types/react-dom": "^18.3.0",
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ export async function generateMetadata({ params }: { params: { code: string } })
|
|||||||
return {
|
return {
|
||||||
description: `Play or watch a game with ${game.host?.name}`,
|
description: `Play or watch a game with ${game.host?.name}`,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "chessu",
|
title: "MiChess",
|
||||||
description: `Play or watch a game with ${game.host?.name}`,
|
description: `Play or watch a game with ${game.host?.name}`,
|
||||||
url: `https://ches.su/${game.code}`,
|
url: `https://ches.su/${game.code}`,
|
||||||
siteName: "chessu",
|
siteName: "MiChess",
|
||||||
locale: "en_US",
|
locale: "en_US",
|
||||||
type: "website"
|
type: "website"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import ArchivedGame from "@/components/archive/ArchivedGame";
|
import ArchivedGame from "@/components/archive/ArchivedGame";
|
||||||
import { fetchArchivedGame } from "@/lib/game";
|
import { fetchArchivedGame } from "@/lib/game";
|
||||||
import type { Game } from "@chessu/types";
|
import type { Game } from "@michess/types";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
|
||||||
export async function generateMetadata({ params }: { params: { id: number } }) {
|
export async function generateMetadata({ params }: { params: { id: number } }) {
|
||||||
@@ -19,10 +19,10 @@ export async function generateMetadata({ params }: { params: { id: number } }) {
|
|||||||
return {
|
return {
|
||||||
description: `Archived game: ${game.white?.name} vs ${game.black?.name}`,
|
description: `Archived game: ${game.white?.name} vs ${game.black?.name}`,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "chessu",
|
title: "MiChess",
|
||||||
description: `Archived game: ${game.white?.name} vs ${game.black?.name}`,
|
description: `Archived game: ${game.white?.name} vs ${game.black?.name}`,
|
||||||
url: `https://ches.su/archive/${game.id}`,
|
url: `https://ches.su/archive/${game.id}`,
|
||||||
siteName: "chessu",
|
siteName: "MiChess",
|
||||||
locale: "en_US",
|
locale: "en_US",
|
||||||
type: "website"
|
type: "website"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import AuthModal from "@/components/auth/AuthModal";
|
|||||||
import ContextProvider from "@/context/ContextProvider";
|
import ContextProvider from "@/context/ContextProvider";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: "Michess",
|
title: "MiChess",
|
||||||
description: "Schach spielen – lokal, privat, kostenlos.",
|
description: "Schach spielen – lokal, privat, kostenlos.",
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "Michess",
|
title: "MiChess",
|
||||||
description: "Schach spielen – lokal, privat, kostenlos.",
|
description: "Schach spielen – lokal, privat, kostenlos.",
|
||||||
siteName: "Michess",
|
siteName: "MiChess",
|
||||||
locale: "de_DE",
|
locale: "de_DE",
|
||||||
type: "website"
|
type: "website"
|
||||||
},
|
},
|
||||||
@@ -55,9 +55,9 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|||||||
id="load-theme"
|
id="load-theme"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: `if (localStorage.theme === "dark" || (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
__html: `if (localStorage.theme === "dark" || (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
||||||
document.documentElement.setAttribute("data-theme", "chessuDark");
|
document.documentElement.setAttribute("data-theme", "michessDark");
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.setAttribute("data-theme", "chessuLight");
|
document.documentElement.setAttribute("data-theme", "michessLight");
|
||||||
}`
|
}`
|
||||||
}}
|
}}
|
||||||
></script>
|
></script>
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ export async function generateMetadata({ params }: { params: { name: string } })
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: `${data.name} | chessu`,
|
title: `${data.name} | MiChess`,
|
||||||
description: `${data.name}'s profile`,
|
description: `${data.name}'s profile`,
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: `${data.name} | chessu`,
|
title: `${data.name} | MiChess`,
|
||||||
description: `${data.name}'s profile on chessu`,
|
description: `${data.name}'s profile on MiChess`,
|
||||||
url: `https://ches.su/user/${data.name}`,
|
url: `https://ches.su/user/${data.name}`,
|
||||||
siteName: "chessu",
|
siteName: "MiChess",
|
||||||
locale: "en_US",
|
locale: "en_US",
|
||||||
type: "website"
|
type: "website"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ export default function Footer() {
|
|||||||
return (
|
return (
|
||||||
<footer className="footer border-base-300 dark:border-neutral text-base-content mx-1 mt-4 w-auto grid-flow-col items-center justify-between border-t-2 p-4 md:mx-16 lg:mx-40">
|
<footer className="footer border-base-300 dark:border-neutral text-base-content mx-1 mt-4 w-auto grid-flow-col items-center justify-between border-t-2 p-4 md:mx-16 lg:mx-40">
|
||||||
<div className="items-center">
|
<div className="items-center">
|
||||||
<p>© {new Date().getFullYear()} Michess — Dein privates Schachbrett</p>
|
<p>© {new Date().getFullYear()} MiChess — Dein privates Schachbrett</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="items-center">
|
<div className="items-center">
|
||||||
<a
|
<a
|
||||||
href="https://git.mischlabs.de/MrDiderot/Michess"
|
href="https://git.mischlabs.de/MrDiderot/MiChess"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="btn btn-ghost btn-sm gap-1 normal-case"
|
className="btn btn-ghost btn-sm gap-1 normal-case"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default function Header() {
|
|||||||
>
|
>
|
||||||
<path d="M237.84 383.74c13.61 23.9 35.9 48.09 32.29 80.27H17.83c-3.62-32.18 21.67-56.37 35.28-80.27h184.73zM69.68 120.41h148.64c7.51 0 13.66 6.18 13.66 13.66s-6.18 13.66-13.66 13.66H69.68c-7.48 0-13.66-6.15-13.66-13.66s6.15-13.66 13.66-13.66zM120.55 0h48.95v56.29c0 3.87 3.18 7.04 7.04 7.04h24.32c3.86 0 6.32-3.23 7.04-7.04L218.59 0h43.56L244.7 85.8c-4.01 12.59-13.6 18.96-28.35 19.63H66.56c-12.93-.28-20.33-6.82-22.54-19.63L25.85 0h45.62l10.69 56.29c.71 3.81 3.17 7.04 7.03 7.04h24.32c3.86 0 7.04-3.17 7.04-7.04V0zM70.94 162.75c-1.5 60.45-7.75 119.42-22.87 158.47h191.86c-17.59-44.3-24.65-102.49-26.68-158.47H70.94zM46.28 336.2h195.44c8.94 0 16.26 7.36 16.26 16.26v.01c0 8.9-7.36 16.26-16.26 16.26H46.28c-8.9 0-16.26-7.32-16.26-16.26v-.01c0-8.94 7.32-16.26 16.26-16.26zM16.82 479.03h254.36c9.25 0 16.82 7.57 16.82 16.81v.01c0 9.25-7.57 16.81-16.82 16.81H16.82C7.57 512.66 0 505.1 0 495.85v-.01c0-9.24 7.57-16.81 16.82-16.81z" />
|
<path d="M237.84 383.74c13.61 23.9 35.9 48.09 32.29 80.27H17.83c-3.62-32.18 21.67-56.37 35.28-80.27h184.73zM69.68 120.41h148.64c7.51 0 13.66 6.18 13.66 13.66s-6.18 13.66-13.66 13.66H69.68c-7.48 0-13.66-6.15-13.66-13.66s6.15-13.66 13.66-13.66zM120.55 0h48.95v56.29c0 3.87 3.18 7.04 7.04 7.04h24.32c3.86 0 6.32-3.23 7.04-7.04L218.59 0h43.56L244.7 85.8c-4.01 12.59-13.6 18.96-28.35 19.63H66.56c-12.93-.28-20.33-6.82-22.54-19.63L25.85 0h45.62l10.69 56.29c.71 3.81 3.17 7.04 7.03 7.04h24.32c3.86 0 7.04-3.17 7.04-7.04V0zM70.94 162.75c-1.5 60.45-7.75 119.42-22.87 158.47h191.86c-17.59-44.3-24.65-102.49-26.68-158.47H70.94zM46.28 336.2h195.44c8.94 0 16.26 7.36 16.26 16.26v.01c0 8.9-7.36 16.26-16.26 16.26H46.28c-8.9 0-16.26-7.32-16.26-16.26v-.01c0-8.94 7.32-16.26 16.26-16.26zM16.82 479.03h254.36c9.25 0 16.82 7.57 16.82 16.81v.01c0 9.25-7.57 16.81-16.82 16.81H16.82C7.57 512.66 0 505.1 0 495.85v-.01c0-9.24 7.57-16.81 16.82-16.81z" />
|
||||||
</svg>
|
</svg>
|
||||||
Michess
|
MiChess
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-none gap-1">
|
<div className="flex-none gap-1">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export default function ThemeToggle() {
|
|||||||
const [darkTheme, setDarkTheme] = useState(true);
|
const [darkTheme, setDarkTheme] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (document.documentElement.getAttribute("data-theme") === "chessuDark") {
|
if (document.documentElement.getAttribute("data-theme") === "michessDark") {
|
||||||
setDarkTheme(true);
|
setDarkTheme(true);
|
||||||
} else {
|
} else {
|
||||||
setDarkTheme(false);
|
setDarkTheme(false);
|
||||||
@@ -16,14 +16,14 @@ export default function ThemeToggle() {
|
|||||||
|
|
||||||
function toggleTheme() {
|
function toggleTheme() {
|
||||||
if (
|
if (
|
||||||
document.documentElement.getAttribute("data-theme") === "chessuDark" ||
|
document.documentElement.getAttribute("data-theme") === "michessDark" ||
|
||||||
(!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)
|
(!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)
|
||||||
) {
|
) {
|
||||||
document.documentElement.setAttribute("data-theme", "chessuLight");
|
document.documentElement.setAttribute("data-theme", "michessLight");
|
||||||
localStorage.theme = "light";
|
localStorage.theme = "light";
|
||||||
setDarkTheme(false);
|
setDarkTheme(false);
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.setAttribute("data-theme", "chessuDark");
|
document.documentElement.setAttribute("data-theme", "michessDark");
|
||||||
localStorage.theme = "dark";
|
localStorage.theme = "dark";
|
||||||
setDarkTheme(true);
|
setDarkTheme(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { CustomSquares } from "@/types";
|
import type { CustomSquares } from "@/types";
|
||||||
import { Game } from "@chessu/types";
|
import { Game } from "@michess/types";
|
||||||
import {
|
import {
|
||||||
IconChevronLeft,
|
IconChevronLeft,
|
||||||
IconChevronRight,
|
IconChevronRight,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { SessionContext } from "@/context/session";
|
import { SessionContext } from "@/context/session";
|
||||||
import type { Game } from "@chessu/types";
|
import type { Game } from "@michess/types";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
import GamePage from "./GamePage";
|
import GamePage from "./GamePage";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { SessionContext } from "@/context/session";
|
|||||||
import { useContext, useEffect, useReducer, useRef, useState } from "react";
|
import { useContext, useEffect, useReducer, useRef, useState } from "react";
|
||||||
|
|
||||||
import type { Message } from "@/types";
|
import type { Message } from "@/types";
|
||||||
import type { Game } from "@chessu/types";
|
import type { Game } from "@michess/types";
|
||||||
|
|
||||||
import type { Move, Square } from "chess.js";
|
import type { Move, Square } from "chess.js";
|
||||||
import { Chess } from "chess.js";
|
import { Chess } from "chess.js";
|
||||||
@@ -149,9 +149,9 @@ export default function GamePage({ initialLobby }: { initialLobby: Game }) {
|
|||||||
if (lobby.side === "s" || !lobby.white?.id || !lobby.black?.id) return;
|
if (lobby.side === "s" || !lobby.white?.id || !lobby.black?.id) return;
|
||||||
|
|
||||||
if (!lobby.endReason && lobby.side === lobby.actualGame.turn()) {
|
if (!lobby.endReason && lobby.side === lobby.actualGame.turn()) {
|
||||||
document.title = "(your turn) chessu";
|
document.title = "(your turn) MiChess";
|
||||||
} else {
|
} else {
|
||||||
document.title = "chessu";
|
document.title = "MiChess";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Action, CustomSquares, Lobby, Message } from "@/types";
|
import type { Action, CustomSquares, Lobby, Message } from "@/types";
|
||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
import type { Dispatch, SetStateAction } from "react";
|
import type { Dispatch, SetStateAction } from "react";
|
||||||
import type { Socket } from "socket.io-client";
|
import type { Socket } from "socket.io-client";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Action, CustomSquares, Lobby } from "@/types";
|
import type { Action, CustomSquares, Lobby } from "@/types";
|
||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
import type { Dispatch, SetStateAction } from "react";
|
import type { Dispatch, SetStateAction } from "react";
|
||||||
|
|
||||||
export const syncPgn = (
|
export const syncPgn = (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
import { createContext, Dispatch, SetStateAction, useContext } from "react";
|
import { createContext, Dispatch, SetStateAction, useContext } from "react";
|
||||||
|
|
||||||
export const SessionContext = createContext<{
|
export const SessionContext = createContext<{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { API_URL } from "@/config";
|
import { API_URL } from "@/config";
|
||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
|
|
||||||
export const fetchSession = async () => {
|
export const fetchSession = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { API_URL } from "@/config";
|
import { API_URL } from "@/config";
|
||||||
import type { Game } from "@chessu/types";
|
import type { Game } from "@michess/types";
|
||||||
|
|
||||||
export const createGame = async (side: string, unlisted: boolean) => {
|
export const createGame = async (side: string, unlisted: boolean) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { API_URL } from "@/config";
|
import { API_URL } from "@/config";
|
||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
|
|
||||||
export const fetchProfileData = async (name: string) => {
|
export const fetchProfileData = async (name: string) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
import type { Chess } from "chess.js";
|
import type { Chess } from "chess.js";
|
||||||
|
|
||||||
export interface Lobby extends Game {
|
export interface Lobby extends Game {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ module.exports = {
|
|||||||
extend: {}
|
extend: {}
|
||||||
},
|
},
|
||||||
plugins: [require("daisyui")],
|
plugins: [require("daisyui")],
|
||||||
darkMode: ["class", '[data-theme="chessuDark"]'],
|
darkMode: ["class", '[data-theme="michessDark"]'],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
// based on daisyUI night and winter themes
|
// based on daisyUI night and winter themes
|
||||||
themes: [
|
themes: [
|
||||||
{
|
{
|
||||||
chessuLight: {
|
michessLight: {
|
||||||
primary: "#047AFF",
|
primary: "#047AFF",
|
||||||
secondary: "#818CF8",
|
secondary: "#818CF8",
|
||||||
accent: "#C148AC",
|
accent: "#C148AC",
|
||||||
@@ -24,7 +24,7 @@ module.exports = {
|
|||||||
warning: "#EFD7BB",
|
warning: "#EFD7BB",
|
||||||
error: "#E58B8B"
|
error: "#E58B8B"
|
||||||
},
|
},
|
||||||
chessuDark: {
|
michessDark: {
|
||||||
primary: "#38BDF8",
|
primary: "#38BDF8",
|
||||||
secondary: "#818CF8",
|
secondary: "#818CF8",
|
||||||
accent: "#1d4ed8",
|
accent: "#1d4ed8",
|
||||||
@@ -37,6 +37,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
darkTheme: "chessuDark"
|
darkTheme: "michessDark"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "chessu",
|
"name": "michess",
|
||||||
"private": "true",
|
"private": "true",
|
||||||
"author": "dotnize",
|
"author": "Tom Misch",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install:client": "pnpm install --filter client",
|
"install:client": "pnpm install --filter client",
|
||||||
|
|||||||
4939
pnpm-lock.yaml
generated
4939
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Michess Update-Script
|
# MiChess Update-Script
|
||||||
# Auf der NAS ausführen um die App auf den neuesten Stand zu bringen
|
# Auf der NAS ausführen um die App auf den neuesten Stand zu bringen
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@@ -7,7 +7,7 @@ set -e
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
echo "=== Michess Update ==="
|
echo "=== MiChess Update ==="
|
||||||
echo "Verzeichnis: $SCRIPT_DIR"
|
echo "Verzeichnis: $SCRIPT_DIR"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@chessu/server",
|
"name": "@michess/server",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "./dist/server.js",
|
"main": "./dist/server.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"xss": "^1.0.15"
|
"xss": "^1.0.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@chessu/types": "workspace:*",
|
"@michess/types": "workspace:*",
|
||||||
"@types/connect-pg-simple": "^7.0.3",
|
"@types/connect-pg-simple": "^7.0.3",
|
||||||
"@types/cors": "^2.8.17",
|
"@types/cors": "^2.8.17",
|
||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
import { hash, verify } from "argon2";
|
import { hash, verify } from "argon2";
|
||||||
import type { Request, Response } from "express";
|
import type { Request, Response } from "express";
|
||||||
import xss from "xss";
|
import xss from "xss";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
import type { Request, Response } from "express";
|
import type { Request, Response } from "express";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Game, User } from "@chessu/types";
|
import type { Game, User } from "@michess/types";
|
||||||
import { db } from "../index.js";
|
import { db } from "../index.js";
|
||||||
|
|
||||||
export const activeGames: Game[] = [];
|
export const activeGames: Game[] = [];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
import { db } from "../index.js";
|
import { db } from "../index.js";
|
||||||
|
|
||||||
export const create = async (user: User, password: string) => {
|
export const create = async (user: User, password: string) => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { User } from "@chessu/types";
|
import type { User } from "@michess/types";
|
||||||
import PGSimple from "connect-pg-simple";
|
import PGSimple from "connect-pg-simple";
|
||||||
import type { Session } from "express-session";
|
import type { Session } from "express-session";
|
||||||
import session from "express-session";
|
import session from "express-session";
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ db.query(INIT_TABLES, async (err) => {
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
} else {
|
} else {
|
||||||
console.log("Michess tables initialized");
|
console.log("MiChess tables initialized");
|
||||||
|
|
||||||
// Set admin role for ADMIN_EMAIL if configured
|
// Set admin role for ADMIN_EMAIL if configured
|
||||||
const adminEmail = process.env.ADMIN_EMAIL;
|
const adminEmail = process.env.ADMIN_EMAIL;
|
||||||
@@ -81,5 +81,5 @@ initSocket();
|
|||||||
|
|
||||||
const port = process.env.PORT || 3001;
|
const port = process.env.PORT || 3001;
|
||||||
server.listen(port, () => {
|
server.listen(port, () => {
|
||||||
console.log(`Michess API server listening on :${port}`);
|
console.log(`MiChess API server listening on :${port}`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Game } from "@chessu/types";
|
import type { Game } from "@michess/types";
|
||||||
import { Chess } from "chess.js";
|
import { Chess } from "chess.js";
|
||||||
import type { DisconnectReason, Socket } from "socket.io";
|
import type { DisconnectReason, Socket } from "socket.io";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@chessu/types",
|
"name": "@michess/types",
|
||||||
"private": "true",
|
"private": "true",
|
||||||
"version": "0.0.0"
|
"version": "0.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user