Perfect World Phoenix Template
React SPA + Laravel Export + Static HTML Build
A cinematic Perfect World MMORPG landing page template built with modern frontend technology.
Perfect World Phoenix is a modern landing page template for Perfect World MMORPG websites. This template is built as a standalone Vite + React application, powered by TypeScript, Tailwind CSS v4, daisyUI 5, shadcn/ui primitives, and TanStack Query 5.
This template provides 3 main implementation tracks:
- React SPA - The main React-based application located in the root and src/ directory.
- Laravel Export - A Blade + Alpine.js version for Laravel 13 located in laravel-export/.
- Static HTML Build - A portable HTML/CSS/JS version with no build step required, located in dist-html/.
- Standalone Vite + React single-page application.
- React 18.3 with TypeScript 5.8.
- Tailwind CSS v4 with CSS-first configuration.
- daisyUI 5 using a custom perfectworld theme.
- shadcn/ui primitives with around 50 Radix-based components.
- Routing powered by react-router-dom v6.
- Lazy loading for all pages except the homepage.
- TanStack Query 5 for data management.
- Vite 8 with React SWC plugin.
- Laravel Blade/Alpine.js version included.
- Static HTML preview version included.
- Frontend: React 18.3, TypeScript, Vite 8
- Styling: Tailwind CSS v4, daisyUI 5
- UI Components: shadcn/ui, Radix primitives
- Data Layer: TanStack Query 5
- Routing: react-router-dom v6
- Testing: Vitest 3, jsdom 29, Testing Library React 16
- Build Tool: Vite + @vitejs/plugin-react-swc
- Fonts: Cinzel Decorative + Inter
- Node.js: Minimum Node.js 20 LTS
- Package Manager: npm recommended
- Alternative: Bun is supported
- OS: Cross-platform, tested on Windows
- Laravel Export: Laravel 13 with PHP 8.3 or newer
Run the following command to install all dependencies:
Bash:
npm install
Optionally, create a .env.local file in the project root:
Code:
VITE_API_URL=https://api.example.com
VITE_APP_URL=http://localhost:8080
Notes:
- Only variables prefixed with VITE_ are exposed to the frontend.
- The current codebase does not read any VITE_* variables yet, but this convention is prepared for future backend integration.
Bash:
npm run dev
The development server runs at:
Code:
http://localhost:8080
Important notes:
- The development port is 8080, not Viteβs default 5173.
- The HMR overlay is intentionally disabled.
- Keep the terminal visible to check build errors.
- npm run dev - Starts the Vite dev server on port 8080.
- npm run build - Creates a production build in the dist/ directory.
- npm run build:dev - Creates a development build with instrumentation.
- npm run preview - Previews the production build from the dist/ directory.
- npm run lint - Runs ESLint.
- npm test - Runs Vitest once in CI mode.
- npm run test:watch - Runs Vitest in watch mode.
Routing is configured in src/App.tsx. Every route except the homepage uses lazy loading.
- / - Index
- /news/:category - NewsCategory
- /news/:category/:slug - NewsArticle
- /terms - Terms
- /privacy - Privacy
- /eula - Eula
- /faq - Faq
- * - NotFound
When adding or removing routes, make sure to update these files as well:
- src/App.tsx
- public/sitemap.xml
- public/robots.txt
The test runner uses Vitest 3 with the jsdom environment.
Test commands:
Bash:
npm test
npm run test:watch
npx vitest run src/path/to/file.test.tsx
npx vitest run -t "partial test name"
Testing setup:
- src/test/setup.ts registers matchers from Testing Library.
- window.matchMedia polyfill is included.
- Test discovery pattern: src/*/.{test,spec}.{ts,tsx}.
- For components using Router or React Query, use MemoryRouter and a fresh QueryClient for each test.
Code:
.
βββ .junie/ Project-specific agent guidelines and skills
βββ .claude/ Claude-specific skill definitions
βββ public/ Static assets, robots.txt, sitemap.xml, favicons
βββ src/
β βββ assets/ Images and static media
β βββ components/
β β βββ site/ Page and feature components
β β βββ ui/ shadcn/ui primitives
β β βββ NavLink.tsx Shared navigation link component
β βββ hooks/ Custom hooks
β βββ lib/ utils.ts and site-data.ts
β βββ pages/ Route components
β βββ test/ Test setup and examples
β βββ App.tsx Router and providers
β βββ App.css Minimal app-level CSS
β βββ main.tsx Vite entry point
β βββ index.css Tailwind v4 and daisyUI theme
βββ laravel-export/ Blade and Alpine.js port for Laravel 13
βββ dist-html/ Static HTML/CSS/JS build
βββ components.json shadcn/ui configuration
βββ eslint.config.js ESLint flat config
βββ index.html SEO and OpenGraph meta
βββ postcss.config.js PostCSS pipeline
βββ vite.config.ts Vite config
βββ vitest.config.ts Vitest config
- Use cn() from @/lib/utils to combine Tailwind classes.
- Avoid manual template-string concatenation for complex conditional classes.
- shadcn/ui components use lowercase filenames.
- Page and feature components use PascalCase.
- Use Tailwind v4 and daisyUI tokens.
- No CSS Modules or styled-components.
- The main theme is named perfectworld.
- Tailwind animation utilities are powered by tw-animate-css.
The following alias is used in this project:
Code:
@/* => src/*
This alias is configured in:
- tsconfig.app.json
- vite.config.ts
- vitest.config.ts
shadcn/ui sub-aliases such as @/components, @/components/ui, @/lib/utils, and @/hooks are defined in components.json.
The Vite config deduplicates the following dependencies:
- react
- react-dom
- react/jsx-runtime
- react/jsx-dev-runtime
- @tanstack/react-query
- @tanstack/query-core
Important: Do not remove this list, because doing so may cause React hooks issues, duplicate React copies, or broken QueryClient context.
1. Laravel Export
The laravel-export/ folder contains a Blade + Alpine.js + daisyUI port that can be used in a Laravel 13 project.
This is suitable for teams that want to use the landing page directly in Laravel without the React SPA.
2. Static HTML Build
The dist-html/ folder contains a static HTML/CSS/JS version that can be used without any build step.
For a quick preview:
Code:
npx serve dist-html
There are two possible Laravel approaches:
- Laravel Export - Use the laravel-export/ folder as the Blade/Alpine.js version for Laravel 13.
- React SPA + Laravel API - Use this SPA as a standalone frontend and connect it to a Laravel 13 + Sanctum backend.
Important note:
Do not directly move the React SPA src/ folder into Laravelβs resources/js.
Reasons:
- This projectβs Vite configuration is designed for a standalone SPA.
- The dedupe list is already customized.
- The development server uses port 8080.
- Certain development plugins are prepared for the SPA workflow.
- This setup may conflict with laravel-vite-plugin.
To create a production build:
Bash:
npm run build
The build output will be generated in:
Code:
dist/
The dist/ folder can be uploaded to static hosting, a CDN, or a regular web server.
When public routes change, update these files as well:
- public/robots.txt
- public/sitemap.xml
- README.md - Quickstart, scripts, routes, and project structure.
- laravel-export/README.md - Documentation for the Laravel Blade/Alpine.js version.
- dist-html/README.md - Documentation for the static HTML/CSS/JS version.
- .junie/AGENTS.md - Engineering notes and backend integration contract.
- .junie/skill/perfect-world-phoenix/SKILL.md - Agent guide for Junie.
- .claude/skills/perfect-world-landing/SKILL.md - Agent guide for Claude.
There is currently no LICENSE file available in the repository.
Recommendations:
- Use MIT if the template will be open-source.
- Use Apache-2.0 if you want an open-source license with patent protection.
- Use a Proprietary License if this template is a paid or private product.
Perfect World Phoenix Template
Modern, cinematic, flexible, and ready for Perfect World MMORPG landing pages.