title | aliases | tags | created | updated | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Development Setup Guide |
|
|
2024-12-28 |
2024-12-28 |
- Node.js (v18.17 or later)
- npm (v9.0 or later)
- Git
- VSCode (recommended)
- Install Node.js from nodejs.org
- Verify installation:
node --version
npm --version
git clone https://github.com/yourusername/BootHillGM.git
cd BootHillGM
cd BootHillGMApp
npm install
Create .env.local
in the BootHillGMApp directory:
GEMINI_API_KEY=your_api_key_here
NEXT_PUBLIC_APP_URL=http://localhost:3000
- ESLint
- Prettier
- TypeScript and JavaScript Language Features
- Tailwind CSS IntelliSense
- Jest Runner
.eslintrc.json
: ESLint configurationjest.config.js
: Jest testing setuptailwind.config.ts
: Tailwind CSS configurationtsconfig.json
: TypeScript configurationnext.config.mjs
: Next.js configuration
npm run dev
Access the application at: http://localhost:3000
npm run build
npm start
# Run all tests
npm test
# Watch mode
npm test -- --watch
# Coverage report
npm test -- --coverage
BootHillGMApp/
├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── services/ # External services
│ ├── styles/ # CSS styles
│ ├── types/ # TypeScript types
│ └── utils/ # Utility functions
├── public/ # Static assets
└── tests/ # Test files
- Follow ESLint rules
- Use Prettier for formatting
- Follow TypeScript best practices
- Maintain consistent component structure
- Create feature branches
- Write descriptive commit messages
- Follow conventional commits
- Submit pull requests for review
- Write tests for new features
- Maintain test coverage
- Run test suite before commits
- Update tests for changes
-
Node Version Mismatch
- Solution: Use nvm to manage Node versions
- Run:
nvm use
in project root
-
Build Errors
- Clear next cache:
npm run clean
- Remove node_modules:
rm -rf node_modules
- Fresh install:
npm install
- Clear next cache:
-
Test Failures
- Check Jest configuration
- Verify test environment
- Update test snapshots if needed
- Obtain API key from Google Cloud Console
- Add key to
.env.local
- Configure API client in
services/ai/
- Test connection with provided utilities
- Use React DevTools
- Monitor bundle size
- Implement code splitting
- Optimize image assets
- [[../architecture/next-js-setup|Next.js Architecture]]
- [[testing|Testing Guide]]
- [[deployment|Deployment Guide]]
- [[contributing|Contributing Guide]]
- [[../reference/gemini-api-guide|Gemini API Guide]]