A Django-based dashboard application that fetches participant data from a Google Sheet, generates tech-themed aliases and avatars, and displays them in a responsive UI.
- Google Sheets Integration: Fetches real-time participant and settings data from public Google Sheet CSVs.
- Tech Aliases: Automatically generates consistent, tech-inspired aliases (e.g.,
name.sh,0xname) from user names. - Avatars: Generates unique robot avatars using the DiceBear API based on the alias.
- Easter Egg: Includes a hidden "antigravity" easter egg in the code.
-
Clone the repository:
git clone <repository-url> cd tinkerhub-dashboard
-
Create and activate a virtual environment:
# Windows python -m venv .venv .venv\Scripts\activate # macOS/Linux python3 -m venv .venv source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory (same level asmanage.py). -
Add the following environment variables:
# Security key for Django (keep this secret in production) DJANGO_SECRET_KEY=django-insecure-your-secret-key-here # URL to the published Google Sheet CSV for Participants # Columns expected: Name, Role, Domain # Example: https://docs.google.com/spreadsheets/d/e/.../pub?output=csv GSHEET_URL=https://docs.google.com/spreadsheets/d/your-sheet-id/pub?output=csv # URL to the published Google Sheet CSV for Settings # Columns expected: Key, Value # Example keys: event_name, bg_url GOOGLE_SHEETS_SETTINGS=https://docs.google.com/spreadsheets/d/your-settings-sheet-id/pub?output=csv
Run the standard Django migrations to set up the SQLite database:
python manage.py migrate-
Start the development server:
python manage.py runserver
-
Access the dashboard: Open your browser and navigate to
http://127.0.0.1:8000/.
To verify that the application is running correctly and returning expected data (including checking for the easter egg and fallback data), you can run the included verification script:
python verify.py
# or for more detailed checks
python verify_fix.py- Alias Generation: The
generate_tech_aliasfunction indashboard/views.pycreates a deterministic tech-themed suffix for each name. - Avatar Generation: The
generate_avatar_urlfunction uses the generated alias as a seed for the DiceBear Bottts style. - Data Fetching: Data is fetched from Google Sheets via the URLs configured in
.env. If fetching fails, fallback data is used for demonstration.
- Missing Data: Ensure your
GSHEET_URLandGOOGLE_SHEETS_SETTINGSare correct and the Google Sheets are published to the web as CSV. - Environment Variables: Make sure
.envis in the root directory and you have restarted the server after making changes to it. - Dependencies: Ensure all requirements are installed in your virtual environment.