mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-23 06:11:58 +00:00
feat(docs): update and enhance documentation for v2.0.0-beta
Add new architecture, installation, and GitHub architecture documentation. Include new banner and architecture images. Refactor meta.json and index.mdx for better structure and clarity. Add sponsor and footer components to the docs layout. Update docker-compose.yaml with new environment variables and port configurations. Remove outdated files and streamline content for v2.0.0-beta release.
This commit is contained in:
@@ -7,21 +7,21 @@
|
||||
"---Introduction---",
|
||||
"index",
|
||||
"architecture",
|
||||
"github-architecture",
|
||||
"installation",
|
||||
"manual-installation",
|
||||
"github-architecture",
|
||||
"installation",
|
||||
"manual-installation",
|
||||
"---How to use Palmr.---",
|
||||
"login",
|
||||
"manage-users",
|
||||
"upload",
|
||||
"generate-share",
|
||||
"configuring-smtp",
|
||||
"available-languages",
|
||||
"login",
|
||||
"manage-users",
|
||||
"upload",
|
||||
"generate-share",
|
||||
"configuring-smtp",
|
||||
"available-languages",
|
||||
"---Developers---",
|
||||
"contribute",
|
||||
"open-an-issue",
|
||||
"---Sponsor this project---",
|
||||
"gh-star",
|
||||
"gh-sponsor"
|
||||
"contribute",
|
||||
"open-an-issue",
|
||||
"---Sponsor this project---",
|
||||
"gh-star",
|
||||
"gh-sponsor"
|
||||
]
|
||||
}
|
||||
|
63
apps/docs/content/docs/2.0.0-beta/architecture.mdx
Normal file
63
apps/docs/content/docs/2.0.0-beta/architecture.mdx
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: 🏗 Architecture of Palmr.
|
||||
---
|
||||
|
||||
#### Overview of the core architecture components 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**
|
||||
|
||||
Each component in the Palmr. architecture plays a vital role in ensuring reliability, performance, and scalability. The stack is built with simplicity, performance, and flexibility in mind, everything is self-hosted, developer-friendly, and designed to scale without adding unnecessary complexity.
|
||||
|
||||
|
||||
### **PostgreSQL**
|
||||
Palmr. uses **PostgreSQL** as the primary database solution. It's a powerful, open-source relational database that’s trusted by developers around the world. PostgreSQL is fully ACID-compliant, which means it handles transactions safely and reliably. It’s perfect for storing structured data like user accounts, file metadata, transfer logs, and anything else that requires consistency. With advanced features like full-text search, custom data types (like JSONB), and strong indexing capabilities, PostgreSQL gives us the tools to scale efficiently without giving up query performance or flexibility.
|
||||
|
||||
- Provides reliable and secure data storage, ensuring consistency and high performance for all database operations.
|
||||
- Powerful indexing, query optimization, and support for complex data types.
|
||||
- Ideal for handling large amounts of metadata and transactional data in a predictable and scalable way.
|
||||
|
||||
|
||||
### **Next.js 15 + React + TypeScript**
|
||||
The frontend of Palmr. is built using **Next.js 15**, along with **React** and **TypeScript**, forming a modern stack that’s easy to maintain and super fast for end users. Next.js 15 brings server components, server actions, and a new app router system that makes rendering dynamic content incredibly efficient. This allows us to load only what’s needed, when it’s needed which makes the app feel snappy even under load. React provides a clean, component-based structure that makes it easy to break the UI into reusable pieces, and TypeScript helps prevent bugs before they even happen by enforcing static typing and better code navigation. Whether it's SSR, static pages, or dynamic user interactions, this trio handles it all seamlessly.
|
||||
|
||||
- **React** enables the creation of a dynamic and responsive user interface with a component-based architecture.
|
||||
- **TypeScript** adds static typing, enhancing code quality and reducing runtime errors.
|
||||
- **Next.js 15** handles routing, server-side rendering, and server components for performance at scale.
|
||||
|
||||
|
||||
### **MinIO**
|
||||
Palmr. uses **MinIO** for object storage. MinIO is a lightweight, high-performance, S3-compatible storage solution that makes file handling simple and scalable. Every file uploaded to Palmr. Whether it's a personal file transfer or a shared asset is stored in MinIO. It’s built to handle huge amounts of data and can be deployed locally, on-premise, or in the cloud. Because it speaks the same API as Amazon S3, integrating with it is straightforward and familiar to most developers. And since it’s self-hosted, we have full control over performance, redundancy, and security.
|
||||
|
||||
- Supports high-throughput file storage and retrieval.
|
||||
- Ensures data integrity and redundancy.
|
||||
- Compatible with AWS S3 APIs, making integration seamless.
|
||||
|
||||
|
||||
### **Fastify**
|
||||
The backend of Palmr. is powered by **Fastify**, a super-fast Node.js web framework optimized for performance and low overhead. It’s designed to handle lots of concurrent requests with minimal resource usage, which is key for scalable backend services. Fastify also has a built-in schema validation system that ensures all incoming data is properly validated before reaching business logic, which helps prevent bugs and security issues. It follows a plugin-based architecture, making it easy to keep route handlers, services, and middlewares cleanly separated and easy to extend as the project grows.
|
||||
|
||||
- Provides fast request handling with a lightweight core.
|
||||
- Built-in schema-based validation for secure and reliable API handling.
|
||||
- Supports plugin-based architecture for easy extensibility.
|
||||
|
||||
|
||||
### **How It Works**
|
||||
1. **Frontend** — React + TypeScript + Next.js 15 handle the user interface and user interactions.
|
||||
2. **Backend** — Fastify processes requests and communicates with the database and storage layers.
|
||||
3. **Database** — PostgreSQL stores metadata and transactional data.
|
||||
4. **Object Storage** — MinIO stores the actual files and ensures scalable, high-performance storage.
|
||||
|
||||
|
||||
### **Useful Links**
|
||||
- [PostgreSQL Documentation](https://www.postgresql.org/docs/)
|
||||
- [Next.js Documentation](https://nextjs.org/docs)
|
||||
- [React Documentation](https://react.dev/)
|
||||
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
||||
- [MinIO Documentation](https://min.io/docs/minio/container/index.html)
|
||||
- [Fastify Documentation](https://fastify.dev/docs/latest/)
|
||||
|
@@ -1,99 +0,0 @@
|
||||
---
|
||||
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": []
|
||||
},
|
||||
]
|
||||
```
|
145
apps/docs/content/docs/2.0.0-beta/github-architecture.mdx
Normal file
145
apps/docs/content/docs/2.0.0-beta/github-architecture.mdx
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
title: </> Github Architecture
|
||||
---
|
||||
|
||||
import { File, Folder, Files } from "fumadocs-ui/components/files";
|
||||
|
||||
## Project Structure
|
||||
|
||||
<Files>
|
||||
<Folder name="apps" defaultOpen>
|
||||
<Folder name="docs" >
|
||||
<File name="all documentation files" />
|
||||
</Folder>
|
||||
<Folder name="server" >
|
||||
<File name="all backend files" />
|
||||
</Folder>
|
||||
<Folder name="web" >
|
||||
<File name="all frontend files" />
|
||||
</Folder>
|
||||
</Folder>
|
||||
<File name="other project files" />
|
||||
</Files>
|
||||
|
||||
|
||||
## Core Components
|
||||
|
||||
### 🖥️ Frontend Application (apps/web)
|
||||
|
||||
**Technology Stack:**
|
||||
|
||||
- Next.js 15 (App Router)
|
||||
- React 18
|
||||
- TypeScript
|
||||
- TailwindCSS
|
||||
- shadcn/ui components
|
||||
- next-intl for internationalization
|
||||
|
||||
Palmr.'s frontend is built with **Next.js 15**, using the App Router and Server Components for performance, scalability, and flexibility. The structure is modular and feature-based, keeping things easy to evolve as the product grows. UI logic runs on **React 18**, and **TypeScript** adds type safety that prevents a lot of silent bugs. Styles are handled with **TailwindCSS**, letting us build clean, responsive interfaces quickly. For components, we rely on **shadcn/ui**, a headless component library built with Radix UI and Tailwind, it’s fast, accessible, and fully customizable.
|
||||
|
||||
Internationalization is handled by **next-intl**, which integrates perfectly with Next.js routing. It supports locale-aware routes, per-page translation loading, and plural rules, all without any extra client-side bloat. It’s flexible, lightweight, and great for apps with multilingual audiences.
|
||||
|
||||
The frontend is organized with:
|
||||
|
||||
- A **components-based architecture** for modular UI
|
||||
- **Custom hooks** to isolate logic and side effects
|
||||
- A **route protection system** using session cookies and middleware
|
||||
- A **file management interface** integrated with the backend
|
||||
- A **reusable modal system** used for file actions, confirmations, and more
|
||||
- **Dynamic, locale-aware routing** using next-intl
|
||||
|
||||
---
|
||||
|
||||
### ⚙️ Backend Service (apps/server)
|
||||
|
||||
**Technology Stack:**
|
||||
|
||||
- Fastify
|
||||
- PostgreSQL
|
||||
- MinIO (S3-compatible)
|
||||
- Prisma ORM
|
||||
|
||||
The backend is built on **Fastify**, a blazing-fast web framework for Node.js. It’s lightweight, modular, and optimized for high performance. Every route is validated using JSON schema, which helps keep the API consistent and secure. Auth flows are built using JWTs stored in HTTP-only cookies, and everything from file uploads to token-based sharing goes through this layer.
|
||||
|
||||
Data is stored in **PostgreSQL**, which handles user info, file metadata, session tokens, and more. For actual file storage, we use **MinIO**, a fast, S3-compatible object store that’s self-hosted and super scalable. It’s perfect for keeping user files isolated and safe. We use **Prisma** as our ORM to simplify database access, it gives us type-safe queries and easy-to-read code.
|
||||
|
||||
Key features include:
|
||||
|
||||
- **Authentication/authorization** with JWT + cookie sessions
|
||||
- **File management logic** including uploads, deletes, and renames
|
||||
- **Storage operations** to handle bucket creation, usage tracking, and cleanup
|
||||
- A **share system** that generates tokenized public file links
|
||||
- Schema-based request validation for all endpoints
|
||||
- Prisma models that keep the database logic predictable and type-safe
|
||||
|
||||
---
|
||||
|
||||
### 📚 Documentation (apps/docs)
|
||||
|
||||
**Technology Stack:**
|
||||
|
||||
- Fumadocs
|
||||
- MDX (Markdown + JSX)
|
||||
- React-based components
|
||||
|
||||
The docs are built using **Fumadocs**, a modern documentation system built on top of Next.js. It uses **MDX**, so you can mix Markdown with interactive React components, perfect for developer tools and open-source projects. Pages are fast, versionable, and easy to customize. The goal is to keep the documentation as close to the codebase as possible, using shared components where needed and reusing UI patterns directly from the app.
|
||||
|
||||
It supports sidebar navigation, keyboard shortcuts, dark mode, and even interactive demos or UI previews. The file tree you see above, for example, is powered by a real React component from the docs.
|
||||
|
||||
- Built with **Fumadocs**, powered by Next.js
|
||||
- Supports **MDX** and full React component embedding
|
||||
- Ideal for technical docs and live code samples
|
||||
- Styled using the same Tailwind setup from the main app
|
||||
|
||||
---
|
||||
|
||||
### 🏗️ Infrastructure
|
||||
|
||||
Palmr. is fully containerized using **Docker**, which means every service: frontend, backend, database, storage, runs in its own isolated environment. With `docker-compose`, the whole stack spins up locally with a single command. It’s also easy to deploy to services like Fly.io, Render, or your own VPS.
|
||||
|
||||
Volumes are used to persist data locally, and containers are networked together so that all services can talk to each other securely.
|
||||
|
||||
- **Docker-first architecture** with all services containerized
|
||||
- Configurable through `.env` and compose overrides
|
||||
- Local volumes and named networks
|
||||
- Easy to deploy and scale on any container-compatible infra
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
### 📂 File Management
|
||||
|
||||
Files are at the heart of Palmr. Users can upload files via the frontend, and they’re streamed directly to MinIO. The backend handles metadata (name, size, type, ownership), and also handles deletion, renaming, and public sharing. Every file operation is tracked, and all actions can be scoped per user.
|
||||
|
||||
- Upload/download with instant feedback
|
||||
- File previews, type validation, and size limits
|
||||
- Token-based sharing system
|
||||
- Disk usage tracking by user
|
||||
|
||||
### 👤 User System
|
||||
|
||||
Authentication is done through secure JWTs, stored in HTTP-only cookies for safety. Signup and login flows are simple and fast, and user info is kept in sync across the frontend and backend.
|
||||
|
||||
- Cookie-based session management
|
||||
- Role support and future admin access
|
||||
- Profile updates and password reset flows
|
||||
- Logged-in user state handled via custom hooks
|
||||
|
||||
### 💾 Storage System
|
||||
|
||||
MinIO is used for all file storage. It’s fast, lightweight, and fully S3-compatible which means it can scale easily and integrates with tons of other tools. The backend tracks usage, handles cleanup of orphaned files, and ensures that every file on disk has a matching database record.
|
||||
|
||||
- S3-compatible object storage via MinIO
|
||||
- Upload validation and automatic cleanup
|
||||
- Usage tracking and quotas (per user or global)
|
||||
- Secure access to stored files with signed URLs
|
||||
|
||||
### 🌐 Internationalization
|
||||
|
||||
Palmr. supports multiple languages using **next-intl**, which is deeply integrated into the routing system. It loads only the necessary translations per route, supports nested namespaces, and makes it easy to keep things organized even at scale.
|
||||
|
||||
- Per-locale localstorage (`en-US`, `pt-BR`, etc.)
|
||||
- Translation loading by namespace/page
|
||||
- Full pluralization and formatting support
|
||||
- Easy translation management via JSON files
|
@@ -1,99 +1,52 @@
|
||||
---
|
||||
title: Architecture of Palmito
|
||||
description: How to interact with the dokploy API for administrators and users
|
||||
title: 🌴 Welcome to Palmr.
|
||||
---
|
||||
|
||||
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
|
||||
**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.
|
||||
|
||||
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.
|
||||
## **Why Choose Palmr.?**
|
||||
|
||||
## For Users
|
||||
### 🚫 **No Artificial Limits**
|
||||
|
||||
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.
|
||||
Unlike traditional file transfer services that impose arbitrary restrictions, Palmr. takes a fundamentally different approach by removing all artificial constraints on file sizes and quantities. The only practical limitation you'll encounter is the **available storage** space on your server or VPS infrastructure. This means that as long as you have adequate storage capacity in your hosting environment, you have complete freedom to transfer files of any size and in any quantity. There are no premium tiers to unlock additional features, no intrusive advertisements to navigate around, and absolutely no hidden charges or unexpected fees that might surprise you later. This unrestricted approach ensures that your file transfer capabilities are determined solely by your infrastructure choices rather than arbitrary service limitations.
|
||||
|
||||
Note: The API provides advanced functionalities. Make sure you understand the operations you're performing to avoid unintended changes to the system.
|
||||
### 🌟 **Open Source and Free**
|
||||
|
||||
## Usage
|
||||
Palmr. is completely **open source** and free to use, which means there are no licensing fees, subscription costs, or hidden charges associated with implementing and maintaining the software. This commitment to open source principles ensures complete transparency and freedom in how you utilize the platform. You can:
|
||||
|
||||
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.
|
||||
- Deploy it on any infrastructure of your choice (VPS, dedicated server, Docker, cloud platforms, or other hosting environments), giving you complete flexibility in your hosting decisions.
|
||||
- Review and audit the entire codebase to ensure security and integrity, allowing you to verify that the software meets your organization's security standards and compliance requirements.
|
||||
- Contribute improvements or custom features to enhance the platform's functionality, participating in the collaborative development process that makes open source software so powerful.
|
||||
- Adapt it for different use cases as needed, whether you're using it for personal file sharing, business operations, or specialized applications that require custom modifications.
|
||||
|
||||
### Authentication
|
||||
### 🔒 **Security and Privacy Under Your Control**
|
||||
|
||||
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.
|
||||
When you host Palmr. on your infrastructure, you maintain **full control over your data** through end-to-end management of the storage and transfer process. By keeping files within your own hosting environment, you eliminate security vulnerabilities that could arise from third-party handling. Your files never get stored or processed by external services, ensuring complete **privacy** and **confidentiality** of transferred information. This allows you to implement security protocols and compliance measures that match your specific requirements.
|
||||
|
||||
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:
|
||||
By eliminating third-party involvement, you gain peace of mind knowing that the files are never handled by external providers. This guarantees that you retain full control over data handling and processing, reinforcing the confidentiality of sensitive information throughout its lifecycle.
|
||||
|
||||
```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": []
|
||||
},
|
||||
]
|
||||
```
|
||||
With Palmr., your security and privacy are entirely in your hands, making it a powerful and reliable solution for organizations that require full control over their data, whether for internal use or for compliance with regulations.
|
||||
|
||||
### 🎨 **Highly Customizable**
|
||||
|
||||
Palmr. offers extensive customization options that allow you to tailor every aspect of the platform to perfectly align with your brand identity and create an optimal user experience that matches your specific requirements:
|
||||
|
||||
- Add your own **logo** to maintain consistent branding across your file-sharing platform and establish a professional, unified presence.
|
||||
- Set a **custom app name** that reflects your organization's identity and helps users instantly recognize your branded file-sharing solution.
|
||||
- Configure an **SMTP server** for email notifications, enabling seamless communication with users about file transfers, updates, and system alerts.
|
||||
- Customize text throughout the interface to create a unique user experience that resonates with your audience and maintains your brand voice.
|
||||
|
||||
### 👥 **Complete User and Admin Management**
|
||||
|
||||
Palmr. provides a comprehensive and sophisticated user and admin management system that puts you in complete control of your file-sharing environment:
|
||||
|
||||
- Create and manage multiple **administrators** with different permission levels to ensure proper oversight and delegation of responsibilities.
|
||||
- Add unlimited **users** to accommodate teams of any size, from small workgroups to large enterprises.
|
||||
- Control who can view, upload, and manage files with granular permission settings that allow you to implement precise access controls.
|
||||
- Easily monitor storage usage through detailed analytics and reporting tools that help you optimize resource allocation.
|
||||
|
||||
### ⚡ **Fast, Lightweight, and Scalable**
|
||||
|
||||
Palmr. demonstrates exceptional technical capabilities through its streamlined and expandable architecture, engineered to deliver optimal operational efficiency. The system effectively processes substantial file transfers and manages high-volume user activity while consistently maintaining superior transfer rates. The platform's contemporary infrastructure automatically adjusts to accommodate increased utilization, facilitating uninterrupted functionality as operational requirements expand. Through advanced resource allocation and refined programming, the system delivers a highly responsive user experience that accommodates organizational growth while maintaining consistent performance standards and operational stability.
|
253
apps/docs/content/docs/2.0.0-beta/installation.mdx
Normal file
253
apps/docs/content/docs/2.0.0-beta/installation.mdx
Normal file
@@ -0,0 +1,253 @@
|
||||
---
|
||||
title: 🐳 Installation (Docker Compose)
|
||||
---
|
||||
|
||||
|
||||
Installation via Docker Compose is the simplest way to run the project across different environments. For it to run correctly, we need two main tools installed in our environment:
|
||||
|
||||
- Docker ([https://docs.docker.com](https://docs.docker.com/))
|
||||
- Docker Compose ([https://docs.docker.com/compose](https://docs.docker.com/compose/))
|
||||
|
||||
> *It's worth emphasizing that Palmr. was fully developed in a MacOS environment and extensively tested on Linux servers. Therefore, we can guarantee the best system performance in these environments. Windows and other environments have not been tested yet, and potential bugs may occur during execution. However, remember that we are still in a beta version of Palmr., and errors or bugs can occur in any operating system. If you identify any issues, we appreciate your help in notifying us through our GitHub [issues page](https://github.com/kyantech/Palmr/issues).*
|
||||
|
||||
---
|
||||
|
||||
## ⚡ Quick Start
|
||||
|
||||
Having installed [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) in our environment, we can proceed with the simple installation using these tools.
|
||||
|
||||
In the root folder of our project, we can find our `docker-compose.yaml` file, which is the only file needed to run the project via Docker and Docker Compose. This is because the pre-built images are already in our [DockerHub](https://hub.docker.com/repositories/kyantech) and are only referenced in the `docker-compose.yaml`
|
||||
|
||||
Any changes needed for execution can be made directly in our `docker-compose.yaml` or via environment variables, which we will show later in this tutorial.
|
||||
|
||||
Next, let's look at the content of our `docker-compose.yaml`.
|
||||
|
||||
---
|
||||
|
||||
## 🐳 Docker Compose Content
|
||||
Below is the complete content of our `docker-compose.yaml` that can be copied directly from here or from our official repository ([Docker Compose](https://github.com/kyantech/Palmr/blob/main/docker-compose.yaml)).
|
||||
|
||||
```yaml
|
||||
services:
|
||||
palmr-api:
|
||||
image: kyantech/palmr-api:v2.0.0-beta # Make sure to use the correct version (latest) of the image
|
||||
container_name: palmr-api
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: "service_healthy"
|
||||
minio:
|
||||
condition: "service_healthy"
|
||||
environment:
|
||||
- PORT=${API_INTERNAL_PORT:-3333} # Port for the backend service
|
||||
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgresRootPassword}@postgres:5432/palmr_db?schema=public # Database URL with configurable password through POSTGRES_PASSWORD env var
|
||||
- MINIO_ENDPOINT=minio # This can change if your MinIO is at a different address
|
||||
- MINIO_PORT=${MINIO_INTERNAL_API_PORT:-6421} # Default MinIO port (Change if yours is not the default)
|
||||
- MINIO_USE_SSL=false # MinIO uses SSL by default, but you can change it to true if needed
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user} # MinIO credentials can be configured through MINIO_ROOT_USER env vars
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword} # MinIO credentials can be configured through MINIO_ROOT_PASSWORD env vars
|
||||
- MINIO_REGION=sa-east-1 # MinIO region - This is needed for MinIO to work properly
|
||||
- MINIO_BUCKET_NAME=files # MinIO bucket name - This is needed for MinIO to work properly, dont change it if you don't know what you are doing
|
||||
- FRONTEND_URL=${APP_URL:-http://${SERVER_IP:-localhost}:${APP_EXTERNAL_PORT:-5487}} # Frontend URL - Make sure to use the correct frontend URL, depends on where the frontend is running, its prepared for localhost, but you can change it to your frontend URL if needed
|
||||
- SERVER_IP=${SERVER_IP:-localhost} # Server IP - Make sure to use the correct server IP if you running on a cloud provider or a virtual machine. This prepared for localhost, but you can change it to your server IP if needed
|
||||
ports:
|
||||
- "${API_EXTERNAL_PORT:-3333}:${API_INTERNAL_PORT:-3333}" # Backend port mapping
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${API_INTERNAL_PORT:-3333}/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
palmr-app:
|
||||
image: kyantech/palmr-app:v2.0.0-beta # Make sure to use the correct version (latest) of the image
|
||||
container_name: palmr-web
|
||||
depends_on:
|
||||
palmr-api:
|
||||
condition: "service_healthy"
|
||||
ports:
|
||||
- "${APP_EXTERNAL_PORT:-5487}:5487" # Frontend port mapping
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
- API_BASE_URL=http://palmr-api:${API_INTERNAL_PORT:-3333} # Here we use docker's internal network to reference the backend service (can be changed if needed)
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5487"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2025-03-12T18-04-18Z # Use only version RELEASE.2025-03-12T18-04-18Z to avoid compatibility issues with the backend
|
||||
container_name: minio
|
||||
environment:
|
||||
# MinIO credentials - same as above, configurable through environment variables
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword}
|
||||
- MINIO_SITE_REGION=sa-east-1
|
||||
command: server /data --address ":${MINIO_INTERNAL_API_PORT:-6421}" --console-address ":${MINIO_INTERNAL_CONSOLE_PORT:-6422}"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
ports:
|
||||
- "${MINIO_EXTERNAL_API_PORT:-6421}:${MINIO_INTERNAL_API_PORT:-6421}"
|
||||
- "${MINIO_EXTERNAL_CONSOLE_PORT:-6422}:${MINIO_INTERNAL_CONSOLE_PORT:-6422}"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${MINIO_INTERNAL_API_PORT:-6421}/minio/health/ready"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
minio-init:
|
||||
image: minio/mc:RELEASE.2025-03-12T17-29-24Z # Use only version RELEASE.2025-03-12T17-29-24Z to avoid compatibility issues with the backend and MinIO
|
||||
container_name: minio-init
|
||||
depends_on:
|
||||
minio:
|
||||
condition: "service_healthy"
|
||||
restart: "no"
|
||||
# The entrypoint script will create a bucket called "files" and set it to be publicly readable using the MinIO client (mc).
|
||||
entrypoint: >
|
||||
sh -c "
|
||||
sleep 5 &&
|
||||
mc alias set myminio http://minio:${MINIO_INTERNAL_API_PORT:-6421} ${MINIO_ROOT_USER:-minio_root_user} ${MINIO_ROOT_PASSWORD:-minioRootPassword} &&
|
||||
mc mb myminio/files --ignore-existing &&
|
||||
mc anonymous set download myminio/files
|
||||
"
|
||||
|
||||
postgres:
|
||||
image: bitnami/postgresql:17.2.0 # You can use any postgres version you prefer, but remember that some versions might not be compatible
|
||||
container_name: palmr-postgres
|
||||
environment:
|
||||
# PostgreSQL credentials configurable through environment variables
|
||||
# POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB can be set to override defaults
|
||||
- POSTGRESQL_USERNAME=${POSTGRES_USER:-postgres}
|
||||
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD:-postgresRootPassword}
|
||||
- POSTGRESQL_DATABASE=${POSTGRES_DB:-palmr_db}
|
||||
volumes:
|
||||
- postgres_data:/bitnami/postgresql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "palmr"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
minio_data:
|
||||
postgres_data:
|
||||
|
||||
```
|
||||
|
||||
Notice that the `docker-compose.yaml` has several comments that help you configure your own compose to meet your environment's needs. Let's give an overview of some changes we can make.
|
||||
|
||||
---
|
||||
|
||||
### ⚙️ Services Overview
|
||||
|
||||
Palmr. consists of five main services, each with specific responsibilities. Below, we present a detailed view of each component:
|
||||
|
||||
| **Service** | **Image** | **Exposed Ports** | **Main Features** |
|
||||
| --- | --- | --- | --- |
|
||||
| palmr-api (Backend) | [kyantech/palmr-api:latest](https://hub.docker.com/repository/docker/kyantech/palmr-api/tags/latest/sha256-84245d3d0012aa65c588caba56322363729c4b68c3722a08dcda912904de9d1d) | **3333** | • Main API service<br/>• Depends on services: postgres and minio<br/>• Has healthcheck to ensure availability |
|
||||
| palmr-app (Frontend) | [kyantech/palmr-app:latest](https://hub.docker.com/repository/docker/kyantech/palmr-app/tags/latest/sha256-33f568673ae8cc8529532146b6afc1acafa203387ced6c7bb3451a7ab4198a2f) | **5487** | • Web application interface<br/>• Depends on palmr-api service<br/>• Configured for production environment |
|
||||
| minio (Storage) | [minio/minio:RELEASE.2025-03-12T18-04-18Z](https://hub.docker.com/layers/minio/minio/RELEASE.2025-03-12T18-04-18Z/images/sha256-85f3e4cd1ca92a2711553ab79f222bcd8b75aa2c77a1a0b0ccf80d38e8ab2fe5) | **6421**(API)<br/>**6422**(Console) | • File storage service<br/>• Persistent volume for data |
|
||||
| minio-init (Config) | [minio/mc:RELEASE.2025-03-12T17-29-24Z](https://hub.docker.com/layers/minio/mc/RELEASE.2025-03-12T17-29-24Z/images/sha256-68d8c80f43908b02daa285e55547131870a1d36b3ffe272c26d7d8f4d52d1e5c) | N/A | • Initially configures the "files" bucket<br/>• Runs only once during initialization |
|
||||
| postgres (Database) | [bitnami/postgresql:17.2.0](https://hub.docker.com/layers/bitnami/postgresql/17.2.0/images/sha256-29c614afad4f514b12b5c0f4d006f38c98fa4b18c3582732ff93b3fe9a79d875) | **5432** | • PostgreSQL database<br/>• Persistent volume for data |
|
||||
|
||||
---
|
||||
|
||||
### 🛠️ Available Environment Variables
|
||||
|
||||
The table below shows all environment variables that can be set
|
||||
|
||||
| **Variable** | **Default Value** | **Description** |
|
||||
| --- | --- | --- |
|
||||
| API_INTERNAL_PORT | 3333 | Internal API port in container |
|
||||
| API_EXTERNAL_PORT | 3333 | Exposed port on host for API |
|
||||
| POSTGRES_PASSWORD | postgresRootPassword | PostgreSQL database password |
|
||||
| APP_EXTERNAL_PORT | 5487 | Exposed port on host for frontend |
|
||||
| APP_URL | http://localhost:5487 | Complete frontend URL |
|
||||
| SERVER_IP | localhost | IP of the server where the application is running |
|
||||
| MINIO_ROOT_USER | minio_root_user | MinIO admin user |
|
||||
| MINIO_ROOT_PASSWORD | minioRootPassword | MinIO admin password |
|
||||
| MINIO_INTERNAL_API_PORT | 6421 | Internal MinIO API port |
|
||||
| MINIO_INTERNAL_CONSOLE_PORT | 6422 | Internal MinIO console port |
|
||||
| MINIO_EXTERNAL_API_PORT | 6421 | Exposed port on host for MinIO API |
|
||||
| MINIO_EXTERNAL_CONSOLE_PORT | 6422 | Exposed port on host for MinIO console |
|
||||
| POSTGRESQL_USERNAME | postgres | PostgreSQL user |
|
||||
| POSTGRESQL_DATABASE | palmr_db | Database name |
|
||||
|
||||
> *All these variables can be configured through a .env file in the project root or defined directly in the environment where docker-compose will be executed. The best way to do this is up to you. But be careful to replace correctly if doing directly in the compose instead of providing an environment var.*
|
||||
>
|
||||
|
||||
|
||||
#### 🗂️ Persistent Volumes
|
||||
|
||||
- minio_data: Stores MinIO files
|
||||
- postgres_data: Stores PostgreSQL data
|
||||
|
||||
---
|
||||
|
||||
### 💻 Local Execution
|
||||
|
||||
In a localhost environment, there's no mystery. If you don't want to change any service exposure ports, you can simply run:
|
||||
|
||||
This will execute all necessary services and give you access to the following URLs (if you haven't changed any ports):
|
||||
|
||||
- **Frontend:** [http://localhost:5487](http://localhost:5487)
|
||||
- **Backend:** [http://localhost:3333](http://localhost:3333/)
|
||||
- **MinIO API:** [http://localhost:6421](http://localhost:6421)
|
||||
- **MinIO Console:** [http://localhost:6422](http://localhost:6422)
|
||||
- **Postgres Database:** [http://localhost:5423](http://localhost:5423/) (Connection only)
|
||||
|
||||
> *If you have changed any port, simply access the URL with the port you configured.*
|
||||
>
|
||||
|
||||
---
|
||||
|
||||
### 🌐 Production (VPS or other)
|
||||
|
||||
For production environments, whether it's your VPS, Homelab Server, or other, the execution is very similar to the localhost environment, except for some particularities that may occur in some cases.
|
||||
|
||||
We mainly need to pay attention to the following points:
|
||||
|
||||
- Correctly set the `SERVER_IP` env var with our server's IP, otherwise some redirects and queries will fail during App execution.
|
||||
- Set the `APP_URL` - regardless of whether the frontend is on the same server and with the same IP, it's extremely important to set this environment variable, otherwise sharing links will be generated incorrectly.
|
||||
- For all environment variables that are `PASSWORD`, it's highly recommended to generate secure passwords and replace them as env vars.
|
||||
- Lastly, make sure no docker service will conflict with any existing ones in your environment. If there is a conflict, simply change the execution ports via environment var or in the docker compose.
|
||||
|
||||
Basically, by paying attention to these points, you can quickly execute the project with the same command we used for localhost:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
At this stage, if you encounter any errors, it's worth reviewing your `docker-compose.yaml` and trying again, paying close attention to the points mentioned above.
|
||||
|
||||
> *First test without using reverse proxies like Caddy, Traefik, etc... if you plan to use them. Access the services via `server_ip:port` after confirming they work, then make the necessary routing configurations as desired.*
|
||||
>
|
||||
|
||||
If you haven't changed the execution ports, you'll have access on your server at:
|
||||
|
||||
- **Frontend:** `[server_ip]:5487`
|
||||
- **Backend:** `[server_ip]:3333`
|
||||
- **MinIO API:** `[server_ip]:6421`
|
||||
- **MinIO Console:** `[server_ip]:6422`
|
||||
- **Postgres Database:** `[server_ip]:5423` (Connection only)
|
||||
|
||||
> *If you've changed any port, simply access the URL with the port you configured.*
|
||||
>
|
||||
|
||||
It's worth noting that this is just a quick start and we're not going into details about any of the developed services, but it's recommended for execution in any environment. However, if your focus is on using Palmr. with high availability in mind, it's recommended to use a container orchestrator prepared for this, such as Kubernetes or similar, but we don't cover this type of configuration in our documentation.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Additional Resources
|
||||
|
||||
- [Docker Documentation](https://docs.docker.com/)
|
||||
- [Docker Compose Documentation](https://docs.docker.com/compose/)
|
||||
- [MinIO Documentation](https://min.io/docs/minio/container/index.html)
|
||||
- [PostgreSQL Documentation](https://www.postgresql.org/docs/)
|
@@ -1,7 +1,15 @@
|
||||
{
|
||||
"title": "v2.0.0-beta",
|
||||
"description": "v2.0.0-beta Documentation",
|
||||
"root": true,
|
||||
"icon": "Building2",
|
||||
"pages": ["---Introduction---", "index", "---How to use Palmr.---", "...", "---Reference---"]
|
||||
}
|
||||
"title": "v2.0.0-beta",
|
||||
"description": "v2.0.0-beta Documentation",
|
||||
"root": true,
|
||||
"icon": "Building2",
|
||||
"pages": [
|
||||
"---Introduction---",
|
||||
"index",
|
||||
"architecture",
|
||||
"github-architecture",
|
||||
"installation",
|
||||
"---How to use Palmr.---",
|
||||
"..."
|
||||
]
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
---
|
||||
title: Introduction
|
||||
---
|
||||
|
||||
<!--  -->
|
||||
|
||||
## 🌴 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.
|
BIN
apps/docs/public/assets/v2/general/architecture.png
Normal file
BIN
apps/docs/public/assets/v2/general/architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 232 KiB |
BIN
apps/docs/public/assets/v2/general/banner.png
Normal file
BIN
apps/docs/public/assets/v2/general/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
@@ -1,13 +1,15 @@
|
||||
import { source } from '@/lib/source';
|
||||
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';
|
||||
} from "fumadocs-ui/page";
|
||||
import { notFound } from "next/navigation";
|
||||
import { createRelativeLink } from "fumadocs-ui/mdx";
|
||||
import { getMDXComponents } from "@/mdx-components";
|
||||
import { Footer } from "../components/footer";
|
||||
import { Sponsor } from "../components/sponsor";
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>;
|
||||
@@ -19,14 +21,21 @@ export default async function Page(props: {
|
||||
const MDXContent = page.data.body;
|
||||
|
||||
return (
|
||||
<DocsPage toc={page.data.toc} full={page.data.full}>
|
||||
<DocsPage
|
||||
toc={page.data.toc}
|
||||
full={page.data.full}
|
||||
footer={{ enabled: true, component: <Footer /> }}
|
||||
tableOfContent={{
|
||||
style: "clerk",
|
||||
footer: <Sponsor/>
|
||||
}}
|
||||
>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<div className='border w-full'></div>
|
||||
<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),
|
||||
})}
|
||||
/>
|
||||
@@ -47,7 +56,7 @@ export async function generateMetadata(props: {
|
||||
if (!page) notFound();
|
||||
|
||||
return {
|
||||
title: page.data.title + ' | 🌴 Palmr. Docs',
|
||||
title: page.data.title + " | 🌴 Palmr. Docs",
|
||||
description: page.data.description,
|
||||
};
|
||||
}
|
||||
|
19
apps/docs/src/app/docs/components/footer.tsx
Normal file
19
apps/docs/src/app/docs/components/footer.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import Link from 'fumadocs-core/link';
|
||||
|
||||
export function Footer() {
|
||||
return (
|
||||
<footer className="flex items-center justify-center p-6 border-t font-light">
|
||||
<div className="flex items-center gap-1 text-sm ">
|
||||
<span>Powered by</span>
|
||||
<Link
|
||||
href="http://kyantech.com.br"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
className="flex items-center hover:text-green-700 text-green-500 transition-colors font-light"
|
||||
>
|
||||
Kyantech Solutions ©
|
||||
</Link>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
17
apps/docs/src/app/docs/components/sponsor.tsx
Normal file
17
apps/docs/src/app/docs/components/sponsor.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Coffee } from "lucide-react";
|
||||
|
||||
export function Sponsor() {
|
||||
return (
|
||||
<footer>
|
||||
<a
|
||||
href="https://github.com/sponsors/kyantech"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="m-2 mt-5 flex items-center justify-center gap-2 p-3 rounded-lg border-2 bg-card text-card-foreground hover:bg-accent/50 transition-colors hover:bg-black/10"
|
||||
>
|
||||
<Coffee size={18} />
|
||||
<span className="text-xs font-medium">Sponsor on GitHub</span>
|
||||
</a>
|
||||
</footer>
|
||||
);
|
||||
}
|
@@ -1,7 +1,9 @@
|
||||
import { Banner } from 'fumadocs-ui/components/banner';
|
||||
import './global.css';
|
||||
import { RootProvider } from 'fumadocs-ui/provider';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { ReactNode } from 'react';
|
||||
import Link from 'fumadocs-core/link';
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ['latin'],
|
||||
@@ -11,6 +13,7 @@ export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={inter.className} suppressHydrationWarning>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<Banner variant="rainbow" id='banner-v-2' changeLayout={false}><Link href='/docs/2.0.0-beta' >Palmr. v2.0.0-beta has released!</Link></Banner>
|
||||
<RootProvider>{children}</RootProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -8,6 +8,5 @@ MINIO_ROOT_USER="palmr"
|
||||
MINIO_ROOT_PASSWORD="palmr123"
|
||||
MINIO_REGION="sa-east-1"
|
||||
MINIO_BUCKET_NAME="files"
|
||||
|
||||
PORT=3333
|
||||
BASE_URL=http://localhost:3333
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import { env } from "../env";
|
||||
import { Client } from "minio";
|
||||
|
||||
export const minioLocalClient = new Client({
|
||||
endPoint: env.MINIO_ENDPOINT === "minio" ? "localhost" : env.MINIO_ENDPOINT,
|
||||
endPoint: env.MINIO_ENDPOINT === "minio" ? env.SERVER_IP : env.MINIO_ENDPOINT,
|
||||
port: Number(env.MINIO_PORT),
|
||||
useSSL: env.MINIO_USE_SSL === "true",
|
||||
accessKey: env.MINIO_ROOT_USER,
|
||||
|
@@ -9,10 +9,9 @@ const envSchema = z.object({
|
||||
MINIO_ROOT_USER: z.string().min(1),
|
||||
MINIO_REGION: z.string().min(1),
|
||||
MINIO_BUCKET_NAME: z.string().min(1),
|
||||
BASE_URL: z.string().min(1),
|
||||
|
||||
PORT: z.string().min(1),
|
||||
DATABASE_URL: z.string().min(1),
|
||||
SERVER_IP: z.string().min(1),
|
||||
});
|
||||
|
||||
export const env = envSchema.parse(process.env);
|
||||
|
@@ -38,9 +38,9 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 5487
|
||||
|
||||
ENV PORT=3000
|
||||
ENV PORT=5487
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
||||
CMD ["node", "server.js"]
|
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
palmr-api:
|
||||
image: kyantech/palmr-api:latest # Make sure to use the correct version (latest) of the image
|
||||
image: kyantech/palmr-api:v2.0.0-beta # Make sure to use the correct version (latest) of the image
|
||||
container_name: palmr-api
|
||||
depends_on:
|
||||
postgres:
|
||||
@@ -8,22 +8,22 @@ services:
|
||||
minio:
|
||||
condition: "service_healthy"
|
||||
environment:
|
||||
- PORT=3333 # Port for the backend service
|
||||
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgresRootPassword}@postgres:5432/palmr_db?schema=public # Database URL with configurable password through POSTGRES_PASSWORD env var
|
||||
- PORT=${API_INTERNAL_PORT:-3333} # Port for the backend service
|
||||
- DATABASE_URL=postgresql://postgres:${POSTGRESQL_PASSWORD:-postgresRootPassword}@postgres:5432/palmr_db?schema=public # Database URL with configurable password through POSTGRESQL_PASSWORD env var
|
||||
- MINIO_ENDPOINT=minio # This can change if your MinIO is at a different address
|
||||
- MINIO_PORT=9000 # Default MinIO port (Change if yours is not the default)
|
||||
- MINIO_USE_SSL=false
|
||||
- MINIO_PORT=${MINIO_INTERNAL_API_PORT:-6421} # Default MinIO port (Change if yours is not the default)
|
||||
- MINIO_USE_SSL=false # MinIO uses SSL by default, but you can change it to true if needed
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user} # MinIO credentials can be configured through MINIO_ROOT_USER env vars
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword} # MinIO credentials can be configured through MINIO_ROOT_PASSWORD env vars
|
||||
- MINIO_REGION=sa-east-1
|
||||
- MINIO_BUCKET_NAME=files
|
||||
- FRONTEND_URL=http://localhost:3000 # Frontend URL - Make sure to use the correct frontend URL, depends on where the frontend is running
|
||||
- BASE_URL=http://localhost:3333
|
||||
- MINIO_REGION=sa-east-1 # MinIO region - This is needed for MinIO to work properly
|
||||
- MINIO_BUCKET_NAME=files # MinIO bucket name - This is needed for MinIO to work properly, dont change it if you don't know what you are doing
|
||||
- FRONTEND_URL=${APP_URL:-http://${SERVER_IP:-localhost}:${APP_EXTERNAL_PORT:-5487}} # Frontend URL - Make sure to use the correct frontend URL, depends on where the frontend is running, its prepared for localhost, but you can change it to your frontend URL if needed
|
||||
- SERVER_IP=${SERVER_IP:-localhost} # Server IP - Make sure to use the correct server IP if you running on a cloud provider or a virtual machine. This prepared for localhost, but you can change it to your server IP if needed
|
||||
ports:
|
||||
- "3333:3333" # Backend port mapping
|
||||
- "${API_EXTERNAL_PORT:-3333}:${API_INTERNAL_PORT:-3333}" # Backend port mapping
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3333/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${API_INTERNAL_PORT:-3333}/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -36,14 +36,14 @@ services:
|
||||
palmr-api:
|
||||
condition: "service_healthy"
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "${APP_EXTERNAL_PORT:-5487}:5487" # Frontend port mapping
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
- API_BASE_URL=http://palmr-api:3333 # Here we use docker's internal network to reference the backend service (can be changed if needed)
|
||||
- API_BASE_URL=http://palmr-api:${API_INTERNAL_PORT:-3333} # Here we use docker's internal network to reference the backend service (can be changed if needed)
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5487"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -56,15 +56,15 @@ services:
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minio_root_user}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioRootPassword}
|
||||
- MINIO_SITE_REGION=sa-east-1
|
||||
command: server /data --console-address ":9001"
|
||||
command: server /data --address ":${MINIO_INTERNAL_API_PORT:-6421}" --console-address ":${MINIO_INTERNAL_CONSOLE_PORT:-6422}"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
- "${MINIO_EXTERNAL_API_PORT:-6421}:${MINIO_INTERNAL_API_PORT:-6421}"
|
||||
- "${MINIO_EXTERNAL_CONSOLE_PORT:-6422}:${MINIO_INTERNAL_CONSOLE_PORT:-6422}"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${MINIO_INTERNAL_API_PORT:-6421}/minio/health/ready"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -76,10 +76,11 @@ services:
|
||||
minio:
|
||||
condition: "service_healthy"
|
||||
restart: "no"
|
||||
# The entrypoint script will create a bucket called "files" and set it to be publicly readable using the MinIO client (mc).
|
||||
entrypoint: >
|
||||
sh -c "
|
||||
sleep 5 &&
|
||||
mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER:-minio_root_user} ${MINIO_ROOT_PASSWORD:-minioRootPassword} &&
|
||||
mc alias set myminio http://minio:${MINIO_INTERNAL_API_PORT:-6421} ${MINIO_ROOT_USER:-minio_root_user} ${MINIO_ROOT_PASSWORD:-minioRootPassword} &&
|
||||
mc mb myminio/files --ignore-existing &&
|
||||
mc anonymous set download myminio/files
|
||||
"
|
||||
@@ -89,10 +90,10 @@ services:
|
||||
container_name: palmr-postgres
|
||||
environment:
|
||||
# PostgreSQL credentials configurable through environment variables
|
||||
# POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB can be set to override defaults
|
||||
- POSTGRESQL_USERNAME=${POSTGRES_USER:-postgres}
|
||||
- POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD:-postgresRootPassword}
|
||||
- POSTGRESQL_DATABASE=${POSTGRES_DB:-palmr_db}
|
||||
# POSTGRESQL_USERNAME, POSTGRESQL_PASSWORD, and POSTGRES_DB can be set to override defaults
|
||||
- POSTGRESQL_USERNAME=${POSTGRESQL_USERNAME:-postgres}
|
||||
- POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD:-postgresRootPassword}
|
||||
- POSTGRESQL_DATABASE=${POSTGRES_DATABASE:-palmr_db}
|
||||
volumes:
|
||||
- postgres_data:/bitnami/postgresql
|
||||
ports:
|
||||
|
Reference in New Issue
Block a user