mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
feat: add Docusaurus documentation setup and deployment workflow (#2017)
* feat: add Docusaurus documentation setup and deployment workflow - Introduced Docusaurus for TorrentPier documentation, including configuration files and initial content structure. - Created a GitHub Actions workflow for automatic deployment of documentation to GitHub Pages upon changes to the 'docs' directory. - Updated .gitignore to exclude Docusaurus build artifacts and cache directories. - Added essential scripts in package.json for local development and building of documentation. - Included initial README and sidebars configuration for documentation navigation. These changes establish a comprehensive documentation framework for TorrentPier, enhancing accessibility and user guidance. * chore: enhance documentation workflow and update GitHub Actions - Added a new script in package.json to start documentation locally. - Updated GitHub Actions workflow to enable concurrent deployments for GitHub Pages and included a step to configure GitHub Pages. These changes improve the documentation development process and streamline deployment to GitHub Pages.
This commit is contained in:
parent
9bfdf62128
commit
0c8ea7974a
29 changed files with 1614 additions and 1 deletions
67
.github/workflows/docs.yml
vendored
Normal file
67
.github/workflows/docs.yml
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
name: Deploy Documentation to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dexter
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Documentation
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./docs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure GitHub Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: ./docs/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build website
|
||||
run: npm run build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./docs/build
|
||||
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -174,3 +174,9 @@ $RECYCLE.BIN/
|
|||
|
||||
# Claude Code
|
||||
CLAUDE.local.md
|
||||
|
||||
# Docusaurus
|
||||
/docs/.docusaurus
|
||||
/docs/.cache-loader
|
||||
/docs/build
|
||||
/docs/node_modules
|
||||
|
|
52
docs/README.md
Normal file
52
docs/README.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# TorrentPier Documentation
|
||||
|
||||
This directory contains the documentation for TorrentPier, built with [Docusaurus](https://docusaurus.io/).
|
||||
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
## Deployment
|
||||
|
||||
The documentation is automatically deployed to GitHub Pages when changes are pushed to the main branch. The deployment is handled by GitHub Actions.
|
||||
|
||||
## Structure
|
||||
|
||||
- `/docs` - Main documentation content
|
||||
- `/blog` - Development blog posts
|
||||
- `/src` - Custom React components and pages
|
||||
- `/static` - Static assets like images
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Create or edit markdown files in the `/docs` directory
|
||||
2. Add new pages to the sidebar by updating `sidebars.ts`
|
||||
3. Test locally with `npm start`
|
||||
4. Submit a pull request
|
||||
|
||||
## Writing Documentation
|
||||
|
||||
- Use clear, concise language
|
||||
- Include code examples where relevant
|
||||
- Add screenshots for UI features
|
||||
- Keep the audience (developers) in mind
|
||||
- Follow the existing structure and style
|
||||
|
||||
## Resources
|
||||
|
||||
- [Docusaurus Documentation](https://docusaurus.io/docs)
|
||||
- [Markdown Guide](https://www.markdownguide.org/)
|
||||
- [MDX Documentation](https://mdxjs.com/)
|
51
docs/blog/2025-06-30-welcome.md
Normal file
51
docs/blog/2025-06-30-welcome.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
slug: welcome
|
||||
title: Welcome to the TorrentPier Blog
|
||||
authors: [exileum]
|
||||
tags: [announcement, laravel, development]
|
||||
---
|
||||
|
||||
# Welcome to the TorrentPier Development Blog
|
||||
|
||||
We're excited to announce the complete rewrite of TorrentPier using modern web technologies. This blog will document our journey, share development updates, and provide insights into the decisions we make along the way.
|
||||
|
||||
## Why a Rewrite?
|
||||
|
||||
The original TorrentPier v2.x served the community well for many years, but technology has evolved significantly. We decided it was time for a complete modernization to:
|
||||
|
||||
- Improve security with modern frameworks
|
||||
- Enhance performance and scalability
|
||||
- Provide a better user experience
|
||||
- Make development and customization easier
|
||||
- Support modern deployment practices
|
||||
|
||||
## What's New?
|
||||
|
||||
The new TorrentPier is built on:
|
||||
|
||||
- **Laravel 12**: The latest version of PHP's most popular framework
|
||||
- **React 19**: For a dynamic, responsive frontend
|
||||
- **TypeScript**: Type-safe code for better reliability
|
||||
- **Inertia.js**: Seamless SPA experience without API complexity
|
||||
- **Tailwind CSS v4**: Modern, utility-first styling
|
||||
|
||||
## What's Next?
|
||||
|
||||
We're actively developing core features:
|
||||
|
||||
1. User authentication and profiles
|
||||
2. Torrent upload and management
|
||||
3. Forum functionality
|
||||
4. Tracker protocol implementation
|
||||
5. Admin panel and moderation tools
|
||||
|
||||
## Get Involved
|
||||
|
||||
This is an open-source project, and we welcome contributions:
|
||||
|
||||
- Check our [GitHub repository](https://github.com/torrentpier/torrentpier)
|
||||
- Read the [documentation](/docs/intro)
|
||||
- Join discussions on GitHub
|
||||
- Submit pull requests
|
||||
|
||||
Stay tuned for more updates as we build the future of TorrentPier!
|
23
docs/blog/authors.yml
Normal file
23
docs/blog/authors.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
torrentpier:
|
||||
name: TorrentPier Team
|
||||
title: Core Development Team
|
||||
url: https://github.com/torrentpier
|
||||
image_url: https://github.com/torrentpier.png
|
||||
socials:
|
||||
github: torrentpier
|
||||
|
||||
exileum:
|
||||
name: Yury Pikhtarev
|
||||
title: Core Development Team
|
||||
url: https://github.com/exileum
|
||||
image_url: https://github.com/exileum.png
|
||||
socials:
|
||||
github: exileum
|
||||
|
||||
belomaxorka:
|
||||
name: Roman Kelesidis
|
||||
title: Core Development Team
|
||||
url: https://github.com/belomaxorka
|
||||
image_url: https://github.com/belomaxorka.png
|
||||
socials:
|
||||
github: belomaxorka
|
14
docs/blog/tags.yml
Normal file
14
docs/blog/tags.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
announcement:
|
||||
label: Announcement
|
||||
permalink: /announcement
|
||||
description: Announcement tag description
|
||||
|
||||
laravel:
|
||||
label: Laravel
|
||||
permalink: /laravel
|
||||
description: Laravel tag description
|
||||
|
||||
development:
|
||||
label: Development
|
||||
permalink: /development
|
||||
description: Development tag description
|
8
docs/docs/architecture/_category_.json
Normal file
8
docs/docs/architecture/_category_.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"label": "Architecture",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Understanding TorrentPier's architecture and design decisions."
|
||||
}
|
||||
}
|
164
docs/docs/architecture/overview.md
Normal file
164
docs/docs/architecture/overview.md
Normal file
|
@ -0,0 +1,164 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Architecture Overview
|
||||
|
||||
:::warning Work in Progress
|
||||
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
|
||||
:::
|
||||
|
||||
TorrentPier follows a modern, scalable architecture built on Laravel's proven patterns and best practices.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
### Backend
|
||||
- **Framework**: Laravel 12
|
||||
- **Language**: PHP 8.4+
|
||||
- **Authentication**: Laravel Sanctum
|
||||
- **Search**: Laravel Scout + Meilisearch
|
||||
- **Monitoring**: Laravel Telescope
|
||||
- **Testing**: Pest PHP
|
||||
|
||||
### Frontend
|
||||
- **Library**: React 19
|
||||
- **Language**: TypeScript
|
||||
- **Routing**: Inertia.js
|
||||
- **Styling**: Tailwind CSS v4
|
||||
- **Components**: shadcn/ui
|
||||
- **Build Tool**: Vite
|
||||
|
||||
## Application Structure
|
||||
|
||||
```
|
||||
torrentpier/
|
||||
├── app/ # Application code
|
||||
│ ├── Http/ # Controllers, Middleware, Requests
|
||||
│ ├── Models/ # Eloquent models
|
||||
│ └── Providers/ # Service providers
|
||||
├── resources/ # Frontend resources
|
||||
│ ├── js/ # React components and pages
|
||||
│ ├── css/ # Stylesheets
|
||||
│ └── views/ # Blade templates
|
||||
├── routes/ # Application routes
|
||||
├── database/ # Migrations, factories, seeders
|
||||
├── config/ # Configuration files
|
||||
├── tests/ # Test suites
|
||||
└── legacy/ # Legacy codebase (reference)
|
||||
```
|
||||
|
||||
## Key Design Patterns
|
||||
|
||||
### 1. Inertia.js Integration
|
||||
|
||||
Inertia.js bridges Laravel and React, providing:
|
||||
- Server-side routing with client-side rendering
|
||||
- Automatic data synchronization
|
||||
- No API development overhead
|
||||
- SEO-friendly SSR support
|
||||
|
||||
### 2. Component-Based Architecture
|
||||
|
||||
Frontend follows a component-based structure:
|
||||
- **Pages**: Full-page components in `resources/js/pages/`
|
||||
- **Layouts**: Reusable layout wrappers
|
||||
- **Components**: Shared UI components using shadcn/ui
|
||||
- **Hooks**: Custom React hooks for common functionality
|
||||
|
||||
### 3. Laravel Best Practices
|
||||
|
||||
- **Repository Pattern**: For complex data operations
|
||||
- **Service Classes**: Business logic separation
|
||||
- **Form Requests**: Input validation
|
||||
- **Resources**: API response transformation
|
||||
- **Policies**: Authorization logic
|
||||
|
||||
## Data Flow
|
||||
|
||||
1. **Request**: Browser sends request to Laravel route
|
||||
2. **Controller**: Processes request, queries data
|
||||
3. **Inertia**: Renders page component with props
|
||||
4. **React**: Renders UI with received data
|
||||
5. **Forms**: Submit via Inertia, maintaining SPA feel
|
||||
|
||||
## Authentication Flow
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
A[User] --> B[Login Page]
|
||||
B --> C[Laravel Auth]
|
||||
C --> D[Session Created]
|
||||
D --> E[Sanctum Token]
|
||||
E --> F[Authenticated Routes]
|
||||
```
|
||||
|
||||
## BitTorrent Integration
|
||||
|
||||
### Tracker Protocol
|
||||
- Announce endpoint: `/announce`
|
||||
- Scrape endpoint: `/scrape`
|
||||
- Peer management via Redis
|
||||
- Stats aggregation with scheduled jobs
|
||||
|
||||
### File Handling
|
||||
- Torrent parsing and validation
|
||||
- Secure file storage
|
||||
- NFO file processing
|
||||
- Screenshot management
|
||||
|
||||
## Performance Optimizations
|
||||
|
||||
### Caching Strategy
|
||||
- **Redis**: Session storage, cache, queues
|
||||
- **Query Caching**: For expensive database queries
|
||||
- **Route Caching**: Production optimization
|
||||
- **View Caching**: Compiled Blade templates
|
||||
|
||||
### Database Optimization
|
||||
- Indexed columns for tracker queries
|
||||
- Eager loading for N+1 prevention
|
||||
- Database query optimization
|
||||
- Connection pooling
|
||||
|
||||
## Security Architecture
|
||||
|
||||
### Application Security
|
||||
- CSRF protection
|
||||
- XSS prevention
|
||||
- SQL injection protection
|
||||
- Rate limiting
|
||||
- Input validation
|
||||
|
||||
### Tracker Security
|
||||
- Passkey authentication
|
||||
- IP binding options
|
||||
- Anti-cheat mechanisms
|
||||
- Ratio enforcement
|
||||
|
||||
## Scalability Considerations
|
||||
|
||||
### Horizontal Scaling
|
||||
- Stateless application design
|
||||
- Redis for shared state
|
||||
- Queue workers for background jobs
|
||||
- CDN for static assets
|
||||
|
||||
### Vertical Scaling
|
||||
- Database read replicas
|
||||
- Caching layers
|
||||
- Optimized queries
|
||||
- Resource monitoring
|
||||
|
||||
## Development Workflow
|
||||
|
||||
1. **Local Development**: Vite dev server + Laravel
|
||||
2. **Testing**: Pest for PHP, Jest for React
|
||||
3. **Building**: Vite production build
|
||||
4. **Deployment**: Zero-downtime deployments
|
||||
|
||||
## Future Considerations
|
||||
|
||||
- GraphQL API implementation
|
||||
- WebSocket real-time updates
|
||||
- Microservice extraction
|
||||
- Container orchestration
|
8
docs/docs/development/_category_.json
Normal file
8
docs/docs/development/_category_.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"label": "Development",
|
||||
"position": 4,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Development guides and best practices for TorrentPier."
|
||||
}
|
||||
}
|
291
docs/docs/development/setup.md
Normal file
291
docs/docs/development/setup.md
Normal file
|
@ -0,0 +1,291 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Development Setup
|
||||
|
||||
:::warning Work in Progress
|
||||
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
|
||||
:::
|
||||
|
||||
This guide will help you set up a local development environment for TorrentPier.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Git
|
||||
- PHP 8.4+
|
||||
- Composer
|
||||
- Node.js 18+
|
||||
- MySQL/PostgreSQL
|
||||
- Redis (optional)
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Clone and Install
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/torrentpier/torrentpier.git
|
||||
cd dexter
|
||||
|
||||
# Install dependencies
|
||||
composer install
|
||||
npm install
|
||||
|
||||
# Copy environment file
|
||||
cp .env.example .env
|
||||
|
||||
# Generate application key
|
||||
php artisan key:generate
|
||||
```
|
||||
|
||||
### 2. Database Setup
|
||||
|
||||
```bash
|
||||
# Create database
|
||||
mysql -u root -p -e "CREATE DATABASE torrentpier"
|
||||
|
||||
# Run migrations
|
||||
php artisan migrate
|
||||
|
||||
# Seed with sample data (optional)
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### 3. Start Development Server
|
||||
|
||||
```bash
|
||||
# Start Laravel and Vite development servers
|
||||
composer dev
|
||||
```
|
||||
|
||||
This runs both the PHP server and Vite dev server concurrently.
|
||||
|
||||
## Development Tools
|
||||
|
||||
### Laravel Telescope
|
||||
|
||||
Telescope is pre-installed for debugging:
|
||||
|
||||
```bash
|
||||
# Access at http://localhost:8000/telescope
|
||||
```
|
||||
|
||||
### Code Quality Tools
|
||||
|
||||
```bash
|
||||
# PHP code style
|
||||
./vendor/bin/pint
|
||||
|
||||
# JavaScript/TypeScript linting
|
||||
npm run lint
|
||||
|
||||
# Format code
|
||||
npm run format
|
||||
|
||||
# Type checking
|
||||
npm run types
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
composer test
|
||||
|
||||
# Run specific test
|
||||
php artisan test --filter=ExampleTest
|
||||
|
||||
# Run with coverage
|
||||
php artisan test --coverage
|
||||
```
|
||||
|
||||
## IDE Setup
|
||||
|
||||
### VS Code
|
||||
|
||||
Recommended extensions:
|
||||
- Laravel Extension Pack
|
||||
- Inertia.js
|
||||
- Tailwind CSS IntelliSense
|
||||
- ESLint
|
||||
- Prettier
|
||||
|
||||
### PHPStorm
|
||||
|
||||
- Install Laravel plugin
|
||||
- Configure code style to use Pint
|
||||
- Set up Pest integration
|
||||
|
||||
## Working with Artisan
|
||||
|
||||
### Always Use Artisan Commands
|
||||
|
||||
```bash
|
||||
# Generate model with all resources
|
||||
php artisan make:model Post --all
|
||||
|
||||
# Create controller
|
||||
php artisan make:controller PostController --resource
|
||||
|
||||
# Create React page component manually in resources/js/pages/
|
||||
```
|
||||
|
||||
### Useful Commands
|
||||
|
||||
```bash
|
||||
# Clear all caches
|
||||
php artisan optimize:clear
|
||||
|
||||
# Show routes
|
||||
php artisan route:list
|
||||
|
||||
# Show model details
|
||||
php artisan model:show User
|
||||
|
||||
# Interactive tinker shell
|
||||
php artisan tinker
|
||||
```
|
||||
|
||||
## Frontend Development
|
||||
|
||||
### Creating Pages
|
||||
|
||||
1. Create page component in `resources/js/pages/`
|
||||
2. Define route in `routes/web.php`
|
||||
3. Return Inertia response from controller
|
||||
|
||||
Example:
|
||||
|
||||
```php
|
||||
// routes/web.php
|
||||
Route::get('/posts', [PostController::class, 'index'])->name('posts.index');
|
||||
|
||||
// app/Http/Controllers/PostController.php
|
||||
public function index()
|
||||
{
|
||||
return Inertia::render('Posts/Index', [
|
||||
'posts' => Post::paginate()
|
||||
]);
|
||||
}
|
||||
```
|
||||
|
||||
```tsx
|
||||
// resources/js/pages/Posts/Index.tsx
|
||||
import { Head } from '@inertiajs/react';
|
||||
|
||||
export default function Index({ posts }) {
|
||||
return (
|
||||
<>
|
||||
<Head title="Posts" />
|
||||
<div>
|
||||
{/* Your component */}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
### Using shadcn/ui Components
|
||||
|
||||
```tsx
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card } from '@/components/ui/card';
|
||||
|
||||
export default function MyComponent() {
|
||||
return (
|
||||
<Card>
|
||||
<Button>Click me</Button>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Database Development
|
||||
|
||||
### Migrations
|
||||
|
||||
```bash
|
||||
# Create migration
|
||||
php artisan make:migration create_posts_table
|
||||
|
||||
# Run migrations
|
||||
php artisan migrate
|
||||
|
||||
# Rollback
|
||||
php artisan migrate:rollback
|
||||
|
||||
# Fresh migration with seed
|
||||
php artisan migrate:fresh --seed
|
||||
```
|
||||
|
||||
### Working with Models
|
||||
|
||||
```php
|
||||
// Use artisan to generate models
|
||||
php artisan make:model Post -mfsc
|
||||
|
||||
// This creates:
|
||||
// - Model: app/Models/Post.php
|
||||
// - Migration: database/migrations/xxx_create_posts_table.php
|
||||
// - Factory: database/factories/PostFactory.php
|
||||
// - Seeder: database/seeders/PostSeeder.php
|
||||
// - Controller: app/Http/Controllers/PostController.php
|
||||
```
|
||||
|
||||
## Git Workflow
|
||||
|
||||
### Branching Strategy
|
||||
|
||||
```bash
|
||||
# Create feature branch
|
||||
git checkout -b feature/user-profile
|
||||
|
||||
# Create bugfix branch
|
||||
git checkout -b bugfix/login-issue
|
||||
|
||||
# Push branch
|
||||
git push -u origin feature/user-profile
|
||||
```
|
||||
|
||||
### Commit Messages
|
||||
|
||||
Follow conventional commits:
|
||||
- `feat:` New feature
|
||||
- `fix:` Bug fix
|
||||
- `docs:` Documentation
|
||||
- `style:` Code style
|
||||
- `refactor:` Code refactoring
|
||||
- `test:` Tests
|
||||
- `chore:` Maintenance
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **npm install fails**
|
||||
```bash
|
||||
rm -rf node_modules package-lock.json
|
||||
npm install
|
||||
```
|
||||
|
||||
2. **Composer memory limit**
|
||||
```bash
|
||||
COMPOSER_MEMORY_LIMIT=-1 composer install
|
||||
```
|
||||
|
||||
3. **Permission errors**
|
||||
```bash
|
||||
chmod -R 775 storage bootstrap/cache
|
||||
```
|
||||
|
||||
4. **Cache issues**
|
||||
```bash
|
||||
php artisan optimize:clear
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Review [Coding Standards](/docs/development/coding-standards)
|
||||
- Learn about [Testing](/docs/development/testing)
|
||||
- Understand [API Development](/docs/api/overview)
|
8
docs/docs/getting-started/_category_.json
Normal file
8
docs/docs/getting-started/_category_.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"label": "Getting Started",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Everything you need to get up and running with TorrentPier."
|
||||
}
|
||||
}
|
198
docs/docs/getting-started/installation.md
Normal file
198
docs/docs/getting-started/installation.md
Normal file
|
@ -0,0 +1,198 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
:::warning Work in Progress
|
||||
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
|
||||
:::
|
||||
|
||||
This guide will help you install and set up TorrentPier on your server.
|
||||
|
||||
## Requirements
|
||||
|
||||
Before installing TorrentPier, ensure your server meets these requirements:
|
||||
|
||||
- **PHP** 8.4 or higher
|
||||
- **MySQL** 8.0+ / PostgreSQL 15+ / SQLite 3.8.8+ / SQL Server 2017+
|
||||
- **Node.js** 18.0 or higher
|
||||
- **Composer** 2.0 or higher
|
||||
- **Redis** (optional, for caching and queues)
|
||||
|
||||
### PHP Extensions
|
||||
|
||||
Ensure the following PHP extensions are installed:
|
||||
- BCMath
|
||||
- Ctype
|
||||
- cURL
|
||||
- DOM
|
||||
- Fileinfo
|
||||
- JSON
|
||||
- Mbstring
|
||||
- OpenSSL
|
||||
- PCRE
|
||||
- PDO
|
||||
- Tokenizer
|
||||
- XML
|
||||
|
||||
## Installation Steps
|
||||
|
||||
### 1. Clone the Repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/torrentpier/torrentpier.git torrentpier
|
||||
cd torrentpier
|
||||
```
|
||||
|
||||
### 2. Install Dependencies
|
||||
|
||||
Install PHP dependencies:
|
||||
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
|
||||
Install JavaScript dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
### 3. Environment Configuration
|
||||
|
||||
Copy the example environment file:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
Generate application key:
|
||||
|
||||
```bash
|
||||
php artisan key:generate
|
||||
```
|
||||
|
||||
### 4. Configure Database
|
||||
|
||||
Edit your `.env` file with your database credentials:
|
||||
|
||||
```env
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=torrentpier
|
||||
DB_USERNAME=your_username
|
||||
DB_PASSWORD=your_password
|
||||
```
|
||||
|
||||
### 5. Run Migrations
|
||||
|
||||
Create the database tables:
|
||||
|
||||
```bash
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
Optionally, seed the database with sample data:
|
||||
|
||||
```bash
|
||||
php artisan db:seed
|
||||
```
|
||||
|
||||
### 6. Build Frontend Assets
|
||||
|
||||
For development:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
For production:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
### 7. Configure Web Server
|
||||
|
||||
#### Apache
|
||||
|
||||
Ensure `mod_rewrite` is enabled and point your document root to the `public` directory.
|
||||
|
||||
#### Nginx
|
||||
|
||||
Example configuration:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name torrentpier.local;
|
||||
root /path/to/torrentpier/public;
|
||||
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Post-Installation
|
||||
|
||||
### Set Up Cron Jobs
|
||||
|
||||
Add the Laravel scheduler to your crontab:
|
||||
|
||||
```bash
|
||||
* * * * * cd /path/to/torrentpier && php artisan schedule:run >> /dev/null 2>&1
|
||||
```
|
||||
|
||||
### Configure Queue Workers
|
||||
|
||||
If using queues, set up a supervisor configuration:
|
||||
|
||||
```ini
|
||||
[program:torrentpier-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /path/to/torrentpier/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=www-data
|
||||
numprocs=8
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/path/to/torrentpier/storage/logs/worker.log
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Permission Issues
|
||||
|
||||
Ensure proper permissions for storage and cache directories:
|
||||
|
||||
```bash
|
||||
chmod -R 775 storage bootstrap/cache
|
||||
chown -R www-data:www-data storage bootstrap/cache
|
||||
```
|
||||
|
||||
### Clear Caches
|
||||
|
||||
If you encounter issues, try clearing all caches:
|
||||
|
||||
```bash
|
||||
php artisan optimize:clear
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Configure [Application Settings](/docs/getting-started/configuration)
|
||||
- Set up [Email Configuration](/docs/getting-started/email)
|
||||
- Review [Security Best Practices](/docs/getting-started/security)
|
41
docs/docs/intro.md
Normal file
41
docs/docs/intro.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Welcome to TorrentPier
|
||||
|
||||
:::warning Work in Progress
|
||||
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
|
||||
:::
|
||||
|
||||
TorrentPier is a modern, Laravel-based BitTorrent tracker and open-source software that allows you to run your own private or public torrent community. This is a complete rewrite of the original TorrentPier v2.x, built from the ground up using modern web technologies and best practices. This documentation will guide you through the architecture, features, and development process of the new TorrentPier.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Modern Tech Stack**: Built with Laravel 12, React 19, and TypeScript
|
||||
- **Real-time Updates**: Powered by Inertia.js for seamless SPA-like experience
|
||||
- **Beautiful UI**: Using Tailwind CSS v4 and shadcn/ui components
|
||||
- **Enhanced Security**: Laravel Sanctum for authentication
|
||||
- **Developer Tools**: Laravel Telescope for debugging and monitoring
|
||||
- **Full-text Search**: Laravel Scout with Meilisearch integration
|
||||
- **Extensible**: Clean architecture designed for customization
|
||||
|
||||
## Project Status
|
||||
|
||||
This is an active rewrite of TorrentPier v2.x. The legacy codebase is maintained in the `/legacy` directory for reference while we build the new system using Laravel standards and modern development practices.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get started with TorrentPier development:
|
||||
|
||||
1. Check out the [Installation Guide](/docs/getting-started/installation)
|
||||
2. Review the [Architecture Overview](/docs/architecture/overview)
|
||||
3. Explore the [Development Setup](/docs/development/setup)
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions! Please see our [Contributing Guide](/docs/contributing) for details on how to get involved.
|
||||
|
||||
## License
|
||||
|
||||
TorrentPier is open-source software licensed under the MIT license.
|
8
docs/docs/migration/_category_.json
Normal file
8
docs/docs/migration/_category_.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"label": "Migration Guide",
|
||||
"position": 5,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Guides for migrating from TorrentPier v2.x to the new Laravel version."
|
||||
}
|
||||
}
|
219
docs/docs/migration/from-v2.md
Normal file
219
docs/docs/migration/from-v2.md
Normal file
|
@ -0,0 +1,219 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Migrating from TorrentPier v2.x
|
||||
|
||||
:::warning Work in Progress
|
||||
This documentation is currently under development and not yet complete. Some sections may be incomplete or subject to change as the project evolves.
|
||||
:::
|
||||
|
||||
This guide helps you migrate from the legacy TorrentPier v2.x to the new Laravel-based version.
|
||||
|
||||
## Overview
|
||||
|
||||
The new TorrentPier is a complete rewrite with:
|
||||
- Modern architecture
|
||||
- Improved performance
|
||||
- Better security
|
||||
- Enhanced user experience
|
||||
|
||||
## Pre-Migration Checklist
|
||||
|
||||
Before starting migration:
|
||||
|
||||
1. **Backup Everything**
|
||||
- Full database backup
|
||||
- All uploaded files (torrents, images)
|
||||
- Configuration files
|
||||
- Custom modifications
|
||||
|
||||
2. **Review Requirements**
|
||||
- PHP 8.4+ (vs PHP 7.0+ in v2.x)
|
||||
- MySQL 8.0+ recommended
|
||||
- More server resources needed
|
||||
|
||||
3. **Plan Downtime**
|
||||
- Migration can take hours for large sites
|
||||
- Inform your users
|
||||
- Choose low-traffic period
|
||||
|
||||
## Migration Steps
|
||||
|
||||
### Step 1: Prepare New Installation
|
||||
|
||||
```bash
|
||||
# Install new TorrentPier
|
||||
git clone https://github.com/torrentpier/torrentpier.git torrentpier
|
||||
cd torrentpier
|
||||
composer install
|
||||
npm install && npm run build
|
||||
```
|
||||
|
||||
### Step 2: Configure Environment
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
```
|
||||
|
||||
Edit `.env` with your settings:
|
||||
```env
|
||||
DB_DATABASE=torrentpier
|
||||
LEGACY_DB_DATABASE=torrentpier_old
|
||||
```
|
||||
|
||||
### Step 3: Run Migration Command
|
||||
|
||||
```bash
|
||||
# This command will guide you through the migration
|
||||
php artisan torrentpier:migrate
|
||||
```
|
||||
|
||||
The migration tool will:
|
||||
- Import users and profiles
|
||||
- Convert forum structure
|
||||
- Migrate topics and posts
|
||||
- Import torrents and peers
|
||||
- Transfer user statistics
|
||||
|
||||
### Step 4: Migrate Files
|
||||
|
||||
```bash
|
||||
# Copy torrent files
|
||||
cp -r /path/to/old/data/torrent_files /path/to/new/storage/app/torrents
|
||||
|
||||
# Copy user avatars
|
||||
cp -r /path/to/old/data/avatars /path/to/new/storage/app/avatars
|
||||
|
||||
# Copy attachments
|
||||
cp -r /path/to/old/data/attachments /path/to/new/storage/app/attachments
|
||||
```
|
||||
|
||||
### Step 5: Update Configuration
|
||||
|
||||
Map old settings to new:
|
||||
|
||||
| Old Setting | New Setting | Notes |
|
||||
|------------|-------------|-------|
|
||||
| `$bb_cfg['bt_announce_url']` | `TRACKER_ANNOUNCE_URL` | In .env file |
|
||||
| `$bb_cfg['torrent_pass']` | Auto-generated | More secure |
|
||||
| `$bb_cfg['ratio_enabled']` | `TRACKER_RATIO_ENABLED` | Boolean |
|
||||
|
||||
### Step 6: Test Migration
|
||||
|
||||
```bash
|
||||
# Run in staging environment first
|
||||
php artisan migrate:status
|
||||
php artisan torrentpier:verify
|
||||
```
|
||||
|
||||
## Data Mapping
|
||||
|
||||
### Users Table
|
||||
|
||||
| v2.x Column | New Column | Changes |
|
||||
|-------------|------------|---------|
|
||||
| `user_id` | `id` | Same data |
|
||||
| `username` | `username` | Validated |
|
||||
| `user_password` | `password` | Re-hashed |
|
||||
| `user_email` | `email` | Verified |
|
||||
|
||||
### Torrents Table
|
||||
|
||||
| v2.x Column | New Column | Changes |
|
||||
|-------------|------------|---------|
|
||||
| `topic_id` | `id` | New IDs |
|
||||
| `info_hash` | `info_hash` | Same |
|
||||
| `size` | `size` | Bigint |
|
||||
|
||||
## Post-Migration
|
||||
|
||||
### 1. Verify Data Integrity
|
||||
|
||||
```bash
|
||||
# Check user counts
|
||||
php artisan torrentpier:check users
|
||||
|
||||
# Check torrent counts
|
||||
php artisan torrentpier:check torrents
|
||||
|
||||
# Verify statistics
|
||||
php artisan torrentpier:check stats
|
||||
```
|
||||
|
||||
### 2. Update DNS
|
||||
|
||||
Point your domain to the new installation.
|
||||
|
||||
### 3. Monitor Performance
|
||||
|
||||
- Watch error logs
|
||||
- Monitor tracker announces
|
||||
- Check user reports
|
||||
|
||||
### 4. Clean Up
|
||||
|
||||
After successful migration:
|
||||
```bash
|
||||
# Remove migration flags
|
||||
php artisan cache:clear
|
||||
|
||||
# Optimize
|
||||
php artisan optimize
|
||||
```
|
||||
|
||||
## Rollback Plan
|
||||
|
||||
If issues occur:
|
||||
|
||||
1. Stop new installation
|
||||
2. Restore DNS to old server
|
||||
3. Investigate issues
|
||||
4. Fix and retry
|
||||
|
||||
Keep old installation running until confident.
|
||||
|
||||
## Common Issues
|
||||
|
||||
### Password Reset Required
|
||||
|
||||
Users must reset passwords due to improved hashing.
|
||||
|
||||
### Missing Features
|
||||
|
||||
Some v2.x features may be pending:
|
||||
- Check roadmap
|
||||
- Request features
|
||||
- Contribute code
|
||||
|
||||
### Performance Differences
|
||||
|
||||
New version may need tuning:
|
||||
- Configure Redis
|
||||
- Optimize database
|
||||
- Use queue workers
|
||||
|
||||
## Custom Modifications
|
||||
|
||||
If you had custom mods in v2.x:
|
||||
|
||||
1. Document modifications
|
||||
2. Evaluate if still needed
|
||||
3. Reimplement using Laravel patterns
|
||||
4. Submit as pull requests
|
||||
|
||||
## Getting Help
|
||||
|
||||
- GitHub Issues
|
||||
- Community Forum
|
||||
- Documentation
|
||||
- Discord Channel
|
||||
|
||||
## Next Steps
|
||||
|
||||
After successful migration:
|
||||
- Configure new features
|
||||
- Train moderators
|
||||
- Update user guides
|
||||
- Monitor feedback
|
145
docs/docusaurus.config.ts
Normal file
145
docs/docusaurus.config.ts
Normal file
|
@ -0,0 +1,145 @@
|
|||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
import type {Config} from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
const config: Config = {
|
||||
title: 'TorrentPier Documentation',
|
||||
tagline: 'Modern Laravel-based BitTorrent tracker',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
|
||||
future: {
|
||||
v4: true, // Improve compatibility with the upcoming Docusaurus v4
|
||||
},
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://docs.torrentpier.com',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'torrentpier', // Usually your GitHub org/user name.
|
||||
projectName: 'torrentpier.github.io', // Usually your repo name.
|
||||
trailingSlash: false,
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
// Even if you don't use internationalization, you can use this field to set
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: './sidebars.ts',
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/torrentpier/torrentpier/tree/dexter/docs/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
feedOptions: {
|
||||
type: ['rss', 'atom'],
|
||||
xslt: true,
|
||||
},
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/torrentpier/torrentpier/tree/dexter/docs/',
|
||||
// Useful options to enforce blogging best practices
|
||||
onInlineTags: 'warn',
|
||||
onInlineAuthors: 'warn',
|
||||
onUntruncatedBlogPosts: 'warn',
|
||||
},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
// Replace with your project's social card
|
||||
image: 'img/social-card.jpg',
|
||||
navbar: {
|
||||
title: 'TorrentPier',
|
||||
logo: {
|
||||
alt: 'TorrentPier Logo',
|
||||
src: 'img/logo.svg',
|
||||
},
|
||||
items: [
|
||||
{to: '/blog/welcome', label: 'Blog', position: 'left'},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'tutorialSidebar',
|
||||
position: 'left',
|
||||
label: 'Documentation',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/torrentpier/torrentpier',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Docs',
|
||||
items: [
|
||||
{
|
||||
label: 'Getting Started',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Discussions',
|
||||
href: 'https://github.com/torrentpier/torrentpier/discussions',
|
||||
},
|
||||
{
|
||||
label: 'Issues',
|
||||
href: 'https://github.com/torrentpier/torrentpier/issues',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Blog',
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/torrentpier/torrentpier',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} TorrentPier. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
};
|
||||
|
||||
export default config;
|
47
docs/package.json
Normal file
47
docs/package.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "docs",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.8.1",
|
||||
"@docusaurus/preset-classic": "3.8.1",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "3.8.1",
|
||||
"@docusaurus/tsconfig": "3.8.1",
|
||||
"@docusaurus/types": "3.8.1",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 3 chrome version",
|
||||
"last 3 firefox version",
|
||||
"last 5 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
33
docs/sidebars.ts
Normal file
33
docs/sidebars.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
const sidebars: SidebarsConfig = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
export default sidebars;
|
71
docs/src/components/HomepageFeatures/index.tsx
Normal file
71
docs/src/components/HomepageFeatures/index.tsx
Normal file
|
@ -0,0 +1,71 @@
|
|||
import type {ReactNode} from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
type FeatureItem = {
|
||||
title: string;
|
||||
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||
description: ReactNode;
|
||||
};
|
||||
|
||||
const FeatureList: FeatureItem[] = [
|
||||
{
|
||||
title: 'Modern Architecture',
|
||||
Svg: require('@site/static/img/logo.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Built with Laravel 12 and React 19, TorrentPier leverages the latest
|
||||
web technologies for performance, security, and developer experience.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Feature Rich',
|
||||
Svg: require('@site/static/img/logo.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Complete BitTorrent tracker with user management, forums, statistics,
|
||||
anti-cheat protection, and extensive moderation tools out of the box.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Easy to Customize',
|
||||
Svg: require('@site/static/img/logo.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Clean codebase following Laravel best practices. Extend functionality
|
||||
with plugins, themes, and custom modifications easily.
|
||||
</>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
function Feature({title, Svg, description}: FeatureItem) {
|
||||
return (
|
||||
<div className={clsx('col col--4')}>
|
||||
<div className="text--center">
|
||||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures(): ReactNode {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{FeatureList.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
11
docs/src/components/HomepageFeatures/styles.module.css
Normal file
11
docs/src/components/HomepageFeatures/styles.module.css
Normal file
|
@ -0,0 +1,11 @@
|
|||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureSvg {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
34
docs/src/css/custom.css
Normal file
34
docs/src/css/custom.css
Normal file
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #2563eb;
|
||||
--ifm-color-primary-dark: #1d4ed8;
|
||||
--ifm-color-primary-darker: #1e40af;
|
||||
--ifm-color-primary-darkest: #1e3a8a;
|
||||
--ifm-color-primary-light: #3b82f6;
|
||||
--ifm-color-primary-lighter: #60a5fa;
|
||||
--ifm-color-primary-lightest: #93bbfc;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #60a5fa;
|
||||
--ifm-color-primary-dark: #3b82f6;
|
||||
--ifm-color-primary-darker: #2563eb;
|
||||
--ifm-color-primary-darkest: #1d4ed8;
|
||||
--ifm-color-primary-light: #93bbfc;
|
||||
--ifm-color-primary-lighter: #a5c8fd;
|
||||
--ifm-color-primary-lightest: #dbeafe;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.navbar__logo {
|
||||
height: 2.5rem;
|
||||
}
|
23
docs/src/pages/index.module.css
Normal file
23
docs/src/pages/index.module.css
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
44
docs/src/pages/index.tsx
Normal file
44
docs/src/pages/index.tsx
Normal file
|
@ -0,0 +1,44 @@
|
|||
import type {ReactNode} from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import Layout from '@theme/Layout';
|
||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||
import Heading from '@theme/Heading';
|
||||
|
||||
import styles from './index.module.css';
|
||||
|
||||
function HomepageHeader() {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<Heading as="h1" className="hero__title">
|
||||
{siteConfig.title}
|
||||
</Heading>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="/docs/intro">
|
||||
Get Started →
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home(): ReactNode {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={`${siteConfig.title} - Modern BitTorrent Tracker`}
|
||||
description="TorrentPier is a modern, Laravel-based BitTorrent tracker built from the ground up with cutting-edge technologies.">
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
0
docs/static/.nojekyll
vendored
Normal file
0
docs/static/.nojekyll
vendored
Normal file
BIN
docs/static/img/favicon.ico
vendored
Normal file
BIN
docs/static/img/favicon.ico
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
38
docs/static/img/logo.svg
vendored
Normal file
38
docs/static/img/logo.svg
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="603px" height="685px" viewBox="0 0 603 685" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>hexagon/logos/blue/logos-hexagon-blue</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<linearGradient x1="0%" y1="0%" x2="98.8868215%" y2="97.9173437%" id="linearGradient-1">
|
||||
<stop stop-color="#FFF690" offset="0%"></stop>
|
||||
<stop stop-color="#F73265" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="3.31094268%" y1="3.27848249%" x2="96.3504029%" y2="95.405792%" id="linearGradient-2">
|
||||
<stop stop-color="#90F1FF" offset="0%"></stop>
|
||||
<stop stop-color="#5889E2" offset="63.1111018%"></stop>
|
||||
<stop stop-color="#3255F7" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<path d="M299.000683,3.7151298 L560.496431,154.769267 L560.496431,154.769267 C568.228676,159.235832 572.991495,167.487448 572.991495,176.417052 L572.991495,478.548125 L572.991495,478.548125 C572.991495,487.477729 568.228676,495.729345 560.496431,500.19591 L299.000683,651.250047 L299.000683,651.250047 C291.263148,655.719667 281.728347,655.719667 273.990812,651.250047 L12.4950645,500.19591 L12.4950645,500.19591 C4.76281902,495.729345 2.34479103e-13,487.477729 2.13162821e-13,478.548125 L8.52651283e-14,176.417052 L1.13686838e-13,176.417052 C9.23705556e-14,167.487448 4.76281902,159.235832 12.4950645,154.769267 L273.990812,3.7151298 L273.990812,3.7151298 C281.728347,-0.754490431 291.263148,-0.754490431 299.000683,3.7151298 Z" id="path-3"></path>
|
||||
<linearGradient x1="9.43044958%" y1="-1.96493998%" x2="92.6401197%" y2="103.463939%" id="linearGradient-5">
|
||||
<stop stop-color="#6B6FF6" offset="0%"></stop>
|
||||
<stop stop-color="#463ECE" offset="63.6965346%"></stop>
|
||||
<stop stop-color="#2525B1" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Logos-hexagon-" transform="translate(-1394.000000, -1179.000000)">
|
||||
<g id="blue-hex" transform="translate(1409.000000, 1194.000000)">
|
||||
<mask id="mask-4" fill="white">
|
||||
<use xlink:href="#path-3"></use>
|
||||
</mask>
|
||||
<use id="hexagon" fill="url(#linearGradient-2)" xlink:href="#path-3"></use>
|
||||
<path d="M35.6474524,252.011052 C57.5792716,248.936263 73.5006627,246.936786 83.4116256,246.012623 C85.3483447,245.83203 93.5371578,260.863118 107.978065,291.105887 C105.585122,265.157924 100.947006,240.335538 94.0637153,216.638728 C87.180425,192.941918 79.3422018,173.038673 70.5490457,156.928991 C87.4778221,169.993303 102.28373,184.042325 114.966768,199.076057 C133.991326,221.626655 146.215857,240.097062 150.524568,239.179957 C174.371981,234.104053 288.708722,205.850827 493.534794,154.420279 L493.534793,154.420279 C494.494688,154.179256 495.486516,154.676533 495.867628,155.589903 L619.500024,451.886805 L602.369475,479.569058 C564.419303,575.284459 544.273883,629.355903 541.933213,641.783391 C539.592543,654.210878 545.635807,675.013029 560.063006,704.189842 C523.018243,685.238792 495.212531,669.468619 476.645872,656.879326 C458.079212,644.290032 435.741013,626.059666 409.631273,602.188228 C405.966733,591.806549 403.394451,583.110518 401.914426,576.100135 C400.501307,569.406665 398.360528,559.192058 395.492088,545.456313 L395.492088,545.456313 C395.226816,544.186041 394.478074,543.06866 393.404087,542.340296 C385.443102,536.941267 379.706378,533.394853 376.193916,531.701054 C373.020556,530.17078 364.938681,524.983896 345.087223,519.981246 C332.411458,516.7869 323.406519,516.652869 318.072405,519.579152 L318.072405,519.579152 C317.640435,519.81613 317.31114,520.20422 317.147659,520.669012 L308.992849,543.853801 L308.992849,543.853801 C308.698801,544.689805 307.889655,545.232614 307.004588,545.18761 C270.042109,543.308142 242.155663,543.424767 223.345249,545.537486 C219.109154,546.013269 202.688596,544.667744 174.083243,546.743522 C155.013007,548.127375 138.07571,549.786593 123.271353,551.721178 L118.809238,561.731591 L77.0200202,537.740979 L87.8210762,514.452203 L87.8210762,514.452203 C88.518817,512.947764 90.1765855,512.139506 91.7915654,512.51636 L119.138093,518.897647 C136.551056,515.564583 152.595231,512.671095 167.270617,510.217183 C181.946003,507.763271 199.64439,505.507123 220.365777,503.448739 C215.316545,482.887324 215.229057,462.529137 220.103312,442.374177 C224.977567,422.219217 231.315081,398.523411 239.115852,371.286759 C221.621355,394.225102 210.65524,413.24527 206.217505,428.347263 C202.145687,442.20401 199.958233,452.962045 199.655142,460.621369 L199.655142,460.621369 C199.611622,461.721142 198.687679,462.579072 197.587701,462.541097 L106.237337,459.387391 L106.237337,459.387391 C105.329728,459.356058 104.557159,458.71715 104.356016,457.831555 C93.9445572,411.991836 84.8381737,377.818415 77.0368653,355.311293 C69.2916535,332.966011 54.9838285,299.475177 34.1133904,254.83879 L34.1133901,254.83879 C33.6455452,253.838192 34.0774264,252.647785 35.0780239,252.17994 C35.2583697,252.095616 35.4502951,252.038693 35.6474524,252.011052 Z" id="Combined-Shape-Copy" fill="url(#linearGradient-5)" mask="url(#mask-4)"></path>
|
||||
<path d="M116.582959,519.883342 C119.761882,522.308731 122.567273,526.175894 124.999134,531.484832 C127.430996,536.79377 128.909309,542.311044 129.434074,548.036655 C129.73578,539.570689 129.449088,533.143889 128.573997,528.756255 C127.698906,524.368621 126.05691,520.474513 123.648009,517.07393 L116.582959,519.883342 Z" id="sh-hooves" fill="#2C21A0" mask="url(#mask-4)" transform="translate(123.066530, 532.555292) rotate(11.000000) translate(-123.066530, -532.555292) "></path>
|
||||
<path d="M316.569498,522.22129 C323.489134,496.262444 328.890477,477.943871 332.773526,467.265572 C336.656575,456.587272 343.082322,442.415045 352.050767,424.74889 C343.258067,449.09874 337.094046,469.65694 333.558704,486.423491 C330.023362,503.190043 328.114151,513.536824 327.831072,517.463836 C324.951591,517.671974 322.888557,518.039353 321.641973,518.565973 C320.395388,519.092593 318.704563,520.311032 316.569498,522.22129 Z" id="sh-legs" fill="#2C21A0" mask="url(#mask-4)"></path>
|
||||
<path d="M396.438203,586.255751 C405.641322,559.576572 412.845211,539.870761 418.049868,527.138317 C419.711645,523.07302 421.349402,519.645761 422.963139,516.85654 L426.467276,521.486323 C425.843333,523.530421 425.297768,525.226927 424.83058,526.575841 C421.646838,535.768287 419.216279,548.401403 417.538904,564.475188 C412.769203,567.026606 409.254076,569.469009 406.993523,571.802396 C404.73297,574.135784 401.21453,578.953569 396.438203,586.255751 Z" id="sh-belly" fill="#2C21A0" mask="url(#mask-4)" transform="translate(411.452740, 551.556145) rotate(97.000000) translate(-411.452740, -551.556145) "></path>
|
||||
</g>
|
||||
<g id="NAME" transform="translate(350.000000, -8.000000)"></g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7 KiB |
BIN
docs/static/img/social-card.jpg
vendored
Normal file
BIN
docs/static/img/social-card.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
8
docs/tsconfig.json
Normal file
8
docs/tsconfig.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
// This file is not used in compilation. It is here just for a nice editor experience.
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
},
|
||||
"exclude": [".docusaurus", "build"]
|
||||
}
|
|
@ -9,7 +9,8 @@
|
|||
"format": "prettier --write resources/",
|
||||
"format:check": "prettier --check resources/",
|
||||
"lint": "eslint . --fix",
|
||||
"types": "tsc --noEmit"
|
||||
"types": "tsc --noEmit",
|
||||
"docs": "cd docs && npm run start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue