docs: improve documentation

This commit is contained in:
Daniel Luiz Alves
2025-03-22 00:39:56 -03:00
parent 93b6f2e3f5
commit 7f40946d61
22 changed files with 501 additions and 23 deletions

View File

@@ -27,28 +27,28 @@ export default defineConfig({
{
label: 'How to use Palmr.',
items: [
{ label: 'First login (Admin)', link: '/main/login' },
// { label: 'Adding users', link: '/' },
// { label: 'Password reset', link: '/' },
// { label: 'Uploading a file', link: '/' },
// { label: 'Editing an upload', link: '/' },
// { label: 'Creating a share', link: '/' },
// { label: 'Generate a share link', link: '/' },
{ label: 'First login (Admin)', link: '/main/login' },
{ label: 'Manage users', link: '/main/manage-users' },
// { label: 'Uploading a file', link: '/' }, // !TODO
// { label: 'Editing an upload', link: '/' }, // !TODO
// { label: 'Creating a share', link: '/' }, // !TODO
// { label: 'Generate a share link', link: '/' }, // !TODO
// { label: 'Password reset', link: '/' }, // !TODO
{ label: 'Available languages', link: '/main/available-languages' },
],
},
{
label: 'Developers',
items: [
{ label: 'How to open an issue', link: '/' },
{ label: 'How to contribute', link: '/' },
{ label: 'How to contribute', link: '/developers/contribute' },
{ label: 'How to open an issue', link: '/developers/open-an-issue' },
],
},
{
label: 'Sponsor this project',
items: [
{ label: 'Github Sponsors', link: '/' },
{ label: 'Star this project on Github', link: '/' },
{ label: 'Star this project on Github', link: '/sponsor/gh-star' },
{ label: 'Github Sponsors', link: '/sponsor/gh-sponsor' },
],
},
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -15,19 +15,19 @@ The API documentation is powered by **Scalar** ([https://scalar.com](https://sca
---
## Accessing the API Documentation
### Accessing the API Documentation
We do **not provide an online version** of the API documentation because it may change depending on the specific version of Palmr. you are using. Therefore, we recommend checking the documentation only after starting your API service. The API service corresponds to the **server** within the official Palmr. GitHub repository.
---
## Scalar-Based Documentation
### Scalar-Based Documentation
We recommend using **Scalar** for querying and testing the API because the system was designed with Scalar in mind. Scalar offers an intuitive and interactive environment for exploring endpoints, sending requests, and viewing responses directly within the interface.
---
## Swagger-Based Documentation
### Swagger-Based Documentation
If you prefer not to use Scalar or are more comfortable with an alternative tool, a **Swagger-based version** of the documentation is also available.
@@ -44,7 +44,7 @@ Both the Scalar and Swagger versions contain the same endpoints and are document
Both options ensure that you have all the necessary tools and information to integrate Palmr. with your systems or third-party services effectively.
## Useful Links
### Useful Links
Here are some useful links related to Palmr.'s API and its components:

View File

@@ -0,0 +1,161 @@
---
title: How to Contribute to the Palmr. Project
---
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.
---
### Step 1: Log in to GitHub
Before you can contribute, you need to be logged into your GitHub account. If you don't have an account yet, you can sign up for free at **[GitHub](https://github.com/)**.
---
### Step 2: Go to the Palmr Repository
Once you're logged in, go to the Palmr repository by clicking on this link: **[https://github.com/kyantech/Palmr](https://github.com/kyantech/Palmr)**.
Alternatively, you can search for "Palmr" in the GitHub search bar and click on the repository owned by **kyantech**.
---
### Step 3: Fork the Repository
To contribute to the project, youll need to create your own copy of the repository. This is called a **fork**. Heres how to do it:
1. Click the **Fork** button at the top right of the repository page.
2. This will create a copy of the repository under your GitHub account.
---
### Step 4: Clone Your Forked Repository
Next, youll need to clone your forked repository to your local machine. Heres how:
1. On your forked repository page, click the **Code** button.
2. Copy the repository URL (HTTPS or SSH).
3. Open your terminal or command prompt and run the following command to clone the repository:
```bash
git clone <repository-url>
```
4. Navigate into the cloned directory:
```bash
cd Palmr
```
---
### Step 5: Set Up the `next` Branch as the Base
Before making changes, ensure your local repository is set up to track the `next` branch from the original Palmr repository. Heres how:
1. Add the original Palmr repository as a remote:
```bash
git remote add upstream https://github.com/kyantech/Palmr.git
```
2. Fetch the latest changes from the `next` branch:
```bash
git fetch upstream next
```
3. Create a new branch for your contribution based on `upstream/next`:
```bash
git checkout -b your-branch-name upstream/next
```
---
### Step 6: Make Your Changes
Now youre ready to make your contributions! This could include:
- Fixing a bug
- Adding a new feature
- Improving documentation
- Writing tests
Make your changes in your local repository using your preferred code editor.
---
### Step 7: Commit Your Changes Using Conventional Commits
Once youve made your changes, commit them to your branch using **Conventional Commits**. Conventional Commits help maintain a clean and consistent commit history. Heres how to format your commit messages:
#### Commit Message Format:
`<type>(<scope>): <description>`
#### Examples:
- `feat: add user authentication`
- `fix(api): resolve null pointer exception`
- `docs: update README file`
- `chore: update dependencies`
#### Steps to Commit:
1. Stage your changes:
```bash
git add .
```
2. Commit your changes with a properly formatted message:
```bash
git commit -m "feat: add new feature for user profiles"
```
---
### Step 8: Push Your Changes to GitHub
After committing your changes, push them to your forked repository on GitHub:
```bash
git push origin your-branch-name
```
---
### Step 9: Open a Pull Request to the `next` Branch
Now that your changes are on GitHub, you can open a **Pull Request (PR)** to propose your changes to the `next` branch of the Palmr repository. Heres how:
1. Go to your forked repository on GitHub.
2. Click the **Pull Request** button.
3. On the PR creation page:
- Set the **base repository** to `kyantech/Palmr`.
- Set the **base branch** to `next`.
- Set the **head repository** to your forked repository.
- Set the **compare branch** to your branch (`your-branch-name`).
4. Fill out the PR form with a clear title and description of your changes.
5. Click **Create Pull Request**.
---
### Step 10: Wait for Review
Once your PR is submitted, the maintainers will review your changes. They may provide feedback or request additional changes. Be sure to respond to their comments and make any necessary updates.
---
### Tips for Contributing
To ensure your contribution is accepted, follow these tips:
- **Use Conventional Commits**: Write clear and consistent commit messages using the Conventional Commits format.
- **Keep Your PRs Small**: Focus on one issue or feature per PR to make it easier to review.
- **Be Patient**: Maintainers are often volunteers and may take some time to review your PR.
---
### Why Contributing is Important
Contributing to open-source projects like Palmr has many benefits:
1. **Improves the Project**: Your contributions help make the project better for everyone.
2. **Builds Your Skills**: Youll gain experience working with Git, GitHub, and collaborative coding.
3. **Supports the Community**: Open-source thrives on community contributions. Your work helps sustain the project.
---
### Conclusion
That's it! You've successfully contributed to the **🌴 Palmr.** project on GitHub. Thank you for your time and effort in making Palmr better for everyone. We appreciate your contribution!

View File

@@ -0,0 +1,83 @@
---
title: How to open an issue
---
Opening an issue on GitHub is a great way to report bugs, request features, or ask questions about a project. This tutorial will guide you through the process of opening an issue for the **Palmr.** project on GitHub.
---
### Step 1: Log in to GitHub
Before you can star a project, you need to be logged into your GitHub account. If you don't have an account yet, you can sign up for free at [GitHub](https://github.com/).
![Palmr Profile Menu](/src/assets/gh-login.png)
---
### Step 2: Go to the Palmr. Repository
Once you're logged in, go to the Palmr. repository by clicking on this link: [https://github.com/kyantech/Palmr](https://github.com/kyantech/Palmr).
Alternatively, you can search for "Palmr" in the GitHub search bar and click on the repository owned by **Kyantech**.
---
### Step 3: Navigate to the Issues Tab
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.
![Palmr Profile Menu](/src/assets/issues-tab.png)
---
### Step 4: Click on "New Issue"
Once you're in the issues section, click the **New Issue** button to start creating a new issue.
![Palmr Profile Menu](/src/assets/new-issue-btn.png)
---
### Step 5: Fill Out the Issue Form
Youll now see a form where you can provide details about your issue. Heres how to fill it out:
1. **Title**: Write a clear and concise title that summarizes the issue.
2. **Description**: Provide a detailed description of the issue. Include steps to reproduce the problem (if its a bug), expected behavior, and actual behavior. If youre requesting a feature, explain why it would be useful.
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.
![Palmr Profile Menu](/src/assets/new-issue-form.png)
---
### Step 6: Submit the Issue
Once youve filled out the form, click the **Create** button. Your issue will now be visible to the project maintainers and other contributors.
---
### Tips for Writing a Good Issue
To ensure your issue is addressed quickly and effectively, follow these tips:
- **Be Clear and Specific**: Provide as much detail as possible.
- **Use a Descriptive Title**: A good title helps maintainers understand the issue at a glance.
- **Include Steps to Reproduce**: If its a bug, explain how to reproduce it.
- **Be Polite and Respectful**: Remember that maintainers and contributors are volunteering their time.
---
### Why Opening Issues is Important
Opening issues is a key part of contributing to open-source projects. Heres why it matters:
1. **Improves the Project**: Your feedback helps identify bugs and suggest new features.
2. **Helps Maintainers**: Clear and detailed issues make it easier for maintainers to address problems.
3. **Encourages Collaboration**: Issues can spark discussions and attract contributors to help solve problems.
---
### Conclusion
That's it! You've successfully opened an issue for the **Palmr** project on GitHub. Your contribution helps improve the project and supports the open-source community. Thank you for taking the time to share your feedback!

View File

@@ -4,10 +4,7 @@ title: Available languages
The project uses i18next for internationalization (i18n) support. The language detection is handled automatically through i18next-browser-languagedetector .
## Available Languages
Looking at the dependencies and implementation:
# Available Languages in Palmr.
### Available Languages in Palmr.
----
##### 1. 🇺🇸 English (en-US)
@@ -25,7 +22,7 @@ Looking at the dependencies and implementation:
</br>
## Language Selection
### Language Selection
##### The language can be changed in two ways:
#### 1. Automatic Detection
@@ -34,16 +31,18 @@ Looking at the dependencies and implementation:
- Uses the browser's language settings as the initial language
#### 2. Manual Selection
![Palmr Profile Menu](/src/assets/language-selector.png)
- Users can manually switch languages through the language selector in the UI
- Language preference is saved in the browser's localStorage
## Default Language
### Default Language
##### English (en-US) is set as the fallback language.
</br>
## Language Detection
### Language Detection
The application automatically detects the user's browser language and sets it as the initial language. Users can manually change the language using the language switcher in the interface (globe icon in the navigation bar).
## RTL Support
### RTL Support
The application includes special handling for right-to-left (RTL) languages, specifically for Arabic (ar-SA).

View File

@@ -0,0 +1,86 @@
---
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.
---
### Step 1: Accessing User Management
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"**
![Palmr Profile Menu](/src/assets/menu.png)
---
### Step 2: User Management Dashboard
After selecting **User Management**, you will be redirected to the **User Management Dashboard**.
- On your first access, the only user listed will be the **default Admin** user.
- 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**.
![Palmr Profile Menu](/src/assets/users-management.png)
---
### Step 3: Adding a New User
1. To add a new user, click on the **"Add User"** button located at the top right corner of the screen.
![Palmr Profile Menu](/src/assets/add-users-btn.png)
2. A modal form will appear, allowing you to enter the new user's details:
![Palmr Profile Menu](/src/assets/add-user-modal.png)
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.
![Palmr Profile Menu](/src/assets/new-user-table.png)
---
### Step 4: Managing User Actions
In the **User List**, under the **"Actions"** column, you will find a dropdown menu for each user.
![Palmr Profile Menu](/src/assets/add-user-actions-dropdown.png)
Available actions include:
- **Edit User** Opens a modal form to update user information:
- Change user details including role.
- Change the user password.
![Palmr Profile Menu](/src/assets/edit-user-modal.png)
- **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.
- **Delete User** Permanently removes the user from the system.
---
### Troubleshooting
#### User Creation Fails
- Ensure all mandatory fields (name, email, role) are filled out correctly.
- Check for duplicate emails.
- Verify that the system has proper connectivity to the backend.
#### User Cannot Log In
- Ensure the user is marked as **Active**.
- Verify that the correct email and password are being used.
- Reset the user password if needed.

View File

@@ -0,0 +1,77 @@
---
title: Github Sponsors
---
Sponsoring a project on GitHub is a powerful way to support its development and ensure its long-term sustainability. This tutorial will guide you through the process of sponsoring the **Palmr.** project on GitHub using GitHub Sponsors.
---
### Step 1: Log in to GitHub
Before you can star a project, you need to be logged into your GitHub account. If you don't have an account yet, you can sign up for free at [GitHub](https://github.com/).
---
### Step 2: Go to the Palmr. Repository
Once you're logged in, go to the Palmr. repository by clicking on this link: [https://github.com/kyantech/Palmr](https://github.com/kyantech/Palmr).
Alternatively, you can search for "Palmr" in the GitHub search bar and click on the repository owned by **Kyantech**.
---
### Step 3: Click on the "Sponsor" Button
On the Palmr repository page, you'll see a "Sponsor" button at the top right corner of the page. Click this button to proceed.
![Palmr Profile Menu](/src/assets/sponsor-btn.png)
---
### Step 4: Choose a Custom Sponsorship Amount
GitHub Sponsors allows you to sponsor the project with a **custom amount starting at $1**. Here's how to do it:
1. On the sponsorship page, look for the option to **enter a custom amount**.
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).
![Palmr Profile Menu](/src/assets/sponsor-page.png)
---
### Step 5: Complete the Sponsorship
After entering your custom amount and selecting the billing frequency, youll be prompted to enter your payment details. Follow the instructions to complete the sponsorship process. Once done, youll officially be a sponsor of the Palmr project!
---
### Why Sponsoring is Important for Project Development
Sponsoring a project goes beyond starring—it provides direct financial support to the developers, enabling them to focus on improving and maintaining the project. Heres why sponsoring is so important:
#### 1. **Supports Sustainability**
- Sponsoring helps ensure the long-term sustainability of the project by providing developers with the resources they need to continue their work.
#### 2. **Encourages Innovation**
- Financial support allows developers to experiment, innovate, and add new features to the project.
#### 3. **Shows Deep Appreciation**
- Sponsoring is a tangible way to show your appreciation for the hard work and effort that goes into maintaining and developing a project.
#### 4. **Gives You Recognition**
- Many projects offer recognition for sponsors, such as listing your name or company on the projects README or website.
#### 5. **Helps Open Source Thrive**
- Open-source projects like Palmr rely on community support. By sponsoring, youre contributing to the growth and success of the open-source ecosystem.
---
### A Meaningful Way to Give Back
Sponsoring a project is a meaningful way to give back to the developers who create the tools and software you rely on. Even a small contribution of **$1** can make a big difference. Your support ensures that Palmr continues to grow and improve. Thank you for considering sponsoring! 💖
---
### Conclusion
That's it! You've successfully sponsored the **Palmr** project on GitHub. Your contribution, no matter the amount, will help ensure the project continues to grow and improve. Thank you for your support!

View File

@@ -0,0 +1,72 @@
---
title: Star this project on Github
---
Starring a project on GitHub is a great way to show appreciation for a repository and to bookmark it for easy access later. This tutorial will guide you through the process of starring the **Palmr** project on GitHub.
---
### Step 1: Log in to GitHub
Before you can star a project, you need to be logged into your GitHub account. If you don't have an account yet, you can sign up for free at [GitHub](https://github.com/).
---
### Step 2: Go to the Palmr. Repository
Once you're logged in, go to the Palmr. repository by clicking on this link: [https://github.com/kyantech/Palmr](https://github.com/kyantech/Palmr).
Alternatively, you can search for "Palmr" in the GitHub search bar and click on the repository owned by **Kyantech**.
---
### Step 3: Star the Repository
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.
![Palmr Profile Menu](/src/assets/star-btn.png)
---
### Step 4: Confirm the Star
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.
![Palmr Profile Menu](/src/assets/starred-button.png)
---
### Why Starring is Important for Project Development
Starring a repository on GitHub is more than just a bookmarking tool—its a way to support the project and its developers. Heres why starring is so important:
#### 1. **Shows Appreciation**
- Starring a repository is a simple way to show your appreciation for the hard work and effort that goes into maintaining and developing a project. Its like giving a thumbs-up to the developers!
#### 2. **Increases Visibility**
- The more stars a repository has, the more visible it becomes on GitHub. This can attract more contributors, users, and even potential sponsors, which helps the project grow.
#### 3. **Encourages Developers**
- Seeing stars on a repository motivates developers to continue improving the project. Its a sign that people find the project useful and valuable.
#### 4. **Helps with Discovery**
- GitHubs trending and recommendation algorithms often prioritize repositories with more stars. By starring Palmr, youre helping others discover it more easily.
#### 5. **Tracks Your Interests**
- Starring a repository adds it to your "Starred" list, making it easy for you to find and revisit the project later. Its a great way to keep track of projects you love or want to follow.
#### 6. **Supports Open Source**
- Open-source projects like Palmr thrive on community support. By starring the repository, youre contributing to the open-source ecosystem and helping ensure the projects longevity.
---
### A Small Action with a Big Impact
Starring a repository takes just a second, but it can have a huge impact on the projects growth and development. Your support means a lot to the developers and the community behind Palmr. So, if you find the project useful, dont forget to hit that **Star** button! ⭐
---
### Conclusion
That's it! You've successfully starred the **Palmr.** project on GitHub. Starring repositories is a simple yet powerful way to keep track of projects you find interesting or useful. Thank you for supporting Palmr!