Skip to content

software-sds/reloop_db

Repository files navigation

Reloop Database Infrastructure

🎯 Overview

This repository contains the data infrastructure for the Reloop clothing recognition app. It provides database operations, ML data pipeline, and environment management for the development team.

🏗️ What This Repository Contains

  1. Database Layer - MongoDB operations for users, scans, images, analytics
  2. ML Data Pipeline - Framework for AI integration and training data collection
  3. Environment Management - Flexible configuration for different environments

📁 Repository Structure

reloop_db/
├── db_layer/                 # Database operations
│   ├── connection.py         # MongoDB connection
│   ├── collections.py        # Database collections
│   ├── users.py             # User operations
│   ├── scans.py             # Scan operations
│   ├── images.py            # Image operations
│   └── analytics.py         # Analytics queries
├── ml_interface/            # ML data pipeline
│   └── training_data.py     # Gemini AI integration
├── config.py                # Configuration
├── setup.py                 # Package installer
├── requirements.txt         # Dependencies
├── API_EXAMPLES.md          # Backend integration guide
├── SETUP.md                 # Setup documentation
└── ENVIRONMENT_SETUP.md     # Environment configuration

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/software-sds/reloop_db.git
cd reloop_db

# Install dependencies
pip install -r requirements.txt

# Set up environment
python set_env.py

Testing

# Test database connection
python tests/test_connection.py

# Test user operations
python tests/test_user_with_env.py

# Run all tests
pytest tests/

👥 For Developers

Backend Developers

See API_EXAMPLES.md for detailed examples of how to integrate these functions into your FastAPI/Flask application.

ML Engineers

See ml_interface/training_data.py for Gemini AI integration examples.

Frontend Developers

Use the backend API endpoints that consume these database functions.

🗄️ Database Collections

  • users - User information
  • scans - Scan results with ML predictions
  • images - Image data with predictions
  • analytics - Analytics data

🔧 Configuration

The app uses these environment variables:

  • MONGO_URI - MongoDB connection string
  • DB_NAME - Database name (defaults to "appliwaste")

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test your changes
  5. Submit a pull request

📄 License

This project is part of the Reloop clothing recognition app development.

🆘 Support

For questions or issues:

  1. Check the documentation
  2. Review the test files
  3. Contact the data infrastructure team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages