-
Install dependencies:
npm install
-
Configure environment:
cp .env.example .env
Edit
.envand setVITE_API_BASE_URLto your backend API URL. -
Start development server:
npm run dev
-
Open browser: Navigate to
http://localhost:3000
If you don't have a backend running yet, you can modify src/services/api.ts to use mock data:
// Temporarily use mock data
import { mockAnalysisResults } from '../data/mockData'
export const api = {
analyzeUrl: async (url: string): Promise<AnalysisResult> => {
// Simulate API delay
await new Promise(resolve => setTimeout(resolve, 1000))
return mockAnalysisResults[0] // Return first mock result
},
// ... other methods
}Components are designed to work with mocked data. You can test individual components by importing them and passing mock props.
npm run buildThe dist folder will contain the production build ready for deployment.
src/components/- Reusable UI componentssrc/pages/- Page-level componentssrc/services/- API client and external service integrationssrc/types/- TypeScript type definitionssrc/utils/- Utility functionssrc/data/- Mock data and fixtures
- Analyze a URL: Go to
/analyzeand paste a URL - View History: Check
/historyfor past analyses - Dashboard: See analytics at
/dashboard - Bulk Upload: Use the batch uploader on the analyze page
- Settings: Configure preferences at
/settings
If you see CORS errors when calling the API, ensure your backend has CORS enabled for your frontend origin.
- Check that
VITE_API_BASE_URLis set correctly - Verify your backend is running
- Check browser console for detailed error messages
- Ensure all dependencies are installed:
npm install - Clear node_modules and reinstall if needed
- Check TypeScript errors:
npm run build
- Set up your backend API
- Configure environment variables for production
- Add custom styling if needed
- Set up CI/CD pipeline
- Add E2E tests