Skip to content

Conversation

@naurjhanvi
Copy link

Overview

This PR introduces a Proof of Concept (POC) for the "Beehive-2.0" architecture, addressing the critical need for a simplified, single-command installation process.

It replaces the complex multi-service setup with a monolithic Flask + MongoDB architecture containerized via Docker Compose.

Key Features Implemented

  • Single Command Installation: docker-compose up --build spins up the entire stack (App + DB).
  • Hybrid Storage Architecture:
    • Images: Stored efficiently in the local file system (static/uploads).
    • Metadata: Indexed in MongoDB for fast retrieval.
  • Enhanced Authentication:
    • OAuth: Integrated GitHub and Google login support.
    • Local Auth: Standard Username/Password registration still supported.
  • Private Vault Automation: Automatically creates a private GitHub repository (bhv-vault-<username>) for users upon GitHub login, demonstrating the "Vault" concept.

Technical Details

  • Backend: Flask (Python 3.8+)
  • Database: MongoDB (via Docker)
  • Frontend: Jinja2 + Vanilla CSS (Minimal, no build steps required)
  • Deployment: Docker Compose

How to Test

  1. Clone this branch.
  2. Create a .env file with your OAuth credentials (see README.md for template).
  3. Run docker-compose up --build.
  4. Access the app at http://localhost:5001.

Context for Maintainers

I noticed in PR #6 that you are currently evaluating architecture alternatives for the GSoC period.

This PR is a functional Proof of Concept demonstrating the Flask + MongoDB + Docker approach. It is designed to validate:

  1. Minimalism: Keeping the "Single Command" promise (docker-compose up).
  2. Core Features: Working OAuth and Image Uploading.

I understand this may be kept "On Hold" for evaluation, but I wanted to provide a working prototype to help with the architectural decision-making process.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @naurjhanvi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a Proof of Concept for the "Beehive-2.0" architecture, focusing on a simplified, single-command installation process. It establishes a monolithic Flask application with MongoDB as its database, all orchestrated via Docker Compose. The prototype validates key architectural decisions by implementing robust authentication methods, including OAuth for GitHub and Google, and demonstrating the automatic creation of private GitHub repositories for user data. This work aims to provide a functional model for evaluating future architectural directions.

Highlights

  • Simplified Installation: Implements a single-command setup using Docker Compose for the entire application stack, including the Flask app and MongoDB database.
  • Architectural Shift: Transitions to a Flask (Python) backend with MongoDB for metadata storage, replacing a potentially more complex multi-service setup and demonstrating a monolithic approach.
  • Robust Authentication: Integrates both local username/password authentication and OAuth support for GitHub and Google logins, enhancing user access options.
  • Automated Private Vaults: Demonstrates the creation of private GitHub repositories for users upon GitHub login, showcasing the 'Vault' concept for secure data storage.
  • Containerized Environment: Provides a fully Dockerized solution, ensuring consistent deployment, ease of development, and simplified environment management.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a great proof-of-concept for simplifying the application's architecture and deployment process using Flask, MongoDB, and Docker. The single-command setup with docker-compose is well-implemented. My review focuses on improving security, stability, and adherence to production best practices. I've identified a couple of critical security issues related to a hardcoded secret key and running the app in debug mode, which should be addressed immediately. I've also included suggestions for pinning dependencies, using a production-grade web server, and improving the Docker build process. Overall, this is a strong foundation for the new architecture.

@mdxabu mdxabu added the on hold Not merging this PR now. label Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold Not merging this PR now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants