diff --git a/docs/docs/architecture/_category_.json b/docs/docs/architecture/_category_.json index e641a32..6839f73 100644 --- a/docs/docs/architecture/_category_.json +++ b/docs/docs/architecture/_category_.json @@ -1,8 +1,4 @@ { "label": "Architecuture", - "position": 2, - "link": { - "type": "generated-index", - "description": "Architecuture" - } + "position": 3 } diff --git a/docs/docs/getstarted/_category_.json b/docs/docs/getstarted/_category_.json new file mode 100644 index 0000000..7fca846 --- /dev/null +++ b/docs/docs/getstarted/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Get started", + "position": 2 +} diff --git a/docs/docs/getstarted/docker.md b/docs/docs/getstarted/docker.md new file mode 100644 index 0000000..36820fb --- /dev/null +++ b/docs/docs/getstarted/docker.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 2 +--- + +# Running TestPlat as a Docker container + +## \ No newline at end of file diff --git a/docs/docs/getstarted/manual.md b/docs/docs/getstarted/manual.md new file mode 100644 index 0000000..fbf1035 --- /dev/null +++ b/docs/docs/getstarted/manual.md @@ -0,0 +1,55 @@ +--- +sidebar_position: 3 +--- + +# Running TestPlat manually + +:::info[Prerequisite] + +Prerequisite: v20 or higher node must be installed. + +::: + +To use TestPlat, you need run frontend server and backend server (API server). + +First, clone the repository. + +```bash +git clone git@github.com:kimatata/TestPlat.git +``` + +## Run backend server + +Moves to backend directory, then install dependencies. + +```bash +cd backend +npm ci +``` + +Initialize the database with the following command. + +```bash +npm run migrate +``` + +Start backend server. + +```bash +node index +``` + +## Run frontend server + +Moves to frontend directory, then install dependencies. + +```bash +cd frontend +npm ci +``` + +Start frontend server + +```bash +rpm run dev +``` diff --git a/docs/docs/getstarted/selfhost.md b/docs/docs/getstarted/selfhost.md new file mode 100644 index 0000000..8bbf129 --- /dev/null +++ b/docs/docs/getstarted/selfhost.md @@ -0,0 +1,10 @@ +--- +sidebar_position: 1 +--- + +# Self hosting + +TestPlat is designed for self-hosted use. There are two ways to self-host the application: “Manual” and “Docker”. + +- Docker (Recommended) +- Manual diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 50f803e..2568a6f 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -8,12 +8,12 @@ import {themes as prismThemes} from 'prism-react-renderer'; /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'TestPlat Document', + title: 'TestPlat', // tagline: 'Dinosaurs are cool', favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://your-docusaurus-site.example.com', + url: 'https://kimatata.github.io', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/TestPlat/', @@ -30,8 +30,8 @@ const config = { // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'ja', - locales: ['ja'], + defaultLocale: 'en', + locales: ['en'], }, presets: [ @@ -59,57 +59,17 @@ const config = { // Replace with your project's social card image: 'img/docusaurus-social-card.jpg', navbar: { - title: 'TestPlat Docs', - // logo: { - // alt: 'TestPlat Logo', - // src: 'img/logo.svg', - // }, + title: 'TestPlat', + logo: { + alt: 'TestPlat Logo', + src: 'img/android-chrome-192x192.png', + }, items: [ - // { - // type: 'docSidebar', - // sidebarId: 'tutorialSidebar', - // position: 'left', - // label: 'Tutorial', - // }, {to: '/docs', label: 'Docs', position: 'left'}, - // {to: '/blog', label: 'Blog', position: 'left'}, - { - href: 'https://github.com/facebook/docusaurus', - label: 'GitHub', - position: 'right', - }, ], }, footer: { style: 'dark', - links: [ - // { - // title: 'Docs', - // items: [ - // { - // label: 'Tutorial', - // to: '/docs/intro', - // }, - // ], - // }, - // { - // title: 'Community', - // items: [ - // { - // label: 'Stack Overflow', - // href: 'https://stackoverflow.com/questions/tagged/docusaurus', - // }, - // { - // label: 'Discord', - // href: 'https://discordapp.com/invite/docusaurus', - // }, - // { - // label: 'Twitter', - // href: 'https://twitter.com/docusaurus', - // }, - // ], - // }, - ], copyright: `Copyright © ${new Date().getFullYear()} TestPlat. Built with Docusaurus.`, }, prism: { diff --git a/docs/static/img/android-chrome-192x192.png b/docs/static/img/android-chrome-192x192.png new file mode 100644 index 0000000..1ea1b87 Binary files /dev/null and b/docs/static/img/android-chrome-192x192.png differ diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico index c01d54b..ac4fe96 100644 Binary files a/docs/static/img/favicon.ico and b/docs/static/img/favicon.ico differ diff --git a/frontend/messages/en.json b/frontend/messages/en.json index ac58650..251e24b 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1,6 +1,7 @@ { "Index": { "get_started": "Get Started", + "demo": "Demo", "oss_tcmt": "Open Source Test Case Management", "web_application": "Web Application", "integrate_and_manage": "Integrate and manage all your software testing.", @@ -17,25 +18,10 @@ "case_home": "Dashboard", "case_run": "Test Runs" }, - "Guide": { - "self_host": "Self Host", - "docker": "Docker", - "manual": "Manual", - "self_host_app": "Self host the application", - "run_as_docker": "Running TestPlat as a Docker container", - "run_by_manually": "Running TestPlat manually", - "move_to_back": "Moves to backend directory", - "backend_install": "Install dependencies", - "init_db": "Initialize Database", - "backend_start": "Start backend server", - "move_to_front": "Moves to frontend directory", - "front_install": "Install dependencies", - "front_start": "Start frontend server" - }, "Header": { "title": "Open Source Test Case Management Tool", "description": "Integrate and manage all your software testing", - "guide": "Guide", + "docs": "Docs", "projects": "Projects" }, "Projects": { diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json index 113e5f7..682602a 100644 --- a/frontend/messages/ja.json +++ b/frontend/messages/ja.json @@ -1,6 +1,7 @@ { "Index": { "get_started": "テスト管理を始める", + "demo": "デモ", "oss_tcmt": "オープンソーステストケース管理", "web_application": "ウェブアプリケーション", "integrate_and_manage": "ソフトウェア開発にかかわるすべてのテストを統合管理", @@ -17,25 +18,10 @@ "case_home": "ダッシュボード", "case_run": "テスト実行" }, - "Guide": { - "self_host": "セルフホスト", - "docker": "Docker", - "manual": "マニュアル", - "self_host_app": "アプリのセルフホスト", - "run_as_docker": "Docker containerによる実行", - "run_by_manually": "手動での実行", - "move_to_back": "backendディレクトリに遷移", - "backend_install": "依存関係をインストール", - "init_db": "データベースの初期化", - "backend_start": "バックエンドサーバーの起動", - "move_to_front": "frontendディレクトリに遷移", - "front_install": "依存関係をインストール", - "front_start": "フロントエンドサーバーの起動" - }, "Header": { "title": "オープンソーステストケース管理ツール", "description": "ソフトウェア開発にかかわるすべてのテストを統合管理", - "guide": "ガイド", + "docs": "ドキュメント", "projects": "プロジェクト" }, "Projects": { diff --git a/frontend/src/app/[locale]/Header.tsx b/frontend/src/app/[locale]/Header.tsx index f30e1d9..0702c25 100644 --- a/frontend/src/app/[locale]/Header.tsx +++ b/frontend/src/app/[locale]/Header.tsx @@ -6,12 +6,12 @@ import { Chip, Link as NextUiLink, } from "@nextui-org/react"; +import { MoveUpRight } from "lucide-react"; import { useTranslations } from "next-intl"; import { Link } from "@/src/navigation"; import LangSwitch from "./LangSwitch"; import { ThemeSwitch } from "@/components/theme-switch"; import { GithubIcon } from "@/components/icons"; - import Image from "next/image"; export default function Header(params: { locale: string }) { @@ -46,15 +46,6 @@ export default function Header(params: { locale: string }) { - - - {t("guide")} - - + + } + > + {t("docs")} + + diff --git a/frontend/src/app/[locale]/PaneMainTitle.tsx b/frontend/src/app/[locale]/PaneMainTitle.tsx index d27e50b..41ef22d 100644 --- a/frontend/src/app/[locale]/PaneMainTitle.tsx +++ b/frontend/src/app/[locale]/PaneMainTitle.tsx @@ -1,6 +1,5 @@ import { title, subtitle } from "@/components/primitives"; import { Button, Link as NextUiLink } from "@nextui-org/react"; -import { ExternalLink } from "lucide-react"; import { Link } from "@/src/navigation"; import { useTranslations } from "next-intl"; @@ -38,27 +37,32 @@ export default function MainTitle({ locale }: Props) {
+ + -
diff --git a/frontend/src/app/[locale]/guide/GuideBar.tsx b/frontend/src/app/[locale]/guide/GuideBar.tsx deleted file mode 100644 index 52ba589..0000000 --- a/frontend/src/app/[locale]/guide/GuideBar.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { useTranslations } from "next-intl"; -import { Link, NextUiLinkClasses } from "@/src/navigation"; - -export type Props = { - locale: string; -}; - -export default function Guidebar({ locale }: Props) { - const t = useTranslations("Guide"); - const links = [ - { - name: t("self_host"), - href: "/guide/selfhost", - indent: false, - }, - { - name: t("docker"), - href: "/guide/selfhost/docker", - indent: true, - }, - { - name: t("manual"), - href: "/guide/selfhost/manual", - indent: true, - }, - ]; - - return ( -
- {links.map((link) => ( -
- - {link.name} - -
- ))} -
- ); -} diff --git a/frontend/src/app/[locale]/guide/layout.tsx b/frontend/src/app/[locale]/guide/layout.tsx deleted file mode 100644 index d24d3d4..0000000 --- a/frontend/src/app/[locale]/guide/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import Guidebar from "./GuideBar"; - -export default function GuideLayout({ - children, - params: { locale }, -}: { - children: React.ReactNode; - params: { locale: string }; -}) { - return ( -
- -
-
{children}
-
-
- ); -} diff --git a/frontend/src/app/[locale]/guide/selfhost/docker/page.tsx b/frontend/src/app/[locale]/guide/selfhost/docker/page.tsx deleted file mode 100644 index c69b320..0000000 --- a/frontend/src/app/[locale]/guide/selfhost/docker/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useTranslations } from "next-intl"; -import { title } from "@/components/primitives"; -import { Snippet, Card, CardBody } from "@nextui-org/react"; - -export default function Page() { - const t = useTranslations("Guide"); - - return ( -
-

{t("run_as_docker")}

-
- ); -} diff --git a/frontend/src/app/[locale]/guide/selfhost/manual/page.tsx b/frontend/src/app/[locale]/guide/selfhost/manual/page.tsx deleted file mode 100644 index 13bf139..0000000 --- a/frontend/src/app/[locale]/guide/selfhost/manual/page.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useTranslations } from "next-intl"; -import { title } from "@/components/primitives"; -import { Snippet } from "@nextui-org/react"; - -export default function Page() { - const t = useTranslations("Guide"); - const manualProcedures = [ - { - uid: "clone", - detail: "", - code: "git clone git@github.com:kimatata/TestPlat.git", - }, - { - uid: "move-to-backend", - detail: t("move_to_back"), - code: "cd backend", - }, - { - uid: "backend-install", - detail: t("backend_install"), - code: "npm install", - }, - { uid: "init-db", detail: t("init_db"), code: "npm run migrate" }, - { uid: "backend_start", detail: t("front_start"), code: "node index" }, - { - uid: "move-to-frontend", - detail: t("move_to_front"), - code: "cd frontend", - }, - { - uid: "front-install", - detail: t("frontend_install"), - code: "npm install", - }, - { uid: "front-start", detail: t("front_start"), code: "npm run start" }, - ]; - - return ( -
-

{t("run_by_manually")}

-
- {manualProcedures.map((procedure, index) => ( -
-

{procedure.detail}

- - {procedure.code} - -
- ))} -
-
- ); -} diff --git a/frontend/src/app/[locale]/guide/selfhost/page.tsx b/frontend/src/app/[locale]/guide/selfhost/page.tsx deleted file mode 100644 index 81ab3e9..0000000 --- a/frontend/src/app/[locale]/guide/selfhost/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { useTranslations } from "next-intl"; -import { title } from "@/components/primitives"; - -export default function Page() { - const t = useTranslations("Guide"); - - return ( -
-

{t("self_host")}

-
- ); -}