xiaohongshu
xiaohongshu
Expert guide for developing the Dongshan Next Map LBS game, covering 3-layer architecture, Zustand state management, custom Systems (LBS, Save, Quest), and HUD development.
Full skill instructions
This skill codifies the architectural patterns and systems of the Dongshan Next Map project. Follow these guidelines strictly to ensure code consistency and system stability.
The project uses a strict 3-Layer Architecture.
graph TD
UI[UI/HUD Layer] -->|Reads| State[State Layer]
UI -->|Calls| Systems[Systems Layer]
Systems -->|Reads/Writes| State
Systems -->|Uses| API[API Layer]
API -->|Queries| DB[Database Layer]
src/components/hud/fixed positioning for HUD overlays.pointer-events: none on containers, auto on interactive elements.src/systems/LBSManager: GPS <-> Three.js coordinate conversion.InteractionSystem: Click detection and proximity triggers.SaveSystem: LocalStorage and Cloud sync.QuestSystem: Quest tracking and rewards.InventorySystem: Item management.src/store/playerStore: User progress, inventory, stats.gameStore: Scenarios, levels, active models, quests.uiStore: Dialogs, menus, notifications.locationStore: GPS coordinates, map state.To add a quest, you typically work with QuestSystem and gameStore.
import { QuestSystem } from '@/systems/QuestSystem';
// In a logic controller or initial load
QuestSystem.startQuest({
id: 'quest_id',
title: 'Quest Title',
description: 'Quest Description',
objectives: [
{
id: 'obj_1',
description: 'Collect 5 items',
type: 'collect', // or 'talk', 'explore'
total: 5,
progress: 0,
completed: false
}
],
rewards: {
experience: 100,
coins: 50
}
});
Do not write interaction logic in components. Use InteractionSystem.
import { InteractionSystem } from '@/systems/InteractionSystem';
// In your 3D component (e.g., inside an onClick handler)
const handleClick = () => {
InteractionSystem.handleModelClick(modelId, userLocation);
};
Follow the HUD pattern to ensure separation from 3D.
// src/components/hud/MyNewPanel.tsx
import { useUIStore } from '@/store/uiStore';
export default function MyNewPanel() {
const isOpen = useUIStore(s => s.isMyPanelOpen);
if (!isOpen) return null;
return (
<div className="fixed inset-0 z-50 pointer-events-none flex justify-center items-center">
<div className="pointer-events-auto bg-black/80 p-4 rounded text-white">
{/* Content */}
</div>
</div>
);
}
ALWAYS use LBSManager for positioning.
import { LBSManager } from '@/systems/LBSManager';
// Convert GPS to scene position
const position = LBSManager.latLngToXYZ(lat, lng, altitude);
src/types/.src/components/MapBase.tsxsrc/components/3d/Game3DLayers.tsxsrc/store/*.tssrc/systems/*.tsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience