How metehancihangir/soru-cozum works
Purpose and Entry Points
This is an Arabic exam-question practice application (“soru-cozum”) with a React/Vite client and ASP.NET Core API. The browser entry is Frontend/src/main.jsx, which mounts Frontend/src/App.jsx; the API host entry is Backend/ArapcaSoruApi/ArapcaSoruApi/Program.cs.
Frontend Application Shell
Frontend/src/App.jsx owns top-level screen composition and application state. Frontend/src/components/HomeScreen.jsx presents the selection/start experience, while Frontend/src/App.css and Frontend/src/index.css provide the implemented UI styling. The static design handoff in finaldesign/index.html and finaldesign/quiz.html is a reference/prototype boundary, not the React runtime.
Quiz Rendering and Interaction
Frontend/src/components/QuestionCard.jsx renders individual questions and answer interactions. Its state/answer behavior is separated into Frontend/src/components/questionCard.logic.js, allowing the UI to remain focused on display. The principal flow is: selected exam scope → API question payload → question card → local answer/result state.
Frontend-to-API Boundary
Frontend/src/services/questionService.js is the client-side HTTP boundary. React components should obtain question data through this service rather than directly coupling to API URLs or payload details. The frontend is a Node/Vite development and build runtime, with public question-image assets under Frontend/public/images/.
API and Question Delivery
Backend/ArapcaSoruApi/ArapcaSoruApi/Controllers/QuestionsController.cs defines the HTTP interface for retrieving questions. Backend/ArapcaSoruApi/ArapcaSoruApi/Program.cs configures the ASP.NET Core request pipeline, dependency injection, and runtime services. This API is the authoritative application boundary between the UI and persisted question metadata.
Persistence Model and Initialization
Entity Framework Core persistence is centered on Backend/ArapcaSoruApi/ArapcaSoruApi/Data/AppDbContext.cs, with the question schema in Backend/ArapcaSoruApi/ArapcaSoruApi/Models/Question.cs. Backend/ArapcaSoruApi/ArapcaSoruApi/Data/DataSeeder.cs initializes catalogued question records; EF migrations in Backend/ArapcaSoruApi/ArapcaSoruApi/Migrations/ track schema evolution, including image-based questions and explanations.
Content Assets and Domain Taxonomy
Exam content is organized by Arabic course level, exam type, and year: sorular/arapça-2/, sorular/arapça-4/, and mirrored browser-serving assets in Frontend/public/images/arapca-2/ and Frontend/public/images/arapca-4/. This taxonomy is architecturally significant: question records must align with the course/exam/year hierarchy and resolve image paths consistently across seed data, API payloads, and frontend rendering.
Supporting Design and Delivery Artifacts
finaldesign/ contains a standalone visual implementation and design assets; medium-design-zip/ and medium-opendesign/ contain design-system exports. Product intent and phased work are documented in product-vision-arabic-quiz.md, roadmap-arabic-quiz.md, and docs/tasks-faz1.md through docs/tasks-faz6.md. API verification is supported by scripts/phase6-api-smoke.ps1.
Main entry points: AppDbContext.cs Question persistence · QuestionCard.jsx Question card · App.jsx Application shell · questionService.js Question service
Components 17
React Client
- Browser
- React entry
Frontend/src/main.jsx - Application shell · Composes screens and owns top-level application state.
Frontend/src/App.jsx - Start selection
Frontend/src/components/HomeScreen.jsx - Question card
Frontend/src/components/QuestionCard.jsx - Answer state · Keeps answer and result behavior outside rendering.
Frontend/src/components/questionCard.logic.js - Question service · Frontend boundary for question API payloads.
Frontend/src/services/questionService.js - Browser question images
Frontend/public/images
ASP.NET Core API
- API host · Configures request pipeline, DI, and runtime services.
Backend/ArapcaSoruApi/ArapcaSoruApi/Program.cs - Questions endpoint · Retrieves question payloads for the client.
Backend/ArapcaSoruApi/ArapcaSoruApi/Controllers/QuestionsController.cs - Question persistence
Backend/ArapcaSoruApi/ArapcaSoruApi/Data/AppDbContext.cs - Question schema
Backend/ArapcaSoruApi/ArapcaSoruApi/Models/Question.cs - Catalog seeder · Initializes question records aligned to the content taxonomy.
Backend/ArapcaSoruApi/ArapcaSoruApi/Data/DataSeeder.cs - Schema migrations · Tracks schema evolution for images and explanations.
Backend/ArapcaSoruApi/ArapcaSoruApi/Migrations
Question Content
- Arabic 2 catalog · Course, exam type, and year organized question content.
sorular/arapça-2 - Arabic 4 catalog
sorular/arapça-4
Other components
- Design prototype · Standalone design handoff; not part of the React runtime.
finaldesign
Connections 19
- Browser → React entry: loads
- React entry → Application shell: mounts
- Application shell → Start selection: shows selection
- Application shell → Question card: renders quiz
- Start selection → Question service: selected scope
- Question service → Questions endpoint: HTTP question request
- Questions endpoint → Question persistence: queries
- Question persistence → Question schema: persists
- API host → Questions endpoint: hosts
- API host → Question persistence: configures DI
- Question service → Question card: question payload
- Question card → Answer state: answer behavior
- Question card → Browser question images: renders image paths
- Catalog seeder → Question persistence: initializes records
- Schema migrations → Question persistence: evolves schema
- Arabic 2 catalog → Catalog seeder: catalog taxonomy
- Arabic 4 catalog → Catalog seeder: catalog taxonomy
- Arabic 2 catalog → Browser question images: mirrored assets
- Arabic 4 catalog → Browser question images: mirrored assets