update developer guide.

This commit is contained in:
Miroslav Šedivý 2025-03-31 23:09:26 +02:00
parent bfb917bbea
commit b6742c92ce
10 changed files with 78 additions and 121 deletions

View file

@ -1,14 +1,10 @@
---
sidebar_position: 2
---
# Developer Guide
# Building from Source
:::info
This guide is Work in Progress. It is not complete and will be updated over time.
:::
This guide walks you through the process of setting up Neko on your local machine or server.
## Prerequisites {#prerequisites}
Before proceeding, ensure that you have the following installed on your system:
## Dependencies
- [node.js](https://nodejs.org/) and [npm](https://www.npmjs.com/) (for building the frontend).
- [go](https://golang.org/) (for building the server).
@ -32,38 +28,9 @@ Before proceeding, ensure that you have the following installed on your system:
sudo apt-get install xdotool xclip libgtk-3-0 libgtk-3-dev libopus0 libvpx6;
```
## Step 1: Clone the Repository {#step-1}
## Next Steps
Start by cloning the Neko Git repository to your machine:
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
```bash
git clone https://github.com/m1k1o/neko.git
cd neko
```
## Step 2: Build the Frontend {#step-2}
Navigate to the `client` directory and install the dependencies:
```shell
cd client;
npm install;
npm run build;
```
## Step 3: Build the Server {#step-3}
Navigate to the `server` directory and build the server:
```shell
cd server;
go build;
```
## Step 4: Run the Server {#step-4}
Finally, run the server:
```shell
./server/server;
```
<DocCardList items={useCurrentSidebarCategory().items}/>

View file

@ -1,7 +0,0 @@
---
sidebar_position: 4
---
# API Reference
Documentation of available APIs for integrating with Neko (WebSocket, REST, etc.).

View file

@ -0,0 +1,46 @@
---
description: Building Neko from source
---
# Building From Source
This guide walks you through the process of setting up Neko on your local machine or server.
Start by cloning the Neko Git repository to your machine:
```bash
git clone https://github.com/m1k1o/neko.git
cd neko
```
## Building the Frontend {#frontend}
Prerequisites for building the frontend:
- [node.js](https://nodejs.org/) and [npm](https://www.npmjs.com/)
Navigate to the `client` directory and install the dependencies:
```bash
cd client;
npm install;
npm run build;
```
The `npm run build` command will create a production build of the frontend in the `client/build` directory.
## Building the Server {#server}
Prerequisites for building the server:
- [go](https://golang.org/) (version 1.18 or higher)
- Dependencies for building the server:
```bash
sudo apt-get install -y --no-install-recommends libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev libxcvt-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```
Navigate to the `server` directory and build the server:
```bash
cd server;
./build;
```
This will create a binary file named `neko` in the `bin` directory along with `plugins` that were built with the server.

View file

@ -1,7 +0,0 @@
---
sidebar_position: 1
---
# Code Structure
Explanation of the projects architecture and key components.

View file

@ -1,7 +0,0 @@
---
sidebar_position: 6
---
# Contributing Guide
How to contribute to the project, submit patches, and report issues.

View file

@ -1,7 +0,0 @@
---
sidebar_position: 3
---
# Running in Development Mode
Setting up a development environment for contributing.

View file

@ -1,7 +0,0 @@
---
sidebar_position: 7
---
# Style Guide
Code formatting, linting, and other development conventions.

View file

@ -1,7 +0,0 @@
---
sidebar_position: 5
---
# Testing & Debugging
Debugging tools, test cases, and best practices for troubleshooting.

View file

@ -64,13 +64,24 @@ const sidebars: SidebarsConfig = {
'customization/ui',
]
},
'migration-from-v2/README',
'reverse-proxy-setup',
{
type: 'link',
label: 'API Reference',
href: '/docs/v3/api',
}
type: 'category',
label: 'Developer Guide',
collapsed: true,
link: { type: "doc", id: "developer-guide/README" },
items: [
'developer-guide/repository-structure',
'developer-guide/build',
{
type: 'link',
label: 'API Reference',
description: 'OpenAPI documentation for the Neko API',
href: '/docs/v3/api',
},
]
},
'migration-from-v2/README',
'reverse-proxy-setup'
]
},
//{
@ -78,11 +89,6 @@ const sidebars: SidebarsConfig = {
// label: 'Hardware Acceleration',
// items: [{ type: "autogenerated", dirName: "hardware-acceleration" }]
//},
//{
// type: 'category',
// label: 'Developer Guide',
// items: [{ type: "autogenerated", dirName: "developer-guide" }]
//},
{
type: 'category',
label: 'Help & Support',

View file

@ -2,9 +2,9 @@
Neko is an open-source project, and we welcome contributions from the community. Whether you're a developer, designer, or user, you can help improve Neko by reporting bugs, suggesting new features, or submitting code changes.
## Reporting issues
## Reporting Issues {#issues}
If you encounter a bug or have a feature request, please open a new issue on the [GitHub repository](https://github.com/m1k1o/neko/issues). Before opening an issue, please check if a similar issue has already been reported.
If you encounter a bug or have a feature request, please open a new issue on the [GitHub repository](https://github.com/m1k1o/neko/issues). Before opening an issue, please check if a similar issue has already been reported and ensure you read the [Troubleshooting Guide](/docs/v3/troubleshooting) and the [FAQ](/docs/v3/faq) to see if your issue has already been addressed.
When reporting an issue, please provide as much information as possible, including:
@ -15,34 +15,14 @@ When reporting an issue, please provide as much information as possible, includi
- Screenshots or error messages (if applicable)
- Your operating system and browser version
## Contributing code
## Contributing Code {#pull-requests}
If you're a developer and want to contribute code to Neko, follow these steps:
1. **Fork the [project](https://github.com/m1k1o/neko)**: Create a personal copy of the repository by [forking it](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) to your GitHub account.
2. **Navigate to [.docker/README.md](https://github.com/m1k1o/neko/tree/master/.docker)**: Follow the instructions in the `.docker/README.md` file for setting up the Docker environment required for development.
2. **Edit files in your branch**: Make your changes in a new branch created from the `master` branch. Ensure your changes are well-documented and tested.
3. **Edit files in your branch**: Make your changes in a new branch created from the `master` branch. Ensure your changes are as well documented and tested.
3. **Submit a [pull request](https://github.com/m1k1o/neko/pulls)**: Once your changes are ready, submit a pull request with a detailed explanation of the improvements and any relevant information for the reviewers.
4. **Submit a [pull request](https://github.com/m1k1o/neko/pulls)**: Once your changes are ready, submit a pull request with a detailed explanation of the improvements and any relevant information for the reviewers.
## Server build dependencies
To compile the Golang code locally, you need to install the following dependencies:
```shell
apt-get install -y --no-install-recommends libx11-dev libxrandr-dev libxtst-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```
### Retrieving Libclipboard files
Libclipboard files can be retrieved from the `neko_dev_server` Docker container. Run the following commands to copy the necessary files:
```shell
mkdir -p /usr/local/lib/pkgconfig/ /usr/local/include/
docker cp neko_dev_server:/usr/local/lib/libclipboard.a /usr/local/lib/
docker cp neko_dev_server:/usr/local/lib/pkgconfig/libclipboard.pc /usr/local/lib/pkgconfig/
docker cp neko_dev_server:/usr/local/include/libclipboard-config.h /usr/local/include/
docker cp neko_dev_server:/usr/local/include/libclipboard.h /usr/local/include/
```
Make sure you read the [Developer Guide](/docs/v3/developer-guide/) for more information on the code structure and development process.