feat(docs): migrate documentation to Next.js with Fumadocs
This commit migrates the documentation site from Astro to Next.js, leveraging Fumadocs for enhanced functionality and maintainability. The migration includes: - New Next.js configuration and setup - Integration of Fumadocs for documentation rendering - Addition of new documentation assets and images - Removal of Astro-related files and configurations The migration aims to improve the documentation site's performance, scalability, and developer experience.
3
apps/docs/.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
||||
}
|
||||
31
apps/docs/.gitignore
vendored
@@ -1,3 +1,28 @@
|
||||
node_modules
|
||||
.astro
|
||||
dist
|
||||
# deps
|
||||
/node_modules
|
||||
|
||||
# generated content
|
||||
.contentlayer
|
||||
.content-collections
|
||||
.source
|
||||
|
||||
# test & build
|
||||
/coverage
|
||||
/.next/
|
||||
/out/
|
||||
/build
|
||||
*.tsbuildinfo
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
/.pnp
|
||||
.pnp.js
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# others
|
||||
.env*.local
|
||||
.vercel
|
||||
next-env.d.ts
|
||||
55
apps/docs/.vscode/css.json
vendored
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"version": 1.1,
|
||||
"atDirectives": [
|
||||
{
|
||||
"name": "@tailwind",
|
||||
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
|
||||
"references": [
|
||||
{
|
||||
"name": "Tailwind Documentation",
|
||||
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@apply",
|
||||
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
|
||||
"references": [
|
||||
{
|
||||
"name": "Tailwind Documentation",
|
||||
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@responsive",
|
||||
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
|
||||
"references": [
|
||||
{
|
||||
"name": "Tailwind Documentation",
|
||||
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@screen",
|
||||
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
|
||||
"references": [
|
||||
{
|
||||
"name": "Tailwind Documentation",
|
||||
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@variants",
|
||||
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
|
||||
"references": [
|
||||
{
|
||||
"name": "Tailwind Documentation",
|
||||
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
10
apps/docs/.vscode/extensions.json
vendored
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
],
|
||||
|
||||
"unwantedRecommendations": [
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
51
apps/docs/.vscode/settings.json
vendored
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"eslint.workingDirectories": [
|
||||
{ "pattern": "apps/*/" },
|
||||
{ "pattern": "packages/*/" }
|
||||
],
|
||||
|
||||
"tailwindCSS.experimental.configFile": {
|
||||
"apps/web/tailwind.config.ts": "apps/web/**"
|
||||
},
|
||||
|
||||
"tailwindCSS.experimental.classRegex": [
|
||||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||
],
|
||||
|
||||
"tailwindCSS.classAttributes": [
|
||||
"class",
|
||||
"className",
|
||||
"tw"
|
||||
],
|
||||
|
||||
"css.customData": [
|
||||
".vscode/css.json"
|
||||
],
|
||||
|
||||
"[javascript]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
}
|
||||
},
|
||||
|
||||
"[typescript]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
}
|
||||
},
|
||||
|
||||
"[typescriptreact]": {
|
||||
"editor.formatOnSave": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
}
|
||||
},
|
||||
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"typescript"
|
||||
],
|
||||
}
|
||||
26
apps/docs/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# docs-v2
|
||||
|
||||
This is a Next.js application generated with
|
||||
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
|
||||
|
||||
Run development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
yarn dev
|
||||
```
|
||||
|
||||
Open http://localhost:3000 with your browser to see the result.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js and Fumadocs, take a look at the following
|
||||
resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
|
||||
features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
|
||||
@@ -1,58 +0,0 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
starlight({
|
||||
title: '🌴 Palmr. - Documentation',
|
||||
defaultLocale: 'root',
|
||||
social: {
|
||||
github: 'https://github.com/kyantech/Palmr',
|
||||
openCollective: 'https://github.com/sponsors/kyantech',
|
||||
},
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Introduction',
|
||||
items: [
|
||||
{ label: 'Welcome to Palmr.', link: '/' },
|
||||
{ label: 'Architecture of Palmr.', link: '/core/architecture' },
|
||||
{ label: 'GitHub architecture', link: '/core/github-architecture' },
|
||||
{ label: 'Installation (Docker Compose)', link: '/core/installation' },
|
||||
{ label: 'Manual installation', link: '/core/manual-installation' },
|
||||
{ label: 'API Endpoints', link: '/core/api-docs' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'How to use Palmr.',
|
||||
items: [
|
||||
{ label: 'First login (Admin)', link: '/main/login' },
|
||||
{ label: 'Manage users', link: '/main/manage-users' },
|
||||
{ label: 'Uploading files', link: '/main/upload' },
|
||||
{ label: 'Creating a share', link: '/main/generate-share' },
|
||||
{ label: 'Configuring SMTP', link: '/main/configuring-smtp' },
|
||||
{ label: 'Available languages', link: '/main/available-languages' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Developers',
|
||||
items: [
|
||||
{ label: 'How to contribute', link: '/developers/contribute' },
|
||||
{ label: 'How to open an issue', link: '/developers/open-an-issue' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Sponsor this project',
|
||||
items: [
|
||||
{ label: 'Star this project on Github', link: '/sponsor/gh-star' },
|
||||
{ label: 'Github Sponsors', link: '/sponsor/gh-sponsor' },
|
||||
],
|
||||
},
|
||||
],
|
||||
lastUpdated: true,
|
||||
pagination: false,
|
||||
customCss: [
|
||||
'./src/styles/custom.css',
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -7,7 +7,7 @@ title: Architecture of Palmr.
|
||||
|
||||
Understanding the architecture of Palmr. is crucial for both deploying and scaling the application. Below is a diagram illustrating the main components:
|
||||
|
||||

|
||||

|
||||
|
||||
## **Technologies Used**
|
||||
|
||||
@@ -32,7 +32,7 @@ The project uses i18next for internationalization (i18n) support. The language d
|
||||
|
||||
#### 2. Manual Selection
|
||||
|
||||

|
||||

|
||||
|
||||
- Users can manually switch languages through the language selector in the UI
|
||||
- Language preference is saved in the browser's localStorage
|
||||
@@ -18,15 +18,15 @@ Now, let's go through the step-by-step process to configure the **SMTP Server**.
|
||||
|
||||
To access **Settings**, an **ADMIN** user must click on the profile picture in the **header** and select **Settings** from the dropdown menu.
|
||||
|
||||

|
||||

|
||||
|
||||
Once inside the **Settings** panel, click on the **Email** card to expand the SMTP configuration options.
|
||||
|
||||

|
||||

|
||||
|
||||
After expanding the card, the following SMTP configuration fields will appear:
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -34,7 +34,7 @@ After expanding the card, the following SMTP configuration fields will appear:
|
||||
|
||||
The first step is to **enable SMTP** by selecting "Yes" in the **SMTP Enabled** field.
|
||||
|
||||

|
||||

|
||||
|
||||
Once SMTP is enabled, you can configure the other necessary fields:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: How to Contribute to the Palmr. Project
|
||||
title: How to Contribute
|
||||
---
|
||||
|
||||
Thank you for your interest in contributing to the **Palmr.** project! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. This guide will walk you through the process of contributing to Palmr.
|
||||
@@ -8,11 +8,11 @@ To create a share in Palmr, the process is very intuitive and self-explanatory.
|
||||
|
||||
On the home page, there is a **"Recent Shares"** section. When no shares have been created yet, this section will appear as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
Since no shares exist yet, you will see a **"Create Share"** button prominently displayed.
|
||||
|
||||

|
||||

|
||||
|
||||
> **Note:** You don’t need to upload files to create a share! Yes, it’s entirely possible to create a share without adding any files. While this might not make sense in every scenario, some users and use cases find this feature highly valuable.
|
||||
|
||||
@@ -20,7 +20,7 @@ As mentioned above, shares in Palmr are created first with their settings, and t
|
||||
|
||||
To create a share, simply click the **"Create Share"** button in the center of the **Recent Shares** section. Doing so will open the following **Create Share** modal:
|
||||
|
||||

|
||||

|
||||
|
||||
Fill in the required information in the modal. The fields **Expiration Date**, **Max Views**, and **Password** are optional but significantly impact how the share functions for recipients:
|
||||
- **Password:** If set, the recipient must enter the correct password to access the share.
|
||||
@@ -40,27 +40,27 @@ Once a share is created, the **Recent Shares** section updates to display a tabl
|
||||
- **Recipients**
|
||||
- **Actions**
|
||||
|
||||

|
||||

|
||||
|
||||
To create additional shares, a **"New Share"** button appears in the upper right corner of the **Recent Shares** section.
|
||||
|
||||

|
||||

|
||||
|
||||
Clicking this button will reopen the **Create Share** modal.
|
||||
|
||||
The **Recent Shares** section displays only the **last 5 shares**. To view all created shares, click the **"View All"** button.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
Clicking this redirects you to the **Shares Management** page.
|
||||
|
||||

|
||||

|
||||
|
||||
Another way to access the **Shares Management** page is by clicking the **"My Shares"** card on the home page.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -70,19 +70,19 @@ The **Shares Management** page is similar to the **Uploads Management** page, bu
|
||||
|
||||
##### Each share has an **Actions** column with the following options:
|
||||
|
||||

|
||||

|
||||
|
||||
## Edit Share
|
||||
|
||||
Clicking the **Edit** button allows you to modify the share details.
|
||||
|
||||

|
||||

|
||||
|
||||
## Manage Files
|
||||
|
||||
Clicking the **Manage Files** button lets you add or remove files from the share.
|
||||
|
||||

|
||||

|
||||
|
||||
## Manage Recipients
|
||||
|
||||
@@ -90,36 +90,36 @@ Clicking the **Manage Recipients** button lets you add or remove recipients for
|
||||
|
||||
> **Note:** Email notifications will only be sent if SMTP settings are properly configured in the system.
|
||||
|
||||

|
||||

|
||||
|
||||
## View Share Details
|
||||
|
||||
Clicking **View Details** lets you see all details of a share.
|
||||
|
||||

|
||||

|
||||
|
||||
## Generate Share Link
|
||||
|
||||
Clicking the **Generate Link** button creates a shareable link, which can be customized.
|
||||
|
||||

|
||||

|
||||
|
||||
Once generated, you can view and copy the link.
|
||||
|
||||

|
||||

|
||||
|
||||
The generated link can be edited or copied from a dropdown menu.
|
||||
|
||||

|
||||

|
||||
|
||||
When the generated link is accessed, the recipient can **view and download** the shared files.
|
||||
|
||||

|
||||

|
||||
|
||||
## Delete Share
|
||||
|
||||
Clicking the **Delete** button allows you to permanently remove a share.
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -24,7 +24,7 @@ Alternatively, you can search for "Palmr" in the GitHub search bar and click on
|
||||
|
||||
On the Palmr repository page, you'll see a "Sponsor" button at the top right corner of the page. Click this button to proceed.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -35,7 +35,7 @@ GitHub Sponsors allows you to sponsor the project with a **custom amount startin
|
||||
2. Type in the amount you'd like to sponsor (e.g., $1, $5, $10, or any amount you choose).
|
||||
3. Select the billing frequency (monthly or one-time).
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
---
|
||||
@@ -24,7 +24,7 @@ Alternatively, you can search for "Palmr" in the GitHub search bar and click on
|
||||
|
||||
On the Palmr. repository page, you'll see a "Star" button at the top right corner of the page. Click this button to star the repository.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -32,7 +32,7 @@ On the Palmr. repository page, you'll see a "Star" button at the top right corne
|
||||
|
||||
After clicking the "Star" button, the button will change to "Unstar," indicating that the repository has been successfully starred. You can always unstar the repository by clicking the "Unstar" button.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
---
|
||||
42
apps/docs/content/docs/1.1.7-beta/index.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Welcome to Palmr.
|
||||
---
|
||||
|
||||

|
||||
|
||||
## 🌴 What is **Palmr.** ?
|
||||
___
|
||||
**Palmr.** is a powerful and **flexible open-source alternative** to popular file transfer services like **WeTransfer**, **SendGB**, **Send Anywhere** and **Files.fm**. The key advantage of Palmr. is that you can **host it on your own infrastructure**, such as a **dedicated server** or **VPS**, giving you full control over your files and data security — without relying on third-party services or worrying about artificial limits or high fees.
|
||||
|
||||
## **Why Choose Palmr.?**
|
||||
___
|
||||
### **1. No Artificial Limits**
|
||||
Unlike traditional services, Palmr. does not impose file size or quantity limits. The only limit is the **available storage** on your server or VPS. If you have the storage capacity, you can send files without restrictions, no premium plans, no ads, and no hidden fees.
|
||||
|
||||
### **2. Open Source and Free**
|
||||
|
||||
Palmr. is completely **open source** and free to use. You can:
|
||||
- Deploy it on any infrastructure (VPS, dedicated server, Docker, etc.).
|
||||
- Review and audit the code to ensure security and integrity.
|
||||
- Contribute improvements or custom features.
|
||||
- Adapt it for different use cases as needed.
|
||||
|
||||
### **3. Security and Privacy Under Your Control**
|
||||
By hosting Palmr. on your own infrastructure, you retain **full control over your data**. Your files are not stored or processed by third parties, ensuring **privacy** and **confidentiality** of transferred information.
|
||||
|
||||
### **4. Highly Customizable**
|
||||
Palmr. is fully customizable, allowing you to align it with your brand identity and user experience:
|
||||
- Add your own **logo**.
|
||||
- Set a **custom app name**.
|
||||
- Configure an **SMTP server** for email notifications.
|
||||
- Customize some text to create a unique experience for users.
|
||||
|
||||
### **5. Complete User and Admin Management**
|
||||
Palmr. offers a robust user and admin management system:
|
||||
- Create and manage multiple **administrators** .
|
||||
- Add unlimited **users**.
|
||||
- Control who can view, upload, and manage files.
|
||||
- Easily monitor usage.
|
||||
|
||||
### **6. Fast, Lightweight, and Scalable**
|
||||
Palmr. is designed to be lightweight and scalable, ensuring high performance even with large files or high user traffic. Its efficient architecture allows you to scale easily as your needs grow.
|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Installation
|
||||
description: Guide to install and run Palmr using Docker Compose
|
||||
title: Installation (Docker Compose)
|
||||
---
|
||||
|
||||
import { Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
### Quick Start with Default Docker Compose
|
||||
|
||||
@@ -29,12 +28,13 @@ To execute the project using this approach, you need to have **Docker** and **Do
|
||||
|
||||
### Ways to Execute the Startup Script
|
||||
|
||||
First of all, clone the official repository: `https://github.com/kyantech/Palmr.git`
|
||||
First of all, download the relase v1.1.7-beta:
|
||||
[Release version - 1.1.7-beta](https://github.com/kyantech/Palmr/releases/tag/v1.1.7-beta)
|
||||
|
||||
There are two ways to execute the script:
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="1. Using a Makefile">
|
||||
<Tabs items={['Using a Makefile', 'Running the Script Directly']}>
|
||||
<Tab >
|
||||
To use this method, you need to have the `make` command installed on your machine.
|
||||
|
||||
To generate the new `docker-compose.yml` file using a Makefile, run the following command from the project root:
|
||||
@@ -49,8 +49,8 @@ There are two ways to execute the script:
|
||||
- It is configured to run locally via `localhost` and is **not intended for production** or VPS environments.
|
||||
|
||||
After the file is generated, you can modify or adapt it for deployment in other environments.
|
||||
</TabItem>
|
||||
<TabItem label="2. Running the Script Directly">
|
||||
</Tab>
|
||||
<Tab >
|
||||
To generate the `docker-compose.yml` file by running the script directly, use the following commands:
|
||||
|
||||
```bash
|
||||
@@ -59,7 +59,7 @@ There are two ways to execute the script:
|
||||
```
|
||||
|
||||
This will have the same effect as running `make gen-compose`.
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -9,7 +9,7 @@ Once you have started all the services as described in the deployment instructio
|
||||
|
||||
Upon accessing the frontend, you will see a screen similar to the image below:
|
||||
|
||||

|
||||

|
||||
|
||||
This is the **Palmr. landing page**, which provides basic information about the application. This landing page can be hidden later when you configure your app, allowing the login page to become the default home page. However, on the first execution, it is displayed by default.
|
||||
|
||||
@@ -25,7 +25,7 @@ To simplify the process, Palmr. comes pre-configured with **seed data** upon the
|
||||
|
||||
After clicking the **Login** button, you will be redirected to the login screen, which looks like this:
|
||||
|
||||

|
||||

|
||||
|
||||
Use the following default credentials to log in for the first time:
|
||||
|
||||
@@ -35,7 +35,7 @@ Use the following default credentials to log in for the first time:
|
||||
|
||||
If everything is set up correctly, you will be authenticated and redirected to Palmr.'s main dashboard, which looks like this:
|
||||
|
||||

|
||||

|
||||
|
||||
At this point, you are officially logged in and ready to start using all the features of Palmr.!
|
||||
|
||||
@@ -51,11 +51,11 @@ Follow these steps to update the admin credentials and secure your Palmr. instan
|
||||
1. Click the **user icon** located in the top right corner of the screen.
|
||||
2. A dropdown menu will appear with several options:
|
||||
|
||||

|
||||

|
||||
|
||||
3. Select **"Profile"** from the dropdown menu. This will redirect you to the profile settings page:
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -78,7 +78,7 @@ You can also update the profile picture for better personalization.
|
||||
1. Click the **camera icon** next to the avatar.
|
||||
2. Select an image from your local device.
|
||||
|
||||

|
||||

|
||||
|
||||
> **Recommendation:** Use a square image to ensure proper display.
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
title: Manage users
|
||||
---
|
||||
|
||||
##### Manage users to **Palmr** is a straightforward process. Below is a detailed step-by-step guide explaining how to create and manage users within the application.
|
||||
Manage users to **Palmr** is a straightforward process. Below is a detailed step-by-step guide explaining how to create and manage users within the application.
|
||||
|
||||
---
|
||||
|
||||
### Step 1: Accessing User Management
|
||||
|
||||
@@ -13,7 +12,7 @@ To begin, you need to navigate to the **User Management** section:
|
||||
1. Click on the **user icon** located in the header of the app.
|
||||
2. A dropdown menu will appear. From the options available, select **"User Management"**
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -25,7 +24,7 @@ After selecting **User Management**, you will be redirected to the **User Manage
|
||||
- If you need to update the Admin user details, you must follow the steps outlined in the **Profile Management** section.
|
||||
- User details for the logged-in Admin cannot be modified from the **User Management Dashboard**.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -33,18 +32,18 @@ After selecting **User Management**, you will be redirected to the **User Manage
|
||||
|
||||
1. To add a new user, click on the **"Add User"** button located at the top right corner of the screen.
|
||||
|
||||

|
||||

|
||||
|
||||
2. A modal form will appear, allowing you to enter the new user's details:
|
||||
|
||||

|
||||

|
||||
|
||||
3. After filling in the user details, click on **"Create"** to confirm.
|
||||
Alternatively, you can click **"Cancel"** to abort the user creation process.
|
||||
|
||||
4. Once the user is created successfully, it will appear in the user list.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -52,7 +51,7 @@ After selecting **User Management**, you will be redirected to the **User Manage
|
||||
|
||||
In the **User List**, under the **"Actions"** column, you will find a dropdown menu for each user.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
Available actions include:
|
||||
@@ -61,7 +60,7 @@ Available actions include:
|
||||
- Change user details including role.
|
||||
- Change the user password.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Deactivate User** – Marks the user as inactive, preventing them from logging into the system.
|
||||
- **Activate User** – Reactivates a deactivated user, allowing them to log in again.
|
||||
27
apps/docs/content/docs/1.1.7-beta/meta.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"title": "v1.1.7-beta",
|
||||
"description": "(Deprecated)",
|
||||
"root": true,
|
||||
"icon": "Building2",
|
||||
"pages": [
|
||||
"---Introduction---",
|
||||
"index",
|
||||
"architecture",
|
||||
"github-architecture",
|
||||
"installation",
|
||||
"manual-installation",
|
||||
"---How to use Palmr.---",
|
||||
"login",
|
||||
"manage-users",
|
||||
"upload",
|
||||
"generate-share",
|
||||
"configuring-smtp",
|
||||
"available-languages",
|
||||
"---Developers---",
|
||||
"contribute",
|
||||
"open-an-issue",
|
||||
"---Sponsor this project---",
|
||||
"gh-star",
|
||||
"gh-sponsor"
|
||||
]
|
||||
}
|
||||
@@ -24,7 +24,7 @@ Alternatively, you can search for "Palmr" in the GitHub search bar and click on
|
||||
|
||||
On the Palmr repository page, click on the **Issues** tab near the top of the page. This will take you to the issues section of the repository.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
---
|
||||
@@ -33,7 +33,7 @@ On the Palmr repository page, click on the **Issues** tab near the top of the pa
|
||||
|
||||
Once you're in the issues section, click the **New Issue** button to start creating a new issue.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
---
|
||||
@@ -47,7 +47,7 @@ You’ll now see a form where you can provide details about your issue. Here’s
|
||||
3. **Labels (Optional)**: Add labels to categorize your issue (e.g., `bug`, `enhancement`, `question`). This helps the maintainers organize and prioritize issues.
|
||||
4. **Attachments (Optional)**: You can attach screenshots, logs, or other files to help explain the issue.
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -17,36 +17,36 @@ Now let's focus on the file upload process. As mentioned, it is very simple, and
|
||||
On the home page, there is a **"Recent Uploads"** section. On the first initialization (when no file has been uploaded yet),
|
||||
it will appear like this:
|
||||
|
||||

|
||||

|
||||
|
||||
To upload a file, simply click on the **"Upload File"** button. This will open a modal where you can select the file you want
|
||||
to upload from your device. Some file types, such as images, audio, and video, will have a preview available.
|
||||
|
||||

|
||||

|
||||
|
||||
### Example with an image:
|
||||

|
||||

|
||||
|
||||
After selecting the file, you can either confirm the upload by clicking the **"Upload"** button or cancel the operation by clicking the **"Cancel"** button.
|
||||
|
||||

|
||||

|
||||
|
||||
Once one or more files have been uploaded, the **"Recent Uploads"** section will update and look like this:
|
||||
|
||||

|
||||

|
||||
|
||||
To upload a new file from this screen, click the **"Upload File"** button in the upper right corner of the section, and follow the same steps as before.
|
||||
|
||||

|
||||

|
||||
|
||||
This list on the home page shows only the **last 5 uploads**. To view older files or upload more, you need to go to the **"My Files"** page.
|
||||
You can access this by clicking on the **"View All"** button in the upper right corner of the section or by clicking on the **"My Files"** card on the home page.
|
||||
|
||||

|
||||

|
||||
|
||||
Or:
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -54,7 +54,7 @@ Or:
|
||||
|
||||
On the **"My Files"** page, the layout will look like this:
|
||||
|
||||

|
||||

|
||||
|
||||
Here, you have the option to **filter** your uploaded files or upload new ones by clicking the **"Upload File"** button and following the same steps explained earlier.
|
||||
|
||||
@@ -72,13 +72,13 @@ The table fields include:
|
||||
### Actions Column
|
||||
In the **"Actions"** column, you will find an icon that opens the following dropdown:
|
||||
|
||||

|
||||

|
||||
|
||||
Each option is self-explanatory, but let’s detail the **Edit** option:
|
||||
|
||||
- **Edit** – Opens a modal where you can edit the file name, description, and other details.
|
||||
|
||||

|
||||

|
||||
|
||||
- You can also **delete** a file directly from the dropdown by selecting the **Delete** option.
|
||||
|
||||
99
apps/docs/content/docs/2.0.0-beta/fuck.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: FODASE
|
||||
description: How to interact with the dokploy API for administrators and users
|
||||
---
|
||||
|
||||
In some cases, you may need to interact directly with the dokploy API. Here's how both administrators and users can do this.
|
||||
|
||||
## For Administrators
|
||||
|
||||
1. Access the Swagger UI by navigating to `your-vps-ip:3000/swagger`.
|
||||
2. Use the Swagger interface to interact with the API.
|
||||
3. By default, access to the Swagger UI is restricted, and only authenticated administrators can access the API.
|
||||
|
||||
## For Users
|
||||
|
||||
1. By default, users do not have direct access to the API.
|
||||
2. Administrators can grant users access to:
|
||||
- Generate access tokens
|
||||
- Access the Swagger UI
|
||||
3. If you need access, contact your administrator.
|
||||
|
||||
Note: The API provides advanced functionalities. Make sure you understand the operations you're performing to avoid unintended changes to the system.
|
||||
|
||||
## Usage
|
||||
|
||||
By default the OpenApi base url is `http://localhost:3000/api`, you need to replace with the ip of your dokploy instance or the domain name.
|
||||
|
||||
### Authentication
|
||||
|
||||
The API uses JWT tokens for authentication. You can generate a token by going to the `/settings/profile` page and go to API/CLI Section and generate the token.
|
||||
|
||||
Let's take a example of authenticated request:
|
||||
```bash
|
||||
curl -X 'GET' \
|
||||
'https://dokploy.com/api/project.all' \
|
||||
-H 'accept: application/json'
|
||||
-H 'x-api-key: YOUR-GENERATED-API-KEY'
|
||||
```
|
||||
then you will get the something like this:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w",
|
||||
"name": "Random",
|
||||
"description": "",
|
||||
"createdAt": "2024-06-19T15:05:58.785Z",
|
||||
"adminId": "_WrKZbs7iJAA3p4N2Yfyu",
|
||||
"applications": [],
|
||||
"mariadb": [],
|
||||
"mongo": [],
|
||||
"mysql": [
|
||||
{
|
||||
"mysqlId": "N3cudwO46TiDXzBm4SaQ1",
|
||||
"name": "mysql",
|
||||
"appName": "random-mysql-924715",
|
||||
"description": "",
|
||||
"databaseName": "mysql",
|
||||
"databaseUser": "mysql",
|
||||
"databasePassword": "h13BzO6y3KYSHaQg",
|
||||
"databaseRootPassword": "mM1b7JeoPA7jArxj",
|
||||
"dockerImage": "mysql:8",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": null,
|
||||
"applicationStatus": "done",
|
||||
"createdAt": "2024-06-24T01:55:40.378Z",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"postgres": [],
|
||||
"redis": [
|
||||
{
|
||||
"redisId": "TtFK5S4QFaIjaNGOb8Ku-",
|
||||
"name": "redis",
|
||||
"appName": "random-redis-7eec62",
|
||||
"description": "",
|
||||
"databasePassword": "Yvb8gqClfomjcue8",
|
||||
"dockerImage": "redis:7",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": 6379,
|
||||
"createdAt": "2024-06-26T06:43:20.570Z",
|
||||
"applicationStatus": "done",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"compose": []
|
||||
},
|
||||
]
|
||||
```
|
||||
99
apps/docs/content/docs/2.0.0-beta/index.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Architecture of Palmito
|
||||
description: How to interact with the dokploy API for administrators and users
|
||||
---
|
||||
|
||||
In some cases, you may need to interact directly with the dokploy API. Here's how both administrators and users can do this.
|
||||
|
||||
## For Administrators
|
||||
|
||||
1. Access the Swagger UI by navigating to `your-vps-ip:3000/swagger`.
|
||||
2. Use the Swagger interface to interact with the API.
|
||||
3. By default, access to the Swagger UI is restricted, and only authenticated administrators can access the API.
|
||||
|
||||
## For Users
|
||||
|
||||
1. By default, users do not have direct access to the API.
|
||||
2. Administrators can grant users access to:
|
||||
- Generate access tokens
|
||||
- Access the Swagger UI
|
||||
3. If you need access, contact your administrator.
|
||||
|
||||
Note: The API provides advanced functionalities. Make sure you understand the operations you're performing to avoid unintended changes to the system.
|
||||
|
||||
## Usage
|
||||
|
||||
By default the OpenApi base url is `http://localhost:3000/api`, you need to replace with the ip of your dokploy instance or the domain name.
|
||||
|
||||
### Authentication
|
||||
|
||||
The API uses JWT tokens for authentication. You can generate a token by going to the `/settings/profile` page and go to API/CLI Section and generate the token.
|
||||
|
||||
Let's take a example of authenticated request:
|
||||
```bash
|
||||
curl -X 'GET' \
|
||||
'https://dokploy.com/api/project.all' \
|
||||
-H 'accept: application/json'
|
||||
-H 'x-api-key: YOUR-GENERATED-API-KEY'
|
||||
```
|
||||
then you will get the something like this:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w",
|
||||
"name": "Random",
|
||||
"description": "",
|
||||
"createdAt": "2024-06-19T15:05:58.785Z",
|
||||
"adminId": "_WrKZbs7iJAA3p4N2Yfyu",
|
||||
"applications": [],
|
||||
"mariadb": [],
|
||||
"mongo": [],
|
||||
"mysql": [
|
||||
{
|
||||
"mysqlId": "N3cudwO46TiDXzBm4SaQ1",
|
||||
"name": "mysql",
|
||||
"appName": "random-mysql-924715",
|
||||
"description": "",
|
||||
"databaseName": "mysql",
|
||||
"databaseUser": "mysql",
|
||||
"databasePassword": "h13BzO6y3KYSHaQg",
|
||||
"databaseRootPassword": "mM1b7JeoPA7jArxj",
|
||||
"dockerImage": "mysql:8",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": null,
|
||||
"applicationStatus": "done",
|
||||
"createdAt": "2024-06-24T01:55:40.378Z",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"postgres": [],
|
||||
"redis": [
|
||||
{
|
||||
"redisId": "TtFK5S4QFaIjaNGOb8Ku-",
|
||||
"name": "redis",
|
||||
"appName": "random-redis-7eec62",
|
||||
"description": "",
|
||||
"databasePassword": "Yvb8gqClfomjcue8",
|
||||
"dockerImage": "redis:7",
|
||||
"command": null,
|
||||
"env": null,
|
||||
"memoryReservation": null,
|
||||
"memoryLimit": null,
|
||||
"cpuReservation": null,
|
||||
"cpuLimit": null,
|
||||
"externalPort": 6379,
|
||||
"createdAt": "2024-06-26T06:43:20.570Z",
|
||||
"applicationStatus": "done",
|
||||
"projectId": "klZKsyw5g-QT_jrWJ5T-w"
|
||||
}
|
||||
],
|
||||
"compose": []
|
||||
},
|
||||
]
|
||||
```
|
||||
7
apps/docs/content/docs/2.0.0-beta/meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"title": "v2.0.0-beta",
|
||||
"description": "v2.0.0-beta Documentation",
|
||||
"root": true,
|
||||
"icon": "Building2",
|
||||
"pages": ["---Introduction---", "index", "---How to use Palmr.---", "...", "---Reference---"]
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Introduction
|
||||
---
|
||||
|
||||

|
||||
<!--  -->
|
||||
|
||||
## 🌴 What is **Palmr.** ?
|
||||
___
|
||||
3
apps/docs/content/docs/meta.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"pages": ["2.0.0-beta", "1.1.7-beta"]
|
||||
}
|
||||
10
apps/docs/next.config.mjs
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createMDX } from 'fumadocs-mdx/next';
|
||||
|
||||
const withMDX = createMDX();
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
||||
export default withMDX(config);
|
||||
@@ -1,17 +1,32 @@
|
||||
{
|
||||
"name": "palmr-docs",
|
||||
"type": "module",
|
||||
"version": "1.1.6",
|
||||
"name": "docs-v2",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro preview",
|
||||
"build": "astro build && cp -r public dist/",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
"build": "next build",
|
||||
"dev": "next dev --turbo",
|
||||
"start": "next start",
|
||||
"postinstall": "fumadocs-mdx"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.32.2",
|
||||
"astro": "^5.1.5",
|
||||
"sharp": "^0.32.5"
|
||||
"fumadocs-core": "15.2.7",
|
||||
"fumadocs-mdx": "11.6.0",
|
||||
"fumadocs-ui": "15.2.7",
|
||||
"lucide-react": "^0.488.0",
|
||||
"next": "15.3.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.3",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.14.0",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "15.3.0",
|
||||
"postcss": "^8.5.3",
|
||||
"tailwindcss": "^4.1.3",
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
6472
apps/docs/pnpm-lock.yaml
generated
5
apps/docs/postcss.config.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
plugins: {
|
||||
'@tailwindcss/postcss': {},
|
||||
},
|
||||
};
|
||||
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 182 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 526 KiB After Width: | Height: | Size: 526 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 386 KiB After Width: | Height: | Size: 386 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
BIN
apps/docs/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 758 KiB |
12
apps/docs/source.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineDocs, defineConfig } from 'fumadocs-mdx/config';
|
||||
|
||||
// Options: https://fumadocs.vercel.app/docs/mdx/collections#define-docs
|
||||
export const docs = defineDocs({
|
||||
dir: 'content/docs',
|
||||
});
|
||||
|
||||
export default defineConfig({
|
||||
mdxOptions: {
|
||||
// MDX options
|
||||
},
|
||||
});
|
||||
7
apps/docs/src/app/(home)/layout.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { HomeLayout } from 'fumadocs-ui/layouts/home';
|
||||
import { baseOptions } from '@/app/layout.config';
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
|
||||
}
|
||||
19
apps/docs/src/app/(home)/page.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<main className="flex flex-1 flex-col justify-center text-center">
|
||||
<h1 className="mb-4 text-2xl font-bold">Hello World</h1>
|
||||
<p className="text-fd-muted-foreground">
|
||||
You can open{' '}
|
||||
<Link
|
||||
href="/docs"
|
||||
className="text-fd-foreground font-semibold underline"
|
||||
>
|
||||
/docs
|
||||
</Link>{' '}
|
||||
and see the documentation.
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
4
apps/docs/src/app/api/search/route.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { source } from '@/lib/source';
|
||||
import { createFromSource } from 'fumadocs-core/search/server';
|
||||
|
||||
export const { GET } = createFromSource(source);
|
||||
53
apps/docs/src/app/docs/[[...slug]]/page.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import { source } from '@/lib/source';
|
||||
import {
|
||||
DocsPage,
|
||||
DocsBody,
|
||||
DocsDescription,
|
||||
DocsTitle,
|
||||
} from 'fumadocs-ui/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { createRelativeLink } from 'fumadocs-ui/mdx';
|
||||
import { getMDXComponents } from '@/mdx-components';
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
|
||||
const MDXContent = page.data.body;
|
||||
|
||||
return (
|
||||
<DocsPage toc={page.data.toc} full={page.data.full}>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<div className='border w-full'></div>
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
<DocsBody>
|
||||
<MDXContent
|
||||
components={getMDXComponents({
|
||||
// this allows you to link to other pages with relative file paths
|
||||
a: createRelativeLink(source, page),
|
||||
})}
|
||||
/>
|
||||
</DocsBody>
|
||||
</DocsPage>
|
||||
);
|
||||
}
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return source.generateParams();
|
||||
}
|
||||
|
||||
export async function generateMetadata(props: {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const page = source.getPage(params.slug);
|
||||
if (!page) notFound();
|
||||
|
||||
return {
|
||||
title: page.data.title + ' | 🌴 Palmr. Docs',
|
||||
description: page.data.description,
|
||||
};
|
||||
}
|
||||
12
apps/docs/src/app/docs/layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
||||
import type { ReactNode } from 'react';
|
||||
import { baseOptions } from '@/app/layout.config';
|
||||
import { source } from '@/lib/source';
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<DocsLayout tree={source.pageTree} {...baseOptions} githubUrl='https://github.com/kyantech/Palmr' links={[]}>
|
||||
{children}
|
||||
</DocsLayout>
|
||||
);
|
||||
}
|
||||
6
apps/docs/src/app/global.css
Normal file
@@ -0,0 +1,6 @@
|
||||
@import 'tailwindcss';
|
||||
@import 'fumadocs-ui/css/neutral.css';
|
||||
@import 'fumadocs-ui/css/preset.css';
|
||||
/* @import 'fumadocs-ui/css/black.css'; */
|
||||
|
||||
@source '../../node_modules/fumadocs-ui/dist/**/*.js';
|
||||
25
apps/docs/src/app/layout.config.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
|
||||
import { Github } from "lucide-react";
|
||||
|
||||
export const baseOptions: BaseLayoutProps = {
|
||||
nav: {
|
||||
title: "🌴 Palmr.",
|
||||
},
|
||||
links: [
|
||||
{
|
||||
text: "Docs",
|
||||
url: "/docs/2.0.0-beta",
|
||||
active: "nested-url",
|
||||
},
|
||||
{
|
||||
text: "Github",
|
||||
url: "https://github.com/kyantech/Palmr",
|
||||
active: "nested-url",
|
||||
icon: (
|
||||
<>
|
||||
<Github fill="currentColor" />
|
||||
</>
|
||||
),
|
||||
}
|
||||
],
|
||||
};
|
||||