How sanjit2/glassbox_ works
glassBox is a workspace collaboration and coding-challenge platform: users register or sign in, create or join groups, work on shared templates through independent file versions, and run tests in an isolated container. The backend owns authentication, group/profile management, file permissions and persistence; the Next.js frontend provides the user-facing pages and API client. README capabilities such as group analytics and evaluation are included where the tree supports them. Frontend-to-backend call paths are not evidenced in the sampled sources, so those links are omitted.
Main entry points: database.py Database sessions · models.py Domain models · main.py FastAPI app · auth_routes.py Auth endpoints
Components 19
Web application
- Next.js pages
frontend/src/app - Group workspace
frontend/src/app/dashboard/group/[id]/page.js - Group dashboard
frontend/src/app/dashboard/page.js - Evaluation page
frontend/src/app/evaluate/page.js - API client
frontend/src/lib/api.js - Auth context
frontend/src/lib/auth.js
Identity and access
- FastAPI app
backend/main.py - Auth endpoints
backend/routes/auth_routes.py - JWT and passwords
backend/auth.py - Request validation
backend/schemas.py
Groups and files
- Group management
backend/routes/group_routes.py - Template and versions
backend/routes/file_routes.py
Test execution
- Test orchestration
backend/routes/execution_routes.py - Isolated runner
backend/Dockerfile.runner
Data layer
- Configuration
backend/config.py - Database sessions
backend/database.py - Domain models
backend/models.py - SQL database
Other components
- User
Connections 29
- User → Next.js pages: uses
README.md - Next.js pages → Group workspace: opens workspace
README.md - Next.js pages → Group dashboard: views groups
README.md - Next.js pages → Evaluation page: opens evaluation
frontend/src/app/evaluate/page.js - FastAPI app → Auth endpoints: registers
backend/main.py - FastAPI app → Group management: registers
backend/main.py - FastAPI app → Template and versions: registers
backend/main.py - FastAPI app → Test orchestration: registers
backend/main.py - Auth endpoints → JWT and passwords: uses
backend/routes/auth_routes.py - Auth endpoints → Database sessions: queries
backend/routes/auth_routes.py - Auth endpoints → Domain models: reads and writes
backend/routes/auth_routes.py - Auth endpoints → Request validation: validates
backend/routes/auth_routes.py - Group management → Database sessions: queries
backend/routes/group_routes.py - Group management → Domain models: reads and writes
backend/routes/group_routes.py - Group management → Request validation: validates
backend/routes/group_routes.py - Template and versions → Database sessions: queries
backend/routes/file_routes.py - Template and versions → Domain models: reads and writes
backend/routes/file_routes.py - Template and versions → Request validation: validates
backend/routes/file_routes.py - Test orchestration → Database sessions: loads workspace
backend/routes/execution_routes.py - Test orchestration → Domain models: loads files
backend/routes/execution_routes.py - Test orchestration → Isolated runner: runs container
backend/routes/execution_routes.py - JWT and passwords → Database sessions: loads user
backend/auth.py - JWT and passwords → Domain models: looks up user
backend/auth.py - JWT and passwords → Configuration: reads token settings
backend/auth.py - Database sessions → Configuration: reads database URL
backend/database.py - FastAPI app → Database sessions: creates tables
backend/main.py - Database sessions → SQL database: opens sessions
backend/database.py - Domain models → Database sessions: declares entities
backend/models.py - Auth context → API client: calls
frontend/src/lib/auth.js