🛠️ Development
Building React UI
If you want to modify React UI:
cd src/web
npm install
npm run dev # Development server
npm run build # Production build
npm run lint # ESLint checkProject Structure (Frontend)
src/web/src/
├── components/
│ ├── chat/ # Chat components
│ ├── admin/ # Admin editor components
│ └── ui/ # UI components
├── pages/
│ └── AdminEditor.tsx # Admin editor page
├── hooks/
│ └── useNuiEvent.ts # NUI event hook
├── lib/
│ ├── chat-utils.ts
│ ├── command-handler.ts
│ ├── discord-utils.ts
│ ├── icon-utils.tsx
│ └── utils.ts
├── types/
│ └── chat.types.ts
├── utils/
│ └── fetchNui.ts
├── config/
│ └── chat.config.ts
├── App.tsx
├── main.tsx
└── index.cssAdding New Components
Create component in
src/web/src/components/Use TypeScript for type safety
Follow existing patterns
Use Tailwind CSS for styling
Test with
npm run dev
Modifying Lua Backend
Client-side:
src/client/main.lua- Main client logicsrc/client/utils.lua- Client utilities
Server-side:
src/server/main.lua- Main server logicsrc/server/config-manager.lua- Config management
Framework:
src/framework/init.lua- Framework initializationsrc/framework/detector.lua- Framework detectionsrc/framework/*.lua- Framework implementations
Testing
Test Discord Integration:
Test Admin Editor:
Test Chat Modes:
Code Style
Lua: Follow FiveM Lua style guide
TypeScript: Follow Airbnb style guide
Comments: Use clear, concise comments
Commit Messages: Use conventional commits
External Links
Community
Discord: https://discord.gg/daphne
Tebex: https://daphnestudio.net/
Last updated