Getting Started with FlexPrice Frontend
Node.js 16+
npm/yarn
Git
Code editor (VS Code recommended)
Required VS Code Extensions
Essential Extensions
{
"recommendations" : [
" dbaeumer.vscode-eslint" ,
" esbenp.prettier-vscode" ,
" bradlc.vscode-tailwindcss" ,
" dsznajder.es7-react-js-snippets" ,
" christian-kohler.path-intellisense"
]
}
Recommended Settings
{
"editor.formatOnSave" : true ,
"editor.defaultFormatter" : " esbenp.prettier-vscode" ,
"editor.codeActionsOnSave" : {
"source.fixAll.eslint" : true
}
}
Clone Repository
git clone https://github.com/flexprice/flexprice-frontend
cd flexprice-frontend
Install Dependencies
Environment Configuration
# Copy environment template
cp .env.example .env.local
# Required environment variables
VITE_API_URL=https://api.flexprice.io/v1
VITE_APP_ENV=development
Start Development Server
Install Chrome/Firefox extension
Use Components tab for debugging
Monitor re-renders and performance
2. TanStack Query DevTools
Available in development mode
Monitor API requests and cache
Debug query states and data
3. TypeScript Configuration
{
"compilerOptions" : {
"baseUrl" : " ." ,
"paths" : {
"@/*" : [" src/*" ]
}
}
}
1. Creating New Components
# Create component directory
mkdir src/components/atoms/NewComponent
# Create component files
touch src/components/atoms/NewComponent/NewComponent.tsx
touch src/components/atoms/NewComponent/index.ts
Create page component in src/pages/
Add route in src/core/routes/Routes.tsx
3. Adding API Integration
Create new file in src/utils/api_requests/
Follow existing API class patterns
Start New Feature
git checkout -b feat/feature-name
Make Changes
Follow conventions
Write tests
Update documentation
Commit Changes
git add .
git commit -m " feat: description of changes"
Create Pull Request
Use PR template
Add description
Request review
Common Issues & Solutions
# Clear node modules and reinstall
rm -rf node_modules
npm install
# Clear build cache
npm run clean
Verify .env.local exists
Check API endpoint configuration
Validate environment variables
Check import paths
Verify type definitions
Update type declarations
Review Project Structure
Read Coding Conventions
Explore Component Guidelines