From 151e0b331ac99a941654aa98332cde8e53799e3c Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 18:01:50 +0800 Subject: [PATCH 1/5] update deps --- package.json | 2 +- server/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7cd7109..974dd84 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "eslint": "^8.36.0", "eslint-config-next": "13.2.4", "eslint-config-prettier": "^8.7.0", - "prettier": "^2.8.4", + "prettier": "^2.8.5", "prettier-plugin-tailwindcss": "^0.2.5" }, "engines": { diff --git a/server/package.json b/server/package.json index 11f1cf0..45324d7 100644 --- a/server/package.json +++ b/server/package.json @@ -24,7 +24,7 @@ "@chessu/types": "*", "@types/connect-pg-simple": "^7.0.0", "@types/express": "^4.17.17", - "@types/express-session": "^1.17.6", + "@types/express-session": "^1.17.7", "@types/node": "^18.15.3", "@types/pg": "^8.6.6", "ts-node": "^10.9.1", From b364c696336628b071d75f8846c6a7b5afcb6771 Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 16:05:44 +0800 Subject: [PATCH 2/5] update readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a46a80..6edbdd1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # chessu [![Deployment status](https://img.shields.io/github/deployments/nizewn/chessu/Production?label=deployment)](https://ches.su) -> ❗ This project is still in the early stages of development. Expect bugs and incomplete features. +> This project is still in the early stages of development. Expect bugs and incomplete features. Yet another Chess web app. Live demo at [ches.su](https://ches.su). @@ -8,6 +8,7 @@ Yet another Chess web app. Live demo at [ches.su](https://ches.su). - spectate and chat in ongoing games with other users - ~~_optional_ user accounts for tracking stats and game history~~ (wip) - mobile-friendly (wip) +- ... and more ([view roadmap](https://github.com/users/nizewn/projects/2)) Built with Next.js 13, Tailwind CSS + daisyUI, react-chessboard, chess.js, Express.js, socket.io and PostgreSQL. @@ -47,7 +48,7 @@ npm start -w server
Environment variables

-You may create a `.env` file in each package directory to set their environment variables. +You may also create a `.env` file in each package directory to set their environment variables. client: From 17a0befae3c6991b8d06a2cc45a6b26041063af8 Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 18:22:26 +0800 Subject: [PATCH 3/5] use 204 status to avoid logging 404 to console --- server/src/controllers/auth.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 3f4e57f..5bf5b26 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -10,7 +10,7 @@ export const getCurrentSession = async (req: Request, res: Response) => { if (req.session.user) { res.status(200).json(req.session.user); } else { - res.status(404).end(); + res.status(204).end(); } } catch (err: unknown) { console.log(err); From 272cd52ee23ebcd1f76c02900712c0771d5762c6 Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 18:29:52 +0800 Subject: [PATCH 4/5] add robots.txt --- client/public/robots.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 client/public/robots.txt diff --git a/client/public/robots.txt b/client/public/robots.txt new file mode 100644 index 0000000..2cd6428 --- /dev/null +++ b/client/public/robots.txt @@ -0,0 +1,3 @@ +User-Agent: * +Allow: /$ +Disallow: / From 4c18beeb3b9e3fc7ed6efaf331ac7c0583199dbe Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Mon, 20 Mar 2023 18:41:24 +0800 Subject: [PATCH 5/5] accessibility & seo improvements --- client/src/components/ThemeToggle.tsx | 1 + client/src/components/auth/AuthModal.tsx | 10 +++++++--- client/src/components/home/CreateGame.tsx | 4 +++- client/src/components/home/JoinGame.tsx | 2 +- .../src/components/home/PublicGames/RefreshButton.tsx | 1 + 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/client/src/components/ThemeToggle.tsx b/client/src/components/ThemeToggle.tsx index 6982f14..4bfea62 100644 --- a/client/src/components/ThemeToggle.tsx +++ b/client/src/components/ThemeToggle.tsx @@ -30,6 +30,7 @@ export default function ThemeToggle() { return (