How treat1337/project-1-code-analysis works
This is a C++ programming-practice and code-analysis platform: learners browse Project_CodeNet problems, run code, and submit it for compiler checks, AI labeling, and saved history. The main path is browser → Go submission service → compiler and AI services → SQLite-backed results. A separate FastAPI service also exposes problem, judging, AI, and taxonomy/RAG capabilities; testcase generation is an additional domain. Some links are documented in the README, while unsampled implementation details are not asserted.
Main entry points: main.py FastAPI application · app.js Practice UI · code_service.go Submission service · ai.py AI analysis API
Components 24
Learner interface
- Practice UI
app/static/js/app.js - Code editor
app/static/js/editor.js
Python API services
- FastAPI application
app/main.py - Problem catalog API
app/api/problems.py - Code judge API
app/api/judge.py - AI analysis API
app/api/ai.py - Taxonomy admin API
app/api/admin_rag.py - CodeNet problems
app/services/dataset_loader.py
Code analysis
- C++ runner
app/services/cpp_runner.py - Owen RAG analysis
app/services/owen_rag_pipeline.py - Code classifiers
app/services/neural_classifier.py
Go accounts and submissions
- Go backend
backend/cmd/server/main.go - Account service
backend/internal/services/auth_service.go - Submission service
backend/internal/services/code_service.go - Compiler client
backend/internal/services/compiler_client.go - AI client
backend/internal/services/ai_client.go - Submission repositories
backend/internal/repositories/submission_repo.go - SQLite database
backend/internal/database/sqlite.go
Taxonomy and testcases
- Error taxonomy
app/services/taxonomy.py - Label RAG store
app/services/label_rag.py - Testcase loader
app/services/testcase_loader.py - Testcase generator
testcase_generator/main.py - Testcase storage
testcase_generator/storage/testcase_writer.py
Other components
- Learner
Connections 26
- Learner → Practice UI: uses
README.md - Practice UI → Code editor: edits code
README.md - Practice UI → Go backend: submits code
README.md - Practice UI → FastAPI application: browses and runs
README.md - FastAPI application → Problem catalog API: registers
app/main.py - FastAPI application → Code judge API: registers
app/main.py - FastAPI application → AI analysis API: registers
app/main.py - FastAPI application → Taxonomy admin API: registers
app/main.py - Problem catalog API → CodeNet problems: loads problems
app/api/problems.py - Code judge API → C++ runner: runs code
app/api/judge.py - Code judge API → Testcase loader: loads cases
app/api/judge.py - AI analysis API → Code classifiers: classifies code
app/api/ai.py - AI analysis API → Owen RAG analysis: analyzes errors
app/api/ai.py - Owen RAG analysis → Label RAG store: retrieves references
app/services/owen_rag_pipeline.py - Owen RAG analysis → Error taxonomy: selects labels
app/services/owen_rag_pipeline.py - Taxonomy admin API → Error taxonomy: manages labels
app/api/admin_rag.py - Taxonomy admin API → Label RAG store: manages documents
app/api/admin_rag.py - Go backend → Account service: routes account actions
- Go backend → Submission service: routes code actions
- Submission service → Compiler client: checks code
README.md - Submission service → AI client: requests analysis
README.md - Submission service → Submission repositories: saves submissions
README.md - Submission repositories → SQLite database: reads and writes
- Compiler client → C++ runner: calls run API
README.md - AI client → AI analysis API: calls predict API
README.md - Testcase generator → Testcase storage: writes testcases
testcase_generator/main.py