Getting Started

Quick start guide to get up and running with admin panel development.

Prerequisites

  • Node.js >= 18
  • pnpm >= 8.14.3
  • Git

Installation

1. Clone Repository

git clone <repository-url>
cd monorepo

2. Install Dependencies

pnpm install
This will install dependencies for all packages in the monorepo.

Development

Start Dev Server

pnpm dev:admin
The admin panel will be available at http://localhost:3001.

Build for Production

pnpm build:admin

Project Structure

admin/
├── apps/
│   └── panel/              # Main admin app
│       ├── src/
│       │   ├── routes/     # Add your routes here
│       │   ├── components/ # App-specific components
│       │   └── app.tsx     # Main app file
│       └── package.json

└── packages/
    ├── core/               # Shared logic
    │   └── src/
    │       ├── api/        # API client
    │       ├── auth/       # Authentication
    │       ├── hooks/      # React Query hooks
    │       └── utils/      # Utilities

    └── ui/                 # Shared components
        └── src/
            └── components/ # UI components

Environment Variables

Create .env file in admin/apps/panel/:
# API Configuration
VITE_API_BASE_URL=http://localhost:8080

# Better Auth Configuration
PUBLIC_AUTH_URL=http://localhost:3100

Next Steps


Common Commands

# Development
pnpm dev:admin              # Start dev server
pnpm dev:admin-all          # Start all admin packages

# Building
pnpm build:admin            # Build admin panel
pnpm build:admin-all        # Build all admin packages

# Individual packages
pnpm build:admin-core       # Build core only
pnpm build:admin-ui         # Build UI only

Troubleshooting

Port Already in Use

If port 3001 is already in use, you can change it in admin/apps/panel/app.config.ts:
export default defineConfig({
  server: {
    port: 3002, // Change port here
  },
});

Dependencies Not Found

Try reinstalling:
pnpm install --force

Build Errors

Clear Turborepo cache:
rm -rf .turbo
pnpm build:admin