Skip to content

Simplify the process of installing mods on dedicated servers with pz packs.

Notifications You must be signed in to change notification settings

Greens-Organization/pz-packs

Repository files navigation

Monorepo Template

PZ Packs

Hello, Survivor! 🧟‍♂️

Welcome to PZ Packs, your ultimate toolkit for the apocalypse. Whether you need a complex modpack or a quick server configuration, we’ve got you covered.

Streamline your setup so you can focus on what matters: surviving the Knox Event.

🚀 Main Technologies

Name Description Docs
Runtime & Build Tools
Bun High-performance JavaScript/TypeScript runtime Link
Turbo Build system for monorepos Link
Frontend
React Library for user interfaces Link
TanStack Router Type-safe routing Link
TanStack Query Server state management Link
Vite Build tool and dev server Link
Tailwind CSS Utility-first CSS framework Link
Backend
Elysia Fast TypeScript web framework Link
Better Auth Authentication system Link
Database
Drizzle ORM TypeScript ORM for PostgreSQL Link
PostgreSQL Relational database Link
Redis Cache and in-memory storage Link
DevOps & Deploy
Vercel Frontend deployment Link
Fly.io Backend deployment Link
GitHub Actions CI/CD Link
Code Quality
Biome Linter and formatter Link
TypeScript JavaScript superset with types Link

📦 Project Structure

monorepo-template/
├── apps/
│   ├── api/          # Backend API (Elysia + Bun)
│   └── web/          # Frontend (React + Vite)
├── packages/
│   ├── auth/         # Authentication (Better Auth)
│   ├── cache/         # Cache (Redis + BullMQ)
│   ├── database/      # Database (Drizzle + PostgreSQL)
│   ├── design-system/ # Shared UI components
│   ├── linter/        # Linting configuration
│   ├── tsconfig/      # TypeScript configurations
│   └── validation/    # Validation schemas (Zod) [deprecated]
└── scripts/           # Utility scripts

🛠️ How to Use

This project is a template. To create a new repository from this template:

  1. Click the "Use this template" button on GitHub
  2. Follow the instructions to create your repository
  3. Clone the created repository
  4. Configure environment variables (see sections below)

🔐 Environment Variables

Local Configuration

For local development, you can automatically create .env files from .env.example files by running:

bun run build:envs

This command will copy all .env.example files to .env in the respective apps/packages. After that, you can configure the values in each .env file. Check the documentation for each app/package:

📚 Apps and Packages Documentation

Apps

  • 📖 API - Backend API with Elysia
  • 📖 Web - Frontend with React

Packages

  • 📖 Auth - Authentication with Better Auth
  • 📖 Database - Database with Drizzle ORM
  • 📖 Cache - Cache with Redis

🧑‍💻 Development

Prerequisites

  • Bun installed (version 1.3.3 or higher)
  • Docker and Docker Compose (for local database)

⚠️ TypeScript Configuration Warning

Important: It's recommended to use the minimum of TypeScript aliases (paths in tsconfig.json) in packages, as it can cause conflicts with apps during type checking. Prefer using relative imports or direct package imports when possible.

Main Commands

# Install dependencies
bun install

# Development (all apps)
bun dev

# Build (all apps)
bun build

# Linting
bun lint

# Formatting
bun format

Available Scripts

  • bun dev - Starts all apps in development mode
  • bun build - Builds all apps
  • bun preview - Preview of builds
  • bun lint - Runs the linter
  • bun format - Formats the code
  • bun check - Checks code and formatting
  • bun check:write - Automatically fixes found issues

📝 Notes

Bun Warning on Windows

When running bun run dev on Windows, you may see a message about files "outside the project directory" not being watched. This is a Windows limitation related to the limited number of file watchers. It's just a safety measure from Bun and doesn't affect functionality. For more details, see the API README.

🔗 Useful Links

About

Simplify the process of installing mods on dedicated servers with pz packs.

Topics

Resources

Stars

Watchers

Forks

Languages