SiteScan is a cutting-edge web application that leverages artificial intelligence to revolutionize infrastructure inspection and analysis. Upload videos from drones, cameras, or mobile devices, and get instant AI-powered defect detection with professional reporting.
- AI-Powered Analysis: Advanced machine learning models detect cracks, corrosion, and structural issues
- Universal Compatibility: Works with videos from any device - drones, cameras, smartphones
- Professional Reports: Generate comprehensive PDF reports with findings and recommendations
- Real-time Processing: Fast analysis with progress tracking
- Mobile-Responsive Landing: Optimized mobile experience for marketing pages
- Desktop-Only App: Full application requires desktop for optimal user experience
- Secure & Reliable: Enterprise-grade security with encrypted data handling
sitescan-frontend/
βββ public/ # Static assets
β βββ demo-video.mp4 # Demo video for landing page
β βββ manifest.json # PWA manifest
β βββ robots.txt # SEO robots file
βββ src/
β βββ api/ # API service layer
β β βββ auth.ts # Authentication services
β β βββ videoApi.ts # Video processing APIs
β β βββ ...
β βββ app/ # App-level routing
β β βββ AppRoutes.tsx # Main routing configuration
β βββ components/ # Shared components
β β βββ navigation/ # Navigation components
β β βββ ui/ # Reusable UI components
β β βββ DesktopOnlyBlocker.tsx # Mobile blocker component
β β βββ ...
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx # Authentication state
β β βββ AnalyticsContext.tsx
β βββ features/ # Feature-based modules
β β βββ landing/ # Landing page components
β β β βββ components/ # Landing-specific components
β β β βββ pages/ # Landing page layouts
β β βββ auth/ # Authentication features
β β βββ dashboard/ # Dashboard features
β β βββ projects/ # Project management
β β βββ video-analysis/ # Video processing features
β β βββ map/ # Defect mapping features
β βββ hooks/ # Custom React hooks
β β βββ useDeviceDetection.ts # Device detection hook
β β βββ useVideoProcessing.ts # Video processing hook
β β βββ ...
β βββ lib/ # External library configurations
β βββ styles/ # Global styles and CSS
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
βββ supabase/ # Database migrations and config
β βββ migrations/ # SQL migration files
βββ dist/ # Production build output
βββ docs/ # Additional documentation
βββ ACCESS_CONTROL.md # User access control guide
βββ ANALYTICS.md # Analytics implementation
βββ BACKEND_INTEGRATION.md # Backend integration guide
βββ SEO.md # SEO optimization guide
- React 18 - Modern React with hooks and concurrent features
- TypeScript - Type-safe JavaScript development
- Vite - Fast build tool and development server
- Chakra UI - Modern, accessible component library
- React Router - Client-side routing
- React Query - Server state management
- Supabase - Database and authentication
- REST APIs - Video processing and data management
- WebSocket - Real-time updates (where applicable)
- ESLint - Code linting and formatting
- Prettier - Code formatting
- Vitest - Unit testing framework
- TypeScript - Static type checking
- Node.js (v18 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone <repository-url> cd sitescan/sitescan-frontend
-
Install dependencies
npm install
-
Set up environment variables
cp env.example .env.local
Edit
.env.localwith your configuration:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key VITE_API_BASE_URL=your_api_base_url
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run test- Run unit testsnpm run type-check- Run TypeScript type checking
- Landing Page: Fully responsive and optimized for mobile devices
- Navigation: Touch-friendly mobile menu
- Content: Streamlined mobile layout without video clutter
- CTA Buttons: Stacked layout for easy touch interaction
- Full Application: Complete feature set with desktop-optimized UI
- Video Demo: Interactive video player in hero section
- Floating Elements: Animated feature cards and visual enhancements
- Side-by-side Layouts: Optimized for larger screens
When mobile users try to access the full application (/app/* or /ai-scanner), they see a professional blocker that:
- Explains the desktop requirement
- Shows supported devices (desktop/laptop vs mobile)
- Provides clear instructions
- Offers contact information for support
We welcome contributions! Please follow these guidelines:
-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add TypeScript types for new code
- Write tests for new functionality
- Update documentation as needed
-
Test your changes
npm run lint npm run type-check npm run test npm run build -
Commit your changes
git commit -m "feat: add your feature description"Use conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- TypeScript: Use strict typing, avoid
any - Components: Use functional components with hooks
- Styling: Use Chakra UI components and responsive design
- File Naming: Use PascalCase for components, camelCase for utilities
- Imports: Use absolute imports with path mapping (
@/,@components/, etc.)
// components/MyComponent.tsx
import React from 'react'
import { Box, Text } from '@chakra-ui/react'
interface MyComponentProps {
title: string
children?: React.ReactNode
}
const MyComponent: React.FC<MyComponentProps> = ({ title, children }) => {
return (
<Box>
<Text>{title}</Text>
{children}
</Box>
)
}
export default MyComponent- Mobile First: Start with mobile design, then enhance for desktop
- Breakpoints: Use Chakra UI's responsive props
base- Mobile (0px+)sm- Small tablet (480px+)md- Tablet (768px+)lg- Desktop (992px+)xl- Large desktop (1280px+)
// Example responsive component
<Box
p={{ base: 4, md: 8 }}
fontSize={{ base: 'sm', md: 'md', lg: 'lg' }}
direction={{ base: 'column', lg: 'row' }}
>npm run test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage report- Use Vitest for unit tests
- Test components with React Testing Library
- Mock external dependencies
- Test responsive behavior when applicable
npm run build- Set up environment variables for production
- Configure Supabase for production database
- Set up analytics tracking
- Configure error monitoring
- Vercel (recommended) - Automatic deployments from Git
- Netlify - Static site hosting with form handling
- AWS S3 + CloudFront - Scalable static hosting
The application includes:
- Vercel Analytics - Performance and usage metrics
- Error Tracking - Production error monitoring
- User Analytics - User behavior tracking (privacy-compliant)
See ANALYTICS.md for detailed analytics implementation.
- Authentication - Secure user authentication via Supabase
- Data Encryption - All data encrypted in transit and at rest
- Access Control - Role-based access control system
- Input Validation - Comprehensive input sanitization
- CORS - Properly configured cross-origin requests
ACCESS_CONTROL.md- User roles and permissionsANALYTICS.md- Analytics implementation detailsBACKEND_INTEGRATION.md- API integration guideSEO.md- SEO optimization strategies
- Email: ian@sitescan.build
- Phone: (424) 354-0889
- Issues: Create a GitHub issue for bugs or feature requests
This project is proprietary software. All rights reserved.
Built with modern web technologies and best practices for performance, accessibility, and user experience.
Made with β€οΈ for construction professionals