Documentation Init

This commit is contained in:
headlessdev 2025-04-20 19:54:58 +02:00
parent 2eb0b4c8a0
commit 0975bc5c5f
9 changed files with 511 additions and 336 deletions

View File

@ -4,25 +4,39 @@ import { defineConfig } from 'vitepress'
export default defineConfig({
title: "CoreControl",
description: "Dashboard to manage your entire server infrastructure",
lastUpdated: true,
cleanUrls: true,
metaChunk: true,
head: [
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
],
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: '/logo.png',
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
{ text: 'Installation', link: '/installation' }
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2025-present CoreControl'
},
search: {
provider: 'local',
},
sidebar: [
{
text: 'Examples',
text: 'Deploy',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
{ text: 'Installation', link: '/installation' },
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
{ icon: 'github', link: 'https://github.com/crocofied/corecontrol' }
]
}
})

View File

@ -1,49 +0,0 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

View File

@ -4,15 +4,18 @@ layout: home
hero:
name: "CoreControl"
text: "Dashboard to manage your entire server infrastructure"
text: "Manage your server infrastructure"
tagline: My great project tagline
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
text: Install
link: /installation
- theme: alt
text: API Examples
link: /api-examples
text: GitHub
link: https://github.com/crocofied/corecontrol
image:
src: /logo.png
alt: Logo
features:
- title: Feature A
@ -23,3 +26,9 @@ features:
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---
<style>
:root {
--vp-home-hero-image-background-image: linear-gradient(rgba(255,255,255,0.25), rgba(255,255,255,0.25));
--vp-home-hero-image-filter: blur(100px);
}
</style>

74
docs/installation.md Normal file
View File

@ -0,0 +1,74 @@
# Installation
The easiest way to install CoreControl is using Docker Compose. Follow these steps:
## Docker Compose Installation
::: danger
CoreControl is at an early stage of development and is subject to change. It is not recommended for use in a production environment at this time.
:::
1. Make sure [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed on your system.
2. Create a file named `docker-compose.yml` with the following content:
```yaml
services:
web:
image: haedlessdev/corecontrol:latest
ports:
- "3000:3000"
environment:
JWT_SECRET: RANDOM_SECRET # Replace with a secure random string
DATABASE_URL: "postgresql://postgres:postgres@db:5432/postgres"
agent:
image: haedlessdev/corecontrol-agent:latest
environment:
DATABASE_URL: "postgresql://postgres:postgres@db:5432/postgres"
depends_on:
db:
condition: service_healthy
db:
image: postgres:17
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 2s
retries: 10
volumes:
postgres_data:
```
3. Generate a custom JWT_SECRET with e.g. [jwtsecret.com/generate](https://jwtsecret.com/generate)
3. Start CoreControl with the following command:
```bash
docker-compose up -d
# OR
docker compose up -d
```
5. The application is now available at `http://localhost:3000`.
## Authentication
CoreControl comes with a default administrator account:
- **Email**: admin@example.com
- **Password**: admin
::: warning
For security reasons, it is strongly recommended to change the default credentials immediately after your first login.
:::
You can change the administrator password in the settings after logging in.

View File

@ -1,85 +0,0 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

BIN
docs/public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

576
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -43,20 +43,23 @@
"lucide-react": "^0.487.0",
"next": "15.3.0",
"next-themes": "^0.4.6",
"postcss-loader": "^8.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.2.0",
"tw-animate-css": "^1.2.5"
"tw-animate-css": "^1.2.5",
"vitepress": "^1.6.3"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.21",
"postcss": "^8.5.3",
"prisma": "^6.6.0",
"tailwindcss": "^4",
"tailwindcss": "^4.1.4",
"tsx": "^4.19.3",
"typescript": "^5",
"vitepress": "^1.6.3"
"typescript": "^5"
}
}
}

View File

@ -1,5 +0,0 @@
const config = {
plugins: ["@tailwindcss/postcss"],
};
export default config;