Deep DivesAdmin

Development

Local development guide for the RawStack Admin component.

Setup

cd apps/admin
npm install
cp .env.example .env
npm run dev

Vite starts the dev server, typically at http://localhost:5173, with instant hot module replacement.

Project structure

apps/admin/
├── src/
│   ├── main.tsx              # Entry point
│   ├── App.tsx               # Root component with router and providers
│   ├── routes/               # Page components (one per route)
│   ├── components/           # Shared UI components
│   ├── lib/                  # API hooks, utilities
│   └── assets/               # Images and static files
├── public/                   # Files copied as-is to dist/
├── vite.config.ts
├── tailwind.config.ts
├── tsconfig.json
└── index.html

Path alias

@/* is aliased to src/ in both vite.config.ts and tsconfig.json. Import components as:

import { Button } from "@/components/ui/button";

Useful scripts

ScriptDescription
npm run devStart Vite dev server
npm run buildTypeScript check + Vite production build
npm run previewPreview the production build locally
npm run lintESLint
npm run testVitest watch mode
npm run test:uiVitest with UI
npm run test:e2ePlaywright E2E tests