Sahay (सहाय) is a platform connecting pro bono lawyers with clients in need of legal assistance across India. The platform facilitates case matching and management while providing a bilingual interface in Hindi and English.
- Architecture Overview
- Tech Stack
- Project Structure
- Features
- Component Documentation
- Theme System
- Getting Started
The application follows a component-based architecture using React and Material-UI, with a focus on:
- Modular components
- Bilingual support
- Type safety with TypeScript
- Responsive design
- Accessibility
- React 18.3.1
- TypeScript
- Material-UI
- Tailwind CSS
- Lucide Icons
- Vite (Build tool)
src/
├── components/ # React components
│ ├── ui/ # Reusable UI components
│ └── ... # Feature-specific components
├── constants/ # Application constants
├── theme/ # Theme configuration
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
- Case submission with bilingual form
- Case listing with urgency indicators
- Case type categorization
- Status tracking
- Experience and specialty display
- Availability tracking
- Case acceptance functionality
- Bilingual interface
- Hindi-English bilingual interface
- Culturally appropriate design
- Region-specific case types
The main navigation component displaying the application title and language switcher.
Props: None
Usage:
<Header />
Displays a list of available cases with filtering and sorting capabilities.
Props:
cases: Client[]
- Array of case objectsonSelect: (caseId: string) => void
- Case selection handler
Usage:
<CaseList cases={cases} onSelect={handleCaseSelect} />
Displays lawyer information and case acceptance functionality.
Props:
lawyer: Lawyer
- Lawyer information objectonAcceptCase: () => void
- Case acceptance handler
Usage:
<LawyerProfile lawyer={lawyerData} onAcceptCase={handleAcceptCase} />
Bilingual form for submitting new cases.
Props:
onSubmit: (caseData: Omit<Client, 'id' | 'status'>) => void
- Form submission handler
Usage:
<CaseSubmissionForm onSubmit={handleCaseSubmit} />
The theme uses colors inspired by Indian heritage:
- Primary: Terra cotta red (#D16F4D)
- Secondary: Deep forest green (#1B4D3E)
- Background: Soft cream (#FBF7F4)
- Primary font: Poppins
- Fallback fonts: Roboto, Helvetica, Arial
- Enhanced heading weights for better readability
Custom styled Material-UI components with:
- Rounded corners
- Consistent spacing
- Hover effects
- Shadow elevations
- Installation:
npm install
- Start development server:
npm run dev
- Build for production:
npm run build
interface Client {
id: string;
caseType: string;
description: string;
location: string;
urgency: 'low' | 'medium' | 'high';
status: 'pending' | 'matched' | 'closed';
}
interface Lawyer {
id: string;
name: string;
email: string;
specialties: string[];
experience: number;
location: string;
availableHours: number;
cases: number;
}