This document outlines the key areas to extend or customize when building new features inside DevHub. It assumes you are already able to run the project via npm run dev.
- Tailwind classes are applied directly within components. Stay consistent with the
brand-*color tokens already used. - Theme toggle:
components/Header.tsxcontains the sun/moon button. Persist theme choice by writing tolocalStorageand reading it during app load if you need state to survive refreshes. - Background animation:
components/ParticleTextEffect.tsxrenders the animated canvas. Pass custom words or adjust opacity by editing the props provided fromApp.tsx.
- The overall shell lives in
App.tsx. Add new global overlays (e.g., modals, toasts) there so they sit above main content but below the header. components/Sidebar.tsxdefines navigation items. Follow the existing data structure (label, icon, count) when adding new entries.
- Mock data is centralized in
constants.ts. Replace individual sections with real API calls by moving the logic into dedicated hooks and importing them where widgets render. - Authentication state uses
Zustandviastore/useHubStore.ts. Add new global flags/selectors there for features that need cross-component coordination.
- Create a new component under
components/. - Add any local mock data or hook imports at the top of the file.
- Register the component inside
App.tsxwithin the grid layout (or wherever it should appear). - Keep components presentational when possible. Use hooks/services for business logic.
- Static images are imported from
components/assets. Drag in new files and import them locally within the component that uses them (Vite handles bundling). - For SVG icons, follow the pattern in
components/icons/by exporting a typed React FC.
- Declare new variables in
env.d.tsfor TypeScript awareness. - Access them through
import.meta.env.VITE_YOUR_KEYand document usage in the README.
- While the project currently has no automated tests, consider adding component-level tests with React Testing Library for new critical features.
- Use the browser console and Vite HMR output for quick validation during development.
- Update screenshots or documentation if your change alters visual output.
- Keep imports sorted and remove unused ones to avoid TS lint warnings.
- Run
npm run buildbefore opening a PR to ensure the production build passes.
Happy hacking! 🦎