Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ddb8d9d
Add HMC footer and header to layout, App is not well embeded yet.
broeder-j Aug 23, 2022
aa027a9
Merge branch 'dev' into hmc_specific
broeder-j Aug 24, 2022
6d08b1c
Properly place dashboard between HMC header and footer, through foote…
broeder-j Aug 24, 2022
d170f9f
Merge dev into hmc_specific
broeder-j Aug 30, 2022
4df359c
merge dev into hmc_specific
broeder-j Feb 27, 2023
f9098cc
Add first dirty Jinja2 template created out of HMC webpage html and s…
broeder-j Feb 28, 2023
14fdbd9
Merge branch 'dev' into hmc_specific
broeder-j Mar 13, 2023
d40e6a3
First Dockerfiles for container deployment
broeder-j Mar 13, 2023
82c93f7
page layout modification
SilkeGerlich Mar 14, 2023
d66bf10
Improve the English jinjia template and create a german one
broeder-j Mar 14, 2023
7577dc5
- modified page footer
SilkeGerlich Mar 14, 2023
72bf03e
Merge branch 'hmc_specific' of github.com:Materials-Data-Science-and-…
SilkeGerlich Mar 14, 2023
d0fe0e0
Merge branch 'dev' into hmc_specific
broeder-j Mar 14, 2023
496a647
Merge branch 'dev' into hmc_specific
broeder-j Mar 14, 2023
0f41961
Merge branch 'hmc_specific' of github.com:Materials-Data-Science-and-…
broeder-j Mar 14, 2023
f086250
Merge branch 'dev' into hmc_specific
broeder-j Mar 14, 2023
f67ac9c
Merge branch 'dev' into hmc_specific
broeder-j Mar 16, 2023
1a2a264
Introduce sizing mode to make text, sections and accordion responsive
broeder-j Mar 16, 2023
f9033cf
Do not show header text in Panel app anymore
broeder-j Mar 17, 2023
d634647
Make wordcloud tab a bit larger, revert field filter to life science …
broeder-j Mar 17, 2023
0215862
Merge branch 'dev' into hmc_specific
broeder-j Mar 17, 2023
4ea4644
frontend update en
SilkeGerlich Mar 17, 2023
2dbd16f
- updated images on landing page
SilkeGerlich Mar 17, 2023
418f416
added Icon & Flavicon to html template
SilkeGerlich Mar 17, 2023
428d8f6
Merge dev into hmc_specific
broeder-j Mar 21, 2023
ff65e38
Merge dev into hmc_specific
broeder-j Mar 21, 2023
0d5a8f6
Update link to german version in template
broeder-j Mar 22, 2023
51681bf
Delete english sentence from de template
broeder-j Mar 22, 2023
bf90bc8
Add subdomain name in the footer, since wanted by office.
broeder-j Apr 4, 2023
ff9f392
Change heades of Accordion and method tab
broeder-j Apr 4, 2023
2bf41f8
Merge branch 'dev' into hmc_specific
broeder-j Apr 4, 2023
27538ba
Fix mailto statement
broeder-j Apr 4, 2023
ce8ede0
Add linked-im am mastrodon logo, as well as opening in tabs of imprint.
broeder-j Jan 30, 2024
8bc32eb
Change twitter logo to X logo.
broeder-j Mar 22, 2024
9d5a757
Add jsonld metadata to website, this solves issue # 20.
broeder-j Mar 22, 2024
a121e38
make it work with not cleaned data
mustafasoylu May 7, 2025
96ff004
no relative import
mustafasoylu May 7, 2025
9176b6f
updated packages, updated code to handle breaking changes
FionaDmello Aug 25, 2025
fea8543
script to run the app locally
FionaDmello Aug 25, 2025
559c63b
automatically generated draft of data clean up script to enable testi…
FionaDmello Aug 25, 2025
73d56f9
added some of the hmc layout files and related code and updated the r…
FionaDmello Aug 25, 2025
fb8a638
Merge branch 'hmc_layout_updated' into enhancement/use-hmc-styling
FionaDmello Sep 1, 2025
d4b0b6d
got the hmc styles to apply to the dashboard
FionaDmello Sep 1, 2025
6959f3f
draft script to process data for app by reverse engineering
FionaDmello Sep 1, 2025
e8a9f3b
updated template to handle bokehjs race condition with panel initiali…
FionaDmello Sep 1, 2025
7dd4d2a
fixed overscroll styling issues that prevented user from scroll being…
FionaDmello Sep 2, 2025
d0213c0
made the accordions in the app responsive to show the plots properly
FionaDmello Sep 2, 2025
d095ba8
added some padding within each row of the accordion content
FionaDmello Sep 2, 2025
1b2f718
fixed showing of all data when the all filter alone is selected
FionaDmello Sep 2, 2025
06eb25d
got data from multiple filters to show in the community profile plots
FionaDmello Sep 2, 2025
7ad5511
trying to show the right data on the graph for community profiles - n…
FionaDmello Sep 2, 2025
85189c8
fixed y-scale cut off issues, scales are adjusted as per max value
FionaDmello Sep 9, 2025
320e10c
added a pie chart theme and fixed the pie chart cut off issue with ex…
FionaDmello Sep 9, 2025
ff6ac6c
got the horizontal bar visualization working
FionaDmello Sep 9, 2025
80dc679
fix: correct axis label swapping for horizontal bar charts
FionaDmello Sep 9, 2025
f81aec4
updated copyright year and small footer fix
FionaDmello Sep 9, 2025
a49000a
refactored code in main.py for modularity and simplicity
FionaDmello Sep 10, 2025
fae4a62
fixed some linting errors and path import issue
FionaDmello Sep 10, 2025
cf0dbbc
improved project structure and further refactoring for better modular…
FionaDmello Sep 10, 2025
3feca19
cleaned unnecessary files, fixed issue with event handling via params
FionaDmello Sep 10, 2025
402ff2b
enabled selection and change of visualization type by binding the int…
FionaDmello Sep 10, 2025
eecc49f
updated README and cleaned up some more
FionaDmello Sep 10, 2025
ad4c429
major project clean up, structure refactoring, documentation updates
FionaDmello Sep 15, 2025
4892780
getting the bars to show up appropriately when multiple research area…
FionaDmello Sep 26, 2025
f5a54e2
separation of handling aggregation filters and real value based filte…
FionaDmello Sep 26, 2025
c8cd591
fixed correlational graph functionality
FionaDmello Oct 16, 2025
22721cf
cleaned up the codebase from unnecessary logs and fixed some warnings…
FionaDmello Oct 16, 2025
f326bbc
removed language picker from the header
FionaDmello Oct 17, 2025
fa67835
fresh dockerized set up of the app
FionaDmello Nov 3, 2025
86cf93e
added deployment configurations
FionaDmello Nov 3, 2025
f1cb713
updated gitignore
FionaDmello Nov 3, 2025
bf374a1
changes related to deployment testing
FionaDmello Nov 4, 2025
a861310
updated banner title texts
FionaDmello Nov 4, 2025
145cfa9
added a link to the navbar to the new survey
FionaDmello Nov 4, 2025
fa7fbc2
added hifis-din fonts to the dashboard
FionaDmello Nov 4, 2025
6bdb7da
removing code that caused halvar font requests
FionaDmello Nov 4, 2025
1de2e8f
repository clean up and readme update
FionaDmello Nov 4, 2025
b7f0d92
adding local testing notes and open fonts for easy access
FionaDmello Nov 5, 2025
07b4f09
using published data to power the survey dashboard
FionaDmello Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# .dockerignore - Excludes files from Docker build context
# Reduces build time, image size, and prevents leaking sensitive data

# Version control
.git/
.gitignore
.github/

# Python cache and compiled files
__pycache__/
*.py[cod]
*$py.class
*.so
.pytest_cache/

# Virtual environments
.venv/
venv/
env/
ENV/
.poetry/

# Environment variables (SECURITY: never include secrets in images)
.env
.env.*

# Documentation
# Keep README.md for Poetry package installation
# *.md # Commented out to allow README.md
docs/
LICENSE

# Development and testing
.pre-commit-config.yaml
.ropeproject/
tests/
test_*.py

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Docker files (don't need these inside the image)
Dockerfile
Dockerfile.*
docker-compose.yml
docker-compose.*.yml
.dockerignore

# Build artifacts
dist/
build/
*.egg-info/
*.egg
.eggs/

# Logs
*.log
logs/

# OS files
.DS_Store
Thumbs.db
Desktop.ini

# Temporary files
*.tmp
*.temp
tmp/
temp/

# Coverage reports
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover
.hypothesis/
75 changes: 75 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Environment Variables Template for Survey Dashboard
# Copy this file to .env and update with your actual values
# Command: cp .env.example .env

# ============================================================================
# Docker Compose Configuration
# ============================================================================

# Project name - used as prefix for container names
# Example: survey-dashboard_nginx_1, survey-dashboard_dashboard_1
COMPOSE_PROJECT_NAME=survey-dashboard

# ============================================================================
# Application Configuration
# ============================================================================

# Port the Panel application runs on inside the container
# Default: 5006 (Panel's default port)
APP_PORT=

# ============================================================================
# Nginx Configuration
# ============================================================================

# Port nginx exposes on the host machine
# Default: 80 (standard HTTP port), 443 (standard HTTPS port)
# Change to 8080/8443 if 80/443 are already in use
NGINX_PORT=

# Your domain name
# IMPORTANT: For HTTPS to work, this MUST be a real domain that points to your server
# In development: Use 'localhost' (HTTPS won't work, only HTTP)
# In production: Use your actual domain (e.g., survey.example.com)
# This domain is used by:
# - nginx-proxy: Routes traffic from this domain to the dashboard
# - acme-companion: Requests SSL certificate for this domain from Let's Encrypt
HOST=

# Path on the domain where the dashboard is accessible
# If set, the dashboard will ONLY be accessible at this specific path
# Examples:
# - VIRTUAL_PATH=/survey-dashboard → https://your-domain.com/survey-dashboard
# - VIRTUAL_PATH=/dashboard → https://your-domain.com/dashboard
# - Leave empty for root path → https://your-domain.com/
# IMPORTANT: Must start with / (forward slash)
# All other paths on this domain will return 404
VIRTUAL_PATH=

# ============================================================================
# SSL/HTTPS Configuration (Let's Encrypt)
# ============================================================================

# Your email address for Let's Encrypt certificate registration
# REQUIRED for production HTTPS deployment
# Let's Encrypt uses this email to:
# - Send certificate expiration warnings (if auto-renewal fails)
# - Send security notices about your certificates
# - Contact you about your Let's Encrypt account
# Example: admin@example.com or your-email@gmail.com
LETSENCRYPT_EMAIL=

# ============================================================================
# Python Configuration
# ============================================================================

# Keep Python output unbuffered for better logging
PYTHONUNBUFFERED=1

# ============================================================================
# NOTES
# ============================================================================
# - Never commit the .env file to version control
# - .env is listed in .gitignore to prevent accidental commits
# - Update .env.example when adding new environment variables
# - In production, consider using Docker secrets or a secrets manager
83 changes: 83 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Environment Variables for LOCAL TESTING
# Copy this file to .env.local for local Docker testing
# Command: cp .env.local.example .env.local

# IMPORTANT: This is for LOCAL TESTING ONLY
# For production deployment, use .env.example instead

# ============================================================================
# Docker Compose Configuration
# ============================================================================

# Project name - use different name to avoid conflicts with production
COMPOSE_PROJECT_NAME=survey-dashboard-local

# ============================================================================
# Application Configuration
# ============================================================================

# Port the Panel application runs on inside the container
APP_PORT=5006

# ============================================================================
# Nginx Configuration
# ============================================================================

# Port nginx exposes on the host machine
# Default: 80 for HTTP
# If port 80 is in use, change to 8080 or another available port
NGINX_PORT=80

# Domain name - use localhost for local testing
# IMPORTANT: HTTPS will NOT work with localhost (Let's Encrypt requires real domains)
# You can only test HTTP locally
HOST=localhost

# Path on the domain where the dashboard is accessible
# Test the same path you'll use in production
# Example: VIRTUAL_PATH=/2021community
# Leave empty to serve from root: http://localhost/
VIRTUAL_PATH=/2021community

# ============================================================================
# SSL/HTTPS Configuration (Let's Encrypt)
# ============================================================================

# Dummy email for local testing
# This is not used when HOST=localhost (Let's Encrypt won't run)
# In production, use a real email address
LETSENCRYPT_EMAIL=test@localhost

# ============================================================================
# Python Configuration
# ============================================================================

# Keep Python output unbuffered for better logging
PYTHONUNBUFFERED=1

# ============================================================================
# LOCAL TESTING NOTES
# ============================================================================

# What works locally:
# ✅ Docker build and container startup
# ✅ HTTP access at http://localhost/2021community
# ✅ Path routing and restrictions
# ✅ WebSocket connections
# ✅ Dashboard interactivity
# ✅ Container restarts and rebuilds

# What does NOT work locally:
# ❌ HTTPS/SSL certificates (requires real domain)
# ❌ Let's Encrypt certificate acquisition (localhost is not valid)
# ❌ External access from internet (only local machine)

# How to test:
# 1. Copy this file: cp .env.local.example .env.local
# 2. Start containers: docker-compose --env-file .env.local up -d --build
# 3. Test in browser: http://localhost/2021community
# 4. Follow LOCAL_TESTING.md for detailed testing scenarios

# Cleanup after testing:
# docker-compose --env-file .env.local down
# docker-compose --env-file .env.local down -v # Remove volumes too
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# custom
*.csv
responses_cleaned_mapped_to_publish.csv
#survey_dashboard/hmc_layout/static/en_files/fonts/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -106,13 +107,17 @@ celerybeat.pid

# Environments
.env
.env.local
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Deployment files (may contain sensitive server info)
DEPLOYMENT.md

# Spyder project settings
.spyderproject
.spyproject
Expand All @@ -130,3 +135,7 @@ dmypy.json

# Pyre type checker
.pyre/


# Claude
.claude/
44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Multi-stage build for survey dashboard
# Stage 1: Builder - installs dependencies
FROM python:3.12-slim as builder

# Install poetry
RUN pip install --no-cache-dir poetry==1.8.2

WORKDIR /app

# Copy dependency files first (for Docker layer caching)
COPY pyproject.toml poetry.lock README.md ./

# Configure poetry to not create virtual environment (we're in a container)
RUN poetry config virtualenvs.create false

# Install dependencies (excluding dev dependencies)
# --no-root: Don't install the project itself, only dependencies
RUN poetry install --only main --no-root --no-interaction --no-ansi

# Stage 2: Final runtime image
FROM python:3.12-slim

WORKDIR /app

# Copy installed packages from builder stage
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin

# Copy application code
COPY survey_dashboard/ ./survey_dashboard/
COPY pyproject.toml ./

# Create a non-root user for security
RUN useradd -m -u 1000 appuser && \
chown -R appuser:appuser /app

USER appuser

# Expose the application port
EXPOSE 5006

# Run the application in production mode
# Use python -m to run the module directly since we installed with --no-root
CMD ["python", "-m", "survey_dashboard.scripts", "--production", "--host", "0.0.0.0", "--port", "5006"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Materials Data Science and Informatics
Copyright (c) 2025 Materials Data Science and Informatics

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading