Project: Interact - Employee Engagement & Gamification Platform
Last Updated: January 14, 2026
Comprehensive guide for developers working on the Interact platform.
- Node.js 18+
- npm or yarn
- Git
- Code editor (VS Code recommended)
# Clone repository
git clone https://github.com/Krosebrook/interact.git
cd interact
# Install dependencies
npm install
# Start development server
npm run dev
# Open browser
# http://localhost:5173interact/
├── src/
│ ├── pages/ # Route components (47 pages)
│ ├── components/ # Reusable components (40+ dirs)
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities and libraries
│ ├── api/ # API client configuration
│ ├── contexts/ # React Context providers
│ └── assets/ # Static assets
├── functions/ # Base44 backend functions (61)
├── public/ # Public static files
├── tests/ # Test files (when implemented)
└── docs/ # Additional documentation
- Check GitHub Issues or project board
- Assign yourself to the task
- Create feature branch
git checkout main
git pull origin main
git checkout -b feature/your-feature-name- Write code following style guide
- Test locally
- Run linter:
npm run lint - Fix lint errors:
npm run lint:fix
# Run tests (when available)
npm test
# Run specific test
npm test -- path/to/test.js
# Coverage
npm run test:coveragegit add .
git commit -m "feat: add activity recommendation feature"Follow Conventional Commits
git push origin feature/your-feature-nameCreate Pull Request on GitHub
- Functional components with hooks
- No class components
- Hooks at top level (never conditional)
- PropTypes for all components
- JSDoc for complex functions
- Components: PascalCase (
ActivityCard.jsx) - Hooks: camelCase with "use" prefix (
useActivityData.js) - Utilities: camelCase (
formatDate.js) - Constants: UPPER_SNAKE_CASE (
MAX_POINTS)
- One component per file
- Co-locate tests with code
- Index files for public exports
- Group related files in directories
// 1. Create page component
// src/pages/NewPage.jsx
export const NewPage = () => {
return <div>New Page</div>;
};
// 2. Add route
// src/App.jsx
<Route path="/new-page" element={<NewPage />} />// src/components/common/MyComponent.jsx
import PropTypes from 'prop-types';
export const MyComponent = ({ title, onClick }) => {
return (
<button onClick={onClick}>
{title}
</button>
);
};
MyComponent.propTypes = {
title: PropTypes.string.isRequired,
onClick: PropTypes.func,
};// src/hooks/useMyData.js
import { useQuery } from '@tanstack/react-query';
export const useMyData = (id) => {
return useQuery({
queryKey: ['myData', id],
queryFn: () => fetchMyData(id),
});
};// functions/my-endpoint.ts
export async function myEndpoint(req: Request): Promise<Response> {
// Validate request
const { data } = await req.json();
// Process
const result = await processData(data);
// Return response
return new Response(JSON.stringify(result));
}- React DevTools extension
- Console for errors
- Network tab for API calls
- Performance tab for profiling
- Set breakpoints
- Press F5 to start debugging
- Inspect variables and call stack
Issue: Component not re-rendering
Solution: Check dependencies in useEffect, useMemo
Issue: API call fails
Solution: Check network tab, verify auth token, check CORS
Issue: Build fails
Solution: Clear node_modules and reinstall, check for syntax errors
- CONTRIBUTING.md - How to contribute
- TESTING.md - Testing guide
- .github/copilot-instructions.md - GitHub Copilot guide
- CLI.md - CLI commands
Document Owner: Engineering Team
Last Updated: January 14, 2026