This fullstack AI-powered web app enables users to upload and analyze videos for raised-hand violations using PoseNet. It consists of a Node.js backend and a React frontend, with MinIO for video storage and PostgreSQL for data management.
👉 You can check this video to know how it works here
- Backend: Node.js + Express + TensorFlow.js + MinIO
- Frontend: React + Tailwind CSS
- AI: PoseNet model for body keypoint detection
- Database: PostgreSQL
- Storage: MinIO (S3-compatible object storage)
project-root/
├── frontend/
│ ├── src/
│ └── ...
├── backend/
│ ├── src/
│ └── ...
└── README.md
- Node.js v18+
- PostgreSQL (running locally)
- MinIO (manual startup)
- FFmpeg installed globally
- TensorFlow native libraries (for Windows setup)
-
Install dependencies
cd backend npm install -
Environment variables: Create a
.envfile with the following:MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=127.0.0.1 MINIO_PORT=9000 MINIO_USE_SSL=false PG_USER=postgres PG_HOST=127.0.0.1 PG_DATABASE=video_recording_db PG_PASSWORD=postgres PG_PORT=5432 PORT=5000
-
Initialize the database
npm run init-db
-
Start the backend server
npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the development server:
npm start
The frontend runs on http://localhost:3000.
minio server /path/to/data --console-address ":9001"-
Download
libtensorflow-cpu-windows-x86_64-2.9.1.zip. -
Copy
tensorflow.dllandtensorflow.libto:node_modules/@tensorflow/tfjs-node/deps/lib
- Download FFmpeg from ffmpeg.org.
- Extract it to a folder, e.g.,
C:\ffmpeg. - Add the
binfolder to your system PATH (e.g.,C:\ffmpeg\bin). - Restart your terminal or system to apply the change.
Verify installation with:
ffmpeg -version- Extracts the first frame from the uploaded video using FFmpeg.
- Runs PoseNet on the frame to estimate body keypoints.
- Flags a violation if:
leftWristorrightWristis detected above a vertical threshold (Y < 500).- Detection confidence is too low (uncertain violation).
- All violations are stored in PostgreSQL.
npm install # Install dependencies
npm run init-db # Initialize the database
npm start # Start the backend servernpm install # Install dependencies
npm start # Run the React app