docs: update

This commit is contained in:
Takeshi Kimata
2024-07-29 22:01:06 +09:00
parent 1b61567ae7
commit 0da8e4129e
11 changed files with 110 additions and 73 deletions

View File

@@ -1,4 +0,0 @@
{
"label": "Architecuture",
"position": 5
}

View File

@@ -0,0 +1,4 @@
{
"label": "Development",
"position": 4
}

42
docs/docs/dev/backend.md Normal file
View File

@@ -0,0 +1,42 @@
---
sidebar_position: 2
---
# Backend
## Environmental variables
:::warning[Strongly Recommended]
Although the system will work with default settings without setting environment variables, it is strongly recommended to set SECRET_KEY in production.
:::
Create `.env` File on `backend/`
```.env
FRONTEND_ORIGIN=http://localhost:8000
PORT=8001
SECRET_KEY=your-secret-key
```
## Set up database
```bash
npm run migrate
```
## Start backend server
```bash
npm run start
```
If you do not bother to place `.env` files, such as in a development environment, you can start the server with `npm run dev`.
## Database operation
The following commands may be useful when trying things out in development:
- drop tables: `npm run drop`
- insert seed data: `npm run seed`

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 4
---
# Entity Relationship

32
docs/docs/dev/frontend.md Normal file
View File

@@ -0,0 +1,32 @@
---
sidebar_position: 3
---
# Frontend
## Environmental variables
:::info
Although the system will work with default settings without setting environment variables, but you can override the settings by setting environment variables.
:::
Create `.env` File on `frontend/`
```
NEXT_PUBLIC_BACKEND_ORIGIN=http://localhost:8001
```
## Start frontend server with dev mode
```bash
npm run dev
```
## Start frontend server with production mode
```bash
npm run build
npm run start
```

View File

@@ -0,0 +1,26 @@
---
sidebar_position: 1
---
# Technologies
UnitTCMS is powered by following technologies. For more detailed package and version information, please see package.json.
## Frontend
| Technology | Use |
| ----------------------------------------------- | -------------------- |
| [React](https://react.dev/) | Rendering |
| [Next.js](https://nextjs.org/) | Routing, etc. |
| [NextUI](https://nextui.org/) | UI library |
| [next-intl](https://next-intl-docs.vercel.app/) | Internationalization |
| [ApexCharts](https://apexcharts.com/) | Charts |
## Backend
| Technology | Use |
| ----------------------------------- | ------------------ |
| [Node.js](https://nodejs.org/en) | JavaScript runtime |
| [Express](https://expressjs.com/) | API Server |
| [Sequelize](https://sequelize.org/) | ORM |
| [SQLite](https://www.sqlite.org/) | database |

View File

@@ -24,7 +24,7 @@ Move to backend directory, then install dependencies.
```bash
cd backend
npm install
npm ci
```
Initialize the database with the following command.
@@ -45,7 +45,7 @@ Move to frontend directory, then install dependencies.
```bash
cd frontend
npm install
npm ci
```
Build frontend code

View File

@@ -1,4 +1,4 @@
{
"label": "Roadmap",
"position": 4
"position": 5
}