Architecture
This document explains the UC ORB Showcase system architecture and how components interact.
System Overview
UC ORB Showcase architecture:
Frontend Architecture
Location: /frontend/
The frontend is a Next.js application with the App Router.
Key Components:
- Pages (
app/
): Route handlers and page components - Components (
components/
): Reusable UI components - State (
store/
): Zustand store for client-side state - Styles (
globals.css
, Tailwind): Application styling
State Management:
Zustand store (store/repositories.ts
) manages:
- Repository data and filters
- Search terms and selected options
- UI state for filtering
Data Flow:
- User interacts with UI components
- Components read/update Zustand state
- TanStack React Query fetches data from backend API
- UI re-renders based on state changes
Main Pages:
/
- Homepage/repositories
- Repository listing/about
- About page/connect
- Contact/submission page
Backend Architecture
Location: /backend/
FastAPI application providing REST API endpoints.
Key Files:
main.py
- FastAPI app, routes, and endpointsmodels.py
- SQLModel database modelsdatabase.py
- Database connection and session managementkeys.py
- Environment variable configuration
Database Model:
Uses showcase_view
table with repository information including name, description, university, language, and metadata.
API Endpoints:
GET /repositories
- List repositories with filteringGET /languages
- Get unique programming languagesGET /universities
- Get unique universitiesGET /licenses
- Get unique licensesGET /owners
- Get unique repository ownersGET /topics
- Get unique topic areas
Database Architecture
Technology: PostgreSQL
Main Table:
showcase_view
- Primary table containing repository information
Data Source:
The database is populated from GitHub repository data and contains:
- Repository metadata (stars, forks, language)
- UC affiliation information
- Contact and funding details
- Topic area classifications
Docker Configuration
File: docker-compose.yml
Services:
- backend - FastAPI application (port 8000)
- frontend - Next.js application (port 3000)
Networking:
- Uses
local-dev-net
external network - Services communicate via service names
- Volume mounts for development
Configuration
Backend: Database connection via POSTGRES_DB_URL
environment variable
Frontend: API URL via NEXT_PUBLIC_API_URL
environment variable