https://github.com/user-attachments/assets/139e328a-48bc-4058-ad0c-e5cc2587ce79
A comprehensive platform for uploading, analyzing, and managing diagram images with automated quality assessment, text extraction, and intelligent search capabilities.
The project consists of several integrated components:

git clone https://github.com/yourusername/image-analysis-platform.git
cd image-analysis-platform
Create .env files
For backend (./.env):
# Server
PORT=4000
NODE_ENV=development
# MongoDB
MONGODB_URL=mongodb+srv://username:password@cluster.mongodb.net/diagrams
# AWS
AWS_ACCESS_KEY=your_access_key
AWS_SECRET_KEY=your_secret_key
AWS_REGION=us-east-1
S3_BUCKET_NAME=your-bucket-name
CLOUDFRONT_DOMAIN=your-cloudfront-domain.cloudfront.net
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# Flask Microservice
FLASK_API_URL=http://flask-service:5000
For client (./client/.env):
VITE_API_URL=http://localhost:4000/api
VITE_GRAPHQL_URL=http://localhost:4000/api/graphql
For a complete development environment:
docker-compose up --build
This will start:
docker-compose down
cd backend
npm install
npm run dev
The API will be available at http://localhost:4000
cd client
npm install
npm run dev
The frontend will be available at http://localhost:3000
POST /api/v1/analyze - Upload and analyze an imageGET /api/v1/diagram/:id/status - Get processing status for a diagramGET /api/v1/getAllImages - Get all imagesGET /api/v1/diagram - Search diagrams with filtersGET /api/v1/diagram/autocomplete - Get search suggestionsGET /api/v1/diagram/:diagramId/similar - Find similar diagramsThe GraphQL playground is available at http://localhost:4000/api/graphql
Example queries:
# Get all diagrams with pagination
query GetAllDiagrams($page: Int, $limit: Int) {
getAllDiagrams(page: $page, limit: $limit) {
diagrams {
_id
title
image_url
}
total
totalPages
currentPage
}
}
# Search diagrams
query SearchDiagrams($query: String, $subjectId: ID, $page: Int, $limit: Int) {
searchDiagrams(query: $query, subjectId: $subjectId, page: $page, limit: $limit) {
diagrams {
_id
title
image_url
}
total
totalPages
currentPage
}
}
Run the test suite with:
npm test
For production deployment, we recommend:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.