This is an MSME (Micro, Small & Medium Enterprise) Business Management Platform built with Streamlit. The application provides role-based access control for Admins and Shop Owners, featuring inventory management capabilities, document-based knowledge retrieval using RAG (Retrieval-Augmented Generation), and AI-powered chat assistance. The platform enables businesses to manage their inventory through CRUD operations, upload and query documents for knowledge management, and interact with AI chatbots for business assistance.
- Framework: Streamlit web application framework
- Layout: Wide layout with expandable sidebar for navigation
- Authentication: Token-based authentication with role-based access control
- Session Management: Streamlit session state for user authentication and role persistence
- Application Structure: Modular design with separate utility modules for different functionalities
- Core Modules:
auth_utils.py: Authentication and authorization logicinventory_utils.py: Inventory management operationsrag_utils.py: Document processing and knowledge retrievalchat_utils.py: AI chat functionalitydatabase_init.py: Database initialization and schema setup
- Primary Database: SQLite for inventory management
- Single table design with auto-incrementing primary keys
- Indexed product names for optimized search performance
- Timestamp tracking for creation and updates
- Vector Storage: FAISS (Facebook AI Similarity Search) for document embeddings
- Separate vector stores for Admin and Shop Owner roles
- Persistent storage using pickle for text chunks
- Flat L2 distance indexing for similarity search
- Token-based Authentication: Simple token validation system
- Role-based Access Control: Two distinct roles (Admin and Shop Owner)
- Configuration: Environment variables and Streamlit secrets for token management
- Session Persistence: Authentication state maintained in Streamlit session
- Embedding Model: SentenceTransformers 'all-MiniLM-L6-v2' for text vectorization
- Language Model: Google Gemini 2.5 Flash for response generation
- RAG Implementation: Custom retrieval-augmented generation for document queries
- Document Processing: PDF text extraction using PyPDF2
- Inventory Management: CSV import/export functionality with schema validation
- Document Processing: PDF text extraction and chunk-based indexing
- Vector Search: Similarity-based document retrieval for contextual responses
- Google Gemini API: Primary language model for chat responses and business assistance
- SentenceTransformers: Hugging Face model for text embeddings and similarity search
- pandas: Data manipulation and CSV operations for inventory management
- PyPDF2: PDF document parsing and text extraction
- FAISS: Vector similarity search and indexing
- numpy: Numerical operations for vector computations
- SQLite: Embedded database for inventory data persistence
- pickle: Python object serialization for vector store text storage
- Streamlit: Complete web application framework with built-in session management and secrets handling
- Environment Variables: Token configuration and API key management
- Streamlit Secrets: Secure configuration storage for production deployment