How ddobrev86/leetstat works
LeetStat is a Bulgarian probability-problem practice app. A user authenticates, browses and filters problems, opens one, enters answers or self-grades, and submits for a verdict; the app also tracks progress and provides curated lists, contests, leaderboards, and administration. The graph includes the documented checker and content capabilities. Some server and client modules were not excerpted, so their internal relationships are omitted or shown as unverified rather than inferred.
Main entry points: app.tsx App routing · app.ts HTTP routes · index.ts Answer checker · api.ts API client
Components 25
Practice interface
- App routing
client/src/app.tsx - Authentication UI
client/src/pages/auth/index.tsx - Session state
client/src/context/auth-context.tsx - Problem browser
client/src/pages/problem-list/index.tsx - Problem workspace
client/src/pages/problem/index.tsx - Answer entry
client/src/components/answer-panel/index.tsx - Math editor
client/src/components/math-input/index.tsx - API client
client/src/services/api.ts - Curated problems
client/src/pages/important/index.tsx - Contest interface
client/src/pages/contests/index.tsx - Progress statistics
client/src/pages/stats/index.tsx - Leaderboard interface
client/src/pages/leaderboard/index.tsx - Admin interface
client/src/pages/admin/index.tsx
Application API
- HTTP routes
server/src/app.ts - Accounts and invites
server/src/auth.ts - Contest services
server/src/contests.ts - Content loading
server/src/content.ts
Answer evaluation
- Answer checker
server/src/checker/index.ts - Expression parser
server/src/checker/parser.ts - Input lexer
server/src/checker/lexer.ts - Expression evaluator
server/src/checker/evaluate.ts - Answer constraints
server/src/checker/constraint.ts
Content and persistence
- Problem content
content - PostgreSQL store
server/src/db.ts
Other components
- Learner or admin
Connections 30
- Learner or admin → App routing: uses
README.md - App routing → Authentication UI: routes to
client/src/app.tsx - App routing → Problem browser: routes to
client/src/app.tsx - App routing → Problem workspace: routes to
client/src/app.tsx - App routing → Curated problems: routes to
client/src/app.tsx - App routing → Contest interface: routes to
client/src/app.tsx - App routing → Progress statistics: routes to
client/src/app.tsx - App routing → Leaderboard interface: routes to
client/src/app.tsx - App routing → Admin interface: routes to
client/src/app.tsx - App routing → Session state: reads session
client/src/app.tsx - Session state → API client: requests session
client/src/context/auth-context.tsx - Problem browser → API client: loads problems
client/src/pages/problem-list/index.tsx - Problem workspace → API client: loads and submits
client/src/pages/problem/index.tsx - Problem workspace → Answer entry: renders
client/src/pages/problem/index.tsx - Answer entry → Math editor: renders
client/src/components/answer-panel/index.tsx - API client → HTTP routes: calls HTTP API
- HTTP routes → Accounts and invites: mounts routes
server/src/app.ts - HTTP routes → Contest services: mounts routes
server/src/app.ts - HTTP routes → Answer checker: checks submissions
server/src/app.ts - HTTP routes → Content loading: uses content
server/src/app.ts - HTTP routes → PostgreSQL store: queries
server/src/app.ts - Accounts and invites → PostgreSQL store: queries
server/src/auth.ts - Answer checker → Expression parser: parses expressions
server/src/checker/index.ts - Answer checker → Expression evaluator: evaluates answers
server/src/checker/index.ts - Answer checker → Answer constraints: parses constraints
server/src/checker/index.ts - Expression parser → Input lexer: tokenizes input
server/src/checker/parser.ts - Content loading → Problem content: loads problems
- PostgreSQL store → Problem content: stores progress
- Learner or admin → Authentication UI: registers or logs in
README.md - Learner or admin → Answer entry: enters answers
README.md