GSBot helps users make informed decisions about clothing by providing:
-
Sustainability scores for garments and materials
-
Environmental impact analysis (water, carbon, energy)
-
Sustainable brand discovery and comparison
-
Personalized care instructions to extend garment life
-
Gamification to encourage sustainable habits
Discord Platform
|
v
+------------------+
| Bot Layer | Discord.py, Cog-based commands
| (5 command cogs)|
+--------+---------+
|
v
+------------------+
| Service Layer | Business logic, scoring algorithms
+--------+---------+
|
v
+------------------+
| Data Layer | SQLAlchemy ORM, 4 models
+--------+---------+
|
v
+------------------+
| SQLite/Postgres|
+------------------+| Command | Description |
|---|---|
|
Get sustainability score with full environmental impact breakdown |
|
Find more sustainable options in the same category |
|
Material-specific care tips to extend garment life |
|
Random sustainability tips for conscious consumption |
| Command | Description |
|---|---|
|
Environmental scores: water, carbon, chemicals, energy, biodegradability |
|
Side-by-side material comparison with winner per category |
|
Search materials and garments by name or description |
| Command | Description |
|---|---|
|
Top 10 sustainable brands by overall rating |
|
Detailed profile: ratings, certifications, transparency, Good On You score |
| Command | Description |
|---|---|
|
Your rank, level, points, query count, preferences |
|
Top 10 sustainability champions |
|
Configure materials, budget ($-), priority (environmental/social/animal_welfare) |
-
5 environmental scores (0-100): water usage, carbon footprint, biodegradability, chemical usage, energy consumption
-
Production metrics: water L/kg, CO2 kg/kg, energy MJ/kg
-
Properties: biodegradable, recycling potential, durability
-
Types: natural, synthetic, semi-synthetic, recycled, organic
-
Category (shirt, pants, dress, etc.)
-
Material composition (many-to-many relationship)
-
Lifespan and typical wear count
-
Care instructions and washing frequency
-
Calculated sustainability score with lifespan multiplier
-
3 rating dimensions: environmental, labor, animal welfare
-
5 certification flags: B Corp, Fair Trade, Organic, Recycled Materials, Carbon Neutral
-
Transparency score
-
Good On You rating integration
gsbot/
+-- src/
| +-- bot/
| | +-- bot.py # Core bot initialization
| | +-- main.py # Entry point
| | +-- cogs/
| | +-- sustainability.py
| | +-- materials.py
| | +-- brands.py
| | +-- user_commands.py
| | +-- admin.py
| +-- models/
| | +-- base.py # BaseModel with timestamps
| | +-- material.py
| | +-- garment.py
| | +-- brand.py
| | +-- user.py
| +-- services/
| | +-- database.py # CRUD operations
| | +-- sustainability.py # Scoring algorithms
| +-- config/
| | +-- settings.py # Environment config
| +-- utils/
| +-- cache.py # TTL/LRU caching
| +-- logger.py # Colored logging
+-- tests/
| +-- unit/
| | +-- test_models.py
| | +-- test_services.py
| +-- integration/
| +-- test_bot_commands.py
+-- docs/
| +-- API.md # Full command reference
| +-- ARCHITECTURE.md # System design
| +-- DEPLOYMENT.md # Deployment guide
+-- scripts/
| +-- load_fixtures.py # Sample data
| +-- quick_start.sh
+-- ROADMAP.adoc # Development roadmap
+-- CLAUDE.md # AI assistant instructions
+-- docker-compose.yml
+-- Containerfile
+-- requirements.txt
+-- alembic.ini # Database migrations# Clone repository
git clone https://github.com/hyperpolymath/gsbot.git
cd gsbot
# Create virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your DISCORD_TOKEN
# Initialize database
alembic upgrade head
# Load sample data (optional)
python scripts/load_fixtures.py
# Run bot
python -m src.bot.mainEnvironment variables (.env):
| Variable | Description | Default |
|---|---|---|
|
Bot authentication token |
Required |
|
Command prefix |
|
|
Database connection string |
|
|
Enable query caching |
|
|
Cache time-to-live (seconds) |
|
|
Logging verbosity |
|
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/unit/test_models.py -v-
API Reference - Complete command documentation
-
Architecture - System design and patterns
-
Deployment - Production deployment guide
-
Roadmap - Development roadmap and future features
See CONTRIBUTING.md for development guidelines.
Key areas:
-
Data curation (verified material/brand datasets)
-
Test coverage expansion
-
Documentation improvements
-
Localization support
AGPL-3.0-or-later
This ensures any modifications or derivative works remain open source, protecting the sustainability mission of the project.