Skip to content

Latest commit

 

History

History
157 lines (106 loc) · 2.93 KB

File metadata and controls

157 lines (106 loc) · 2.93 KB

Getting Started with TrayDesk

This guide will help you set up and run TrayDesk locally on your machine.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js 18.0.0 or higher
  • pnpm 8.0.0 or higher
  • PHP 8.0+ (for Twig app only)
  • Composer (for Twig app only)
  • Git

Quick Start

1. Clone the Repository

git clone https://github.com/Trayshmhirk/traydesk.git
cd traydesk

2. Install Dependencies

# Install all dependencies for all apps
pnpm install

This will install dependencies for:

  • Root workspace (Husky, Prettier, ESLint, etc.)
  • Next.js app
  • Vue.js app
  • Twig app (Node dependencies only)

3. Set Up PHP Dependencies (Twig App Only)

If you plan to run the Twig app:

cd apps/twig-app
composer install
cd ../..

4. Run Development Servers

Choose the framework you want to work with:

Next.js App

pnpm dev:next

Open http://localhost:3200

Vue.js App

pnpm dev:vue

Open http://localhost:5173

Twig App

pnpm dev:twig

Open http://localhost:8000

Project Structure

traydesk/
├── apps/
│   ├── next-app/       # Next.js TypeScript application
│   ├── vue-app/        # Vue 3 TypeScript application
│   └── twig-app/       # PHP Twig application
├── packages/           # Shared packages (future)
├── docs/              # Documentation
├── .husky/            # Git hooks
└── package.json       # Root workspace config

Development Workflow

Making Changes

  1. Create a new branch:

    git checkout -b feature/my-feature
  2. Make your changes in the appropriate app directory

  3. Test your changes locally

  4. Commit following conventional commits:

    git commit -m "feat(next-app): add new feature"

Code Quality

The project uses automated tools to ensure code quality:

  • Husky: Git hooks for pre-commit checks
  • lint-staged: Runs linters on staged files
  • Prettier: Code formatting
  • ESLint: Code linting
  • Commitlint: Commit message validation

These run automatically when you commit.

Next Steps

Troubleshooting

Port Already in Use

If you see "Port already in use" errors:

# Find and kill the process using the port
# On Windows:
netstat -ano | findstr :3200
taskkill /PID <PID> /F

# On macOS/Linux:
lsof -ti:3200 | xargs kill

Dependency Issues

Clear all dependencies and reinstall:

pnpm clean
pnpm install

Need Help?