System Overview
High-level architecture of the Student Information System.
Architecture Diagram
┌─────────────────────────────────────────────────────────────┐
│ Client │
│ (Browser / Mobile) │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Vue 3 Frontend │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Router │ │ Stores │ │ Views │ │Components│ │
│ │(Vue Rtr)│ │(Pinia) │ │ (.vue) │ │ (.vue) │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
│ └───────────┬┴───────────┴┬───────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────┐ │
│ │ API Services │ │
│ │ (Axios + Types) │ │
│ └───────────┬─────────────┘ │
└──────────────────────────┼──────────────────────────────────┘
│ HTTP/REST (cookies)
▼
┌─────────────────────────────────────────────────────────────┐
│ Go Backend (net/http) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Router │ │Handlers │ │Services │ │ Repos │ │
│ │ (mux) │ │ (HTTP) │ │ (Logic) │ │ (DB) │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
│ └───────────┬┴───────────┴┬───────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────┐ │
│ │ Domain Modules │ │
│ │ (19 + lmsintegration) │ │
│ └───────────┬─────────────┘ │
└──────────────────────────┼──────────────────────────────────┘
│ SQL (lib/pq)
▼
┌─────────────────────────────────────────────────────────────┐
│ PostgreSQL │
│ (SIS Database) │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Valkey / Redis (Required) │
│ (Server-side session storage) │
└─────────────────────────────────────────────────────────────┘Request Flow
- User Action - User interacts with Vue component
- API Call - Component calls API service
- HTTP Request - Axios sends request with session cookie
- Middleware - Request passes through middleware chain:
- CORS
- Security headers (XSS, clickjacking, content-type)
- Body limit (1MB)
- Request timeout (60s)
- Request ID
- Real IP extraction
- Locale detection
- Logging (structured JSON via slog)
- Panic recovery
- Authentication - Session cookie validated via Valkey lookup
- CSRF Check - CSRF token validated for state-changing requests (POST, PUT, PATCH, DELETE)
- Handler - HTTP handler parses request, validates input
- Service - Business logic layer processes the request
- Repository - Data access layer queries PostgreSQL
- Response - Data returned through handler as JSON
- State Update - Pinia store updated if needed
- UI Update - Vue reactively updates display
Domain-Driven Design
The system is organized by business domain:
Backend Domains (19 total)
internal/domain/
├── academic/ # Courses, degrees, requirements, scheduling, materials
├── audit/ # Degree progress, graduation, transfer credits
├── authentication/ # Session auth, user management, magic links
├── authorization/ # RBAC, permissions, impersonation, dashboard tiles
├── billing/ # Tuition, fees, payments, refund schedules
├── core/ # Lookups, settings, email templates, currencies
├── financialaid/ # FAFSA, awards, cost estimates
├── formbuilder/ # Dynamic forms for applications
├── grading/ # Grades, GPA, transcripts
├── organization/ # Campuses, buildings, departments, colleges
├── people/ # Person records, demographics, photos
├── proxy/ # Parent/guardian delegated access
├── registration/ # Enrollment, holds, waitlists, planning
├── reporting/ # Reports, IPEDS
├── roles/ # Students, teachers, advisors, cohorts
├── testscores/ # SAT, ACT, standardized tests, superscoring
└── workflow/ # Registration workflows, automation rulesFrontend Structure
src/
├── api/ # API services and types (36 services)
├── components/ # Reusable components (67 components)
├── composables/ # Vue composables
├── router/ # Route definitions (147 routes)
├── stores/ # Pinia state stores (10 stores)
├── locales/ # i18n translation files
└── views/ # Page components (147 views, 18 directories)Key Design Decisions
Go Standard Library HTTP
Uses Go 1.22+ net/http with enhanced routing:
- Pattern matching with path parameters (
GET /api/v1/people/{personID}) - Method-based routing built into patterns
- No external router dependency
- Middleware chaining via custom chain utility
Domain Module Pattern
Each domain follows a consistent 6-file structure:
model.go- Database entity structsdto.go- Request/Response DTOs with validation tagsrepository.go- Data access layerservice.go- Business logic layerhandler.go- HTTP request handlersroutes.go- Route registration
Session-Based Authentication
Server-side session management with Valkey/Redis:
- Opaque session IDs stored in
sis_sessionHttpOnly cookie - Session data stored as JSON in Valkey with configurable TTL (default 4h)
- Sliding window renewal on each request
- Absolute session lifetime cap (default 12h)
- CSRF protection via
sis_csrfcookie (readable by JavaScript) andX-CSRF-Tokenheader sis_logged_incookie (not HttpOnly) for JavaScript to check auth state- Instant session revocation via Valkey key deletion
- Django-compatible password hashing (PBKDF2-SHA256)
Lookup Values
Configurable reference data:
- Stored in individual
lookup_*tables (e.g.,lookup_program_status) - ~110 lookup types registered in
core/lookup_registry.go - Avoids hardcoded constants
- Admin-configurable via UI
- Used for statuses, types, categories
PostgreSQL with lib/pq
- Standard
database/sqlinterface withlib/pqdriver - Connection pooling via
sql.DB(default 25 max connections) - Custom
QueryBuilderfor dynamic SQL construction - Generic
ScanRows[T]()for typed row scanning - Parameterized queries (
$1,$2, ...) for SQL injection prevention - Context-aware queries with timeouts