This application is a web application developed to manage student photos and perform face blurring operations on class photos.
- Student profile photo upload
- Class photo upload and processing
- Face recognition and blurring
- Class-based student management
- Reset all data functionality
- Supabase integration for data storage
- Python 3.8+
- FastAPI
- face_recognition
- OpenCV
- NumPy
- Supabase
- python-dotenv
- React
- TypeScript
- Material-UI
- Vite
.
├── backend/
│ ├── app/
│ │ ├── models/ # Data models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── controllers/ # Business logic
│ │ ├── routers/ # API endpoints
│ │ ├── services/ # Service layer
│ │ └── main.py # Main application
│ ├── data/
│ │ ├── profile_photos/ # Student profile photos
│ │ └── class_photos/ # Class photos
│ ├── .env # Environment variables
│ └── requirements.txt
└── frontend/
└── src/
├── components/ # React components
├── services/ # API services
├── hooks/ # Custom React hooks
├── types/ # TypeScript types
├── utils/ # Helper functions
├── assets/ # Static files
└── contexts/ # React contexts
- Create and activate Python virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows- Install required packages:
pip install -r requirements.txt-
Set up environment variables: Create a
.envfile in the backend directory with the following variables:SUPABASE_URL=your_project_url SUPABASE_ANON_KEY=your_anon_key SUPABASE_SERVICE_KEY=your_service_key -
Start the application:
cd backend
uvicorn app.main:app --reload- Install dependencies:
cd frontend
npm install- Start development server:
npm run devPOST /api/student/add-student: Add new studentGET /api/student/get-students: List all studentsGET /api/student/get-classes: List all classesPOST /api/student/process-photo: Process class photoPOST /api/student/reset-data: Reset all dataGET /api/student/test-connection: Test Supabase connection
-
Adding a Student:
- Enter student name and class information
- Upload profile photo
- Click "Add Student" button
-
Processing Class Photo:
- Select class
- Upload class photo
- Click "Process Photo" button
- View processed photo
-
Resetting Data:
- Click "Reset All Data" button
- Select "Confirm" in the confirmation dialog
- Creating API endpoints with FastAPI
- Face recognition and blurring operations
- Data management with Supabase
- Environment variable management
- Creating React components with Material-UI
- Type safety with TypeScript
- API integration
- User interface design
MIT