An AI-powered, open-source Streamlit application for preserving Indian culture and diversity through multi-media corpus collection with persistent data storage and secure authentication.
- Multi-Category Collection: 10 API-compatible categories optimized for cultural preservation
- Multi-Media Support: Text, Image, Audio, and Video uploads with chunked upload
- Backend Integration: Full API connectivity with environment-based configuration
- Secure Authentication: Phone/OTP authentication with JWT token management
- User Dashboard: Track contributions, view stats, and manage content
- Modern UI: Professional dark/light theme with square category buttons
- Top Navigation: Clean navbar with Home, Contribute, Dashboard, Browse, About, and Logout
- Multilingual: Support for 12+ Indian languages
# Copy environment template
cp .env.example .env
# Edit .env with your API credentials
# Update API_BASE_URL and JWT_SECRET_KEYpip install -r requirements.txt# Method 1: Using runner script (Recommended)
python run.py
# Method 2: Direct streamlit
streamlit run app.pyEdit .env file with your actual values:
API_BASE_URL=https://your-actual-api-domain.com
JWT_SECRET_KEY=your-actual-jwt-secret-keyOpen your browser to http://localhost:8501
βββ app.py # Main Streamlit application
βββ config.py # Environment-based configuration
βββ run.py # Application runner with setup
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ utils/ # Utility modules
β βββ api_client.py # Backend API integration
β βββ categories.py # Category management
β βββ file_upload.py # Chunked file upload
β βββ geospatial.py # Location-based features
β βββ permissions.py # Role-based access control
β βββ data_export.py # Data export functionality
βββ admin_panel.py # Admin management interface
βββ README.md # Documentation
- Register: Create account with email, name, and password
- Secure Storage: Passwords hashed with bcrypt
- Persistent Sessions: User data survives app restarts
- Login Validation: Only registered users can access
- Login: Access with your registered credentials
- Select Category: Choose from 23+ cultural categories with matching emojis
- Choose Media Type: Text, Image, Audio, or Video
- Upload Content: Add your cultural contribution
- Add Metadata: Title, description, language, and privacy settings
- Submit: Contribution saved permanently to disk
- Total Contributions: Count of all your submissions
- Storage Usage: Track total file sizes
- Category Breakdown: See which categories you've contributed to
- Public vs Private: Monitor your public contributions
- Recent Activity: View your latest submissions
- Filter Options: By category, media type, and language
- Community Gallery: Discover contributions from other users
- Search Functionality: Find specific cultural content
- bcrypt Hashing: Military-grade password security
- Session Management: Secure user sessions
- Access Control: Protected routes and data
- User Credentials:
data/users.json(passwords hashed) - Contributions:
data/contributions.json+ individual files - Media Files:
data/uploads/directory - Backup System: Multiple storage formats for reliability
- Type Validation: Only allowed file types accepted
- Size Limits: Text (200KB), Image (10MB), Audio (25MB), Video (100MB)
- Sanitization: Files processed and validated
- Secure Storage: Protected file system access
10 API-Compatible Categories:
| Category | Description |
|---|---|
| Art π¨ | Creative works, paintings, sculptures, and artistic expressions |
| Culture ποΈ | Traditions, customs, folklore, people, and cultural practices |
| Food π | Culinary content, recipes, agriculture, and food-related information |
| Literature π | Books, poems, stories, newspapers, and written works |
| Music π΅ | Musical content, songs, instruments, and audio experiences |
| Architecture ποΈ | Buildings, structures, monuments, and architectural designs |
| Education π | Learning materials, skills, tutorials, and educational content |
| Flora πΈ | Plants, flowers, trees, vegetation, and botanical content |
| Fauna π¦ | Animals, wildlife, birds, and zoological content |
| Events π | Festivals, celebrations, ceremonies, and special occasions |
Edit the CATEGORIES dictionary in app.py:
CATEGORIES = {
"Art": "π¨",
"Your New Category": "π"
}Update the language list in the contribute function:
language = st.selectbox("Language", [
"English", "Hindi", "Telugu", "Your Language"
])# Set production environment
export STREAMLIT_SERVER_PORT=8501
export STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Run with production settings
streamlit run app.py --server.port 8501 --server.address 0.0.0.0- Create a new Space on Hugging Face
- Upload all project files
- Ensure
requirements.txtincludes all dependencies - Deploy with Streamlit SDK
# Backup user data
cp data/users.json backup/users_backup.json
# Backup contributions
cp data/contributions.json backup/contributions_backup.json
# Backup media files
cp -r data/uploads/ backup/uploads_backup/# Clear all data (WARNING: Irreversible)
rm -rf data/
python init_data.py- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Submit a pull request
This project is open-source and available under the MIT License. See LICENSE file for details.
- Issues: Create an issue on the repository
- Documentation: Check the code comments and docstrings
- Community: Join discussions in the repository
- Advanced search and filtering
- Export functionality for researchers
- AI-powered content tagging
- Community voting and curation
- Mobile-responsive design improvements
- Multi-language UI support
Preserving Indian Culture & Diversity - One Contribution at a Time ποΈ
Built with β€οΈ using Streamlit, bcrypt, and modern web technologies