Skip to content

aerwin-ds/GradeReporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Grade Reporter β€” Modular Architecture

A collaborative grade reporting system built with Streamlit and modular Python architecture, designed to scale from 4 to 8+ features.

🎯 Current Status

Phase: Migrating from notebook to modular architecture Branch: feat/dev-environment-refactor

Features Implemented (from Notebook)

  1. Authentication & RBAC (Autumn Erwin) - Role-based access control
  2. Announcements System (Meetika Kanumukula) - Teacher/admin announcements
  3. Parent Engagement Tools (Keith) - Parent-teacher communication
  4. After-Hours Question System (Jaikishan) - Timezone-aware Q&A
  5. AI Progress Reports (Autumn Erwin) - LangChain + Google Gemini powered student reports

Future Features (Planned)

  1. Feature 6 (TBD)
  2. Feature 7 (TBD)

Recently Implemented

  1. Low Grade Alerts & Improvement Guidance - Automatic alerts for low grades with personalized guidance

πŸš€ Quick Start

See QUICKSTART.md for a 5-minute setup guide.

1. Environment Setup

# Clone and navigate to project
cd GradeReporter

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt

2. Configure Environment

# Copy environment template
cp .env.example .env

# Edit .env and add your Google API key for AI features
# GOOGLE_API_KEY=your-api-key-here
# Get your free API key at: https://makersuite.google.com/app/apikey

# Create test database with sample data
python scripts/create_test_db.py

Test Credentials: All use password password

3. Verify Setup

# Run smoke tests
python scripts/smoke_test.py

4. Run Application

streamlit run app.py

Access at: http://localhost:8501

5. Run Tests

# Run unit tests
pytest tests/

# Run with coverage
pytest tests/ --cov=src

πŸ“ Project Structure

GradeReporter/
β”œβ”€β”€ app.py                      # Main Streamlit entry point
β”œβ”€β”€ config/                     # Configuration management
β”‚   β”œβ”€β”€ settings.py            # Centralized settings
β”‚   └── database.py            # Database connections
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/                  # Shared functionality
β”‚   β”‚   β”œβ”€β”€ auth.py           # Authentication
β”‚   β”‚   β”œβ”€β”€ rbac.py           # Role-based access
β”‚   β”‚   β”œβ”€β”€ session.py        # Session management
β”‚   β”‚   └── decorators.py     # Auth decorators
β”‚   β”œβ”€β”€ features/              # Feature modules
β”‚   β”‚   β”œβ”€β”€ authentication/
β”‚   β”‚   β”œβ”€β”€ announcements/
β”‚   β”‚   β”œβ”€β”€ parent_engagement/
β”‚   β”‚   β”œβ”€β”€ after_hours/
β”‚   β”‚   β”œβ”€β”€ ai_progress_reports/
β”‚   β”‚   β”œβ”€β”€ low_grade_alerts_guidance/
β”‚   β”‚   └── feature_6-7/      # Future features
β”‚   β”œβ”€β”€ models/                # Data models
β”‚   β”œβ”€β”€ utils/                 # Utilities
β”‚   └── ui/                    # Streamlit UI
β”‚       β”œβ”€β”€ components/        # Reusable components
β”‚       └── pages/             # Page components
β”œβ”€β”€ scripts/                   # Database & utility scripts
β”œβ”€β”€ tests/                     # Test suite
β”œβ”€β”€ data/                      # Database files (gitignored)
└── notebooks/                 # Original notebook (reference)

πŸ—οΈ Architecture

Three-Layer Pattern

Each feature follows a clean separation:

  1. Repository Layer (repository.py) - Database access only
  2. Service Layer (service.py) - Business logic
  3. UI Layer (ui.py) - Streamlit presentation

Example Feature Structure

src/features/feature_name/
β”œβ”€β”€ __init__.py
β”œβ”€β”€ repository.py      # Data access
β”œβ”€β”€ service.py         # Business logic
└── ui.py             # Streamlit UI

πŸ‘₯ Team Collaboration

Git Workflow

# Create feature branch
git checkout -b feat/feature-name

# Make changes and commit
git add .
git commit -m "feat: description of changes"

# Push and create PR
git push -u origin feat/feature-name

Rules

  • βœ… Always work on feature branches
  • βœ… Create PRs for all changes
  • βœ… Require code review before merge
  • ❌ Never push directly to main

πŸ”§ Development

Adding a New Feature

# 1. Create feature module
mkdir -p src/features/feature_name
touch src/features/feature_name/{__init__.py,service.py,repository.py,ui.py}

# 2. Enable feature in .env
echo "FEATURE_NEW_FEATURE=True" >> .env

# 3. Add navigation in src/ui/components/navigation.py

# 4. Implement repository β†’ service β†’ UI layers

# 5. Write tests
touch tests/test_feature_name.py

Running Tests

pytest tests/
pytest tests/ --cov=src  # With coverage

Code Quality

# Format code
black src/

# Lint
flake8 src/

# Type check
mypy src/

πŸ“š Documentation

  • QUICKSTART.md - 5-minute setup guide
  • TESTING.md - Comprehensive testing guide
  • MIGRATION_GUIDE.md - Detailed migration instructions
  • Feature Documentation - See individual feature README files (coming soon)
  • API Documentation - Generated from docstrings

πŸ”‘ Key Technologies

  • Frontend: Streamlit
  • Database: SQLite + SQLAlchemy
  • Authentication: bcrypt
  • AI/LLM: LangChain + Google Gemini 2.5 Flash
  • Testing: pytest
  • Code Quality: black, flake8, mypy

πŸ› Troubleshooting

Import Errors

Run from project root:

cd GradeReporter
streamlit run app.py

Database Not Found

Ensure databases are in data/ directory:

ls -la data/

Clear Cache

rm -rf .streamlit/

πŸ“ Migration Status

See MIGRATION_GUIDE.md for detailed migration progress and instructions.

🀝 Team

  • Autumn Erwin - Authentication & RBAC
  • Meetika Kanumukula - Announcements System
  • Keith - Parent Engagement Tools
  • Jaikishan - After-Hours Question System

πŸ“„ License

[Add license information]


Note: Original notebook preserved in notebooks/GradeReporter_Demo_1.ipynb for reference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5