\section{Developer Manual}
\noindent You may choose to install and run the system locally or through Docker.

% Requires \usepackage{hyperref} in the preamble
\subsubsection{Local Installation}

\begin{enumerate}
  \item \textbf{Install prerequisites}
    \begin{enumerate}
      \item Git: \url{https://git-scm.com/downloads/win} (select the 64-bit installer and accept all default options).
      \item Python: \url{https://www.python.org/downloads/}
      \item Ollama: \url{https://ollama.com/download/windows} (run the installer).
      \item Node.js (if \texttt{npm} is unavailable): \url{https://nodejs.org/en/download} (choose the "Windows Installer" and accept defaults).
      \item PostgreSQL 17.4 (x86-64): \url{https://www.postgresql.org/download/windows/}. During setup choose a memorable password.
    \end{enumerate}

  \item \textbf{Clone the repository}\\
  Open a Windows \texttt{cmd} window, navigate to the directory where you want the project, and run:
\begin{adjustwidth}{-1cm}{}
\begin{verbatim}
git clone https://github.com/f74dragon/Automated-Students-short-answers-assessment
\end{verbatim}
\end{adjustwidth}


  \item \textbf{Configure the project}
    \begin{enumerate}
      \item In the project root open \texttt{.env} and set \texttt{DOCKERIZED=false}.
      \item Create a Python virtual environment and activate it:
\begin{verbatim}
cd Automated-Students-short-answers-assessment
python -m venv venv
\end{verbatim}
      \item Run the Postgres configuration script and enter the password you created during installation twice:
\begin{verbatim}
configPostWin.bat
\end{verbatim}
    \end{enumerate}

  \item \textbf{Build and launch the front-end}
\begin{verbatim}
cd frontend
npm install
npm run build
npm start
\end{verbatim}
  If prompted by Windows Firewall, click \emph{Allow}.

  \item \textbf{Launch the back-end} (in a new command prompt)
\begin{verbatim}
venv\Scripts\activate
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
\end{verbatim}
\end{enumerate}


\subsubsection{Docker Installation}

This project uses Docker Desktop version 4.40.0 and Docker Engine 28.0.4. Any later versions are not currently tested and may not work with this version of the project. \\



\noindent\textbf{Windows Installation}
\begin{enumerate}
    \item Download Docker Desktop for Windows from the official Docker website: \url{https://www.docker.com/products/docker-desktop}
    \item Double-click the installer file \texttt{Docker Desktop Installer.exe}
    \item Follow the installation wizard instructions, keeping the default settings
    \item When prompted, ensure the options to install required Windows components for WSL 2 are selected
    \item Click \texttt{Finish} to complete the installation
    \item Restart your computer when prompted
    \item \textbf{Enable Virtualization in BIOS (if not already enabled):}
    \begin{enumerate}
        \item Reboot your computer and enter the BIOS/UEFI settings. This is usually done by pressing a key like \texttt{Del}, \texttt{F2}, \texttt{F10}, or \texttt{Esc} during startup (varies by manufacturer).
        \item Navigate to the \textbf{Advanced}, \textbf{CPU Configuration}, or \textbf{Security} tab—location varies by BIOS.
        \item Look for an option named \texttt{Intel Virtualization Technology} or \texttt{SVM Mode} (for AMD processors).
        \item Set this option to \texttt{Enabled}.
        \item Save your changes and exit the BIOS (usually by pressing \texttt{F10}).
        \item \textbf{Tip:} If you cannot find the virtualization setting, consult your motherboard and CPU documentation or search online for instructions specific to your hardware model.
    \end{enumerate}
    
\end{enumerate}


\noindent \textbf{macOS Installation}
\begin{enumerate}
    \item Download Docker Desktop for Mac from the official Docker website: \url{https://www.docker.com/products/docker-desktop}
    \item Open the downloaded \texttt{.dmg} file
    \item Drag the Docker icon to the Applications folder
    \item Open the Applications folder and double-click Docker to start it
    \item When prompted, enter your password to allow Docker to make system changes
    \item Wait for the Docker initialization process to complete



\end{enumerate}
\textbf{Linux Installation (Ubuntu)}
In a terminal, enter the following commands sequentially:
\begin{verbatim}
# Update package information
sudo apt-get update

# Install required dependencies
sudo apt-get install apt-transport-https ca-certificates \
curl software-properties-common

# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# Add Docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com \
/linux/ubuntu$(lsb_release -cs) stable"

# Update package information again
sudo apt-get update

# Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io

# Add your user to the docker group to run Docker without sudo
sudo usermod -aG docker $USER
\end{verbatim}

\noindent\textbf{Note:} For other Linux distributions, refer to the official Docker documentation.

\subsubsection{Verifying Docker Installation}
After installation, verify that Docker is working correctly:

\begin{verbatim}
docker --version
docker run hello-world
\end{verbatim}

\texttt{docker compose up --build}

\subsubsection{Running the Project with Docker}

After configuring Docker and cloning the repository, navigate to the project folder using the terminal:

\begin{verbatim}
cd Automated-Students-short-answers-assessment
\end{verbatim}

\noindent{If you are running the project on a computer equipped with an \textbf{NVIDIA GPU}, no further changes are needed. However, if your system does \textbf{NOT} have an \textbf{NVIDIA GPU}, you must do the following:}

\begin{enumerate}
    \item Delete or rename the default \texttt{docker-compose.yml} file.
    \item Rename the file \texttt{docker-compose-no-nvidia.yml} to \texttt{docker-compose.yml}.
\end{enumerate}
This ensures the project uses the correct Docker configuration based on your hardware.

\textit{}

\noindent{Once this is set up, run the following command to build and start all the services defined in the Docker configuration:}

\begin{verbatim}
docker compose up --build
\end{verbatim}

\noindent{This command builds the Docker images (if it is not already built) and starts the containers.} 

\noindent{After it completes, the frontend server should be running and accessible at \texttt{http://localhost:3000}.}


\subsection{Technologies Used}
Here is a list of the technologies and frameworks used in the current iteration of this project:
\begin{itemize}
    \item FastAPI
    \item React.js
    \item Docker
    \item SQLAlchemy
    \item PostgreSQL
\end{itemize}

\subsection{Project Structure}
The project follows a modular architecture to enhance decoupling, ensuring that individual components can be seamlessly replaced or upgraded with alternative implementations as needed:
\begin{verbatim}
Automated-Students-short-answers-assessment/
|-- backend/
|-- examples/
|-- frontend/
|-- .dockerignore
|-- .env
|-- .env.local
|-- .gitignore
|-- README.md
|-- configPostWin.bat
|-- docker-compose.yml
|-- docker-compose-no-nvidia.yml
\end{verbatim}

\noindent The \texttt{backend/}, \texttt{frontend/}, with \texttt{llm/} subdirectories contain all source code for each respective component's functionalities. The \texttt{examples/}contain questions for testing and the data pertaining to the collections. The \texttt{Dockerfile} that specifies how to containerize these components for deployment. A \texttt{.env} file is used to specify environment variables for local development, but environmental variables should be specified in the \texttt{docker-compose.yml} file for deployment. The \texttt{configPostWin.bat/} helps set up the backend environment in a more feasible manner. Lastly, the compose files specify how to connect the different images built from the \texttt{Dockerfile}s. \texttt{docker-compose.yml} assumes a NVIDIA GPU is installed, however renaming \texttt{docker-compose-no-nivida.yml} to \texttt{docker-compose.yml} configures the project without a NVIDIA GPU.   

\clearpage

%==============================================
\subsection{Backend}

The backend contains a standard FastAPI project structure, with most of the functionality contained in the \texttt{app/} subdirectory. The \texttt{Dockerfile} contains information on how to containerize the backend image. \texttt{requirements.txt} contains the necessary packages to install, which is used in the \texttt{Dockerfile} to install the dependencies.

\begin{verbatim}
Automated-Students-short-answers-assessment/backend/
|-- ..
|-- app/
|-- migrations/
|-- tests/
|-- docker-compose.yml
|-- Dockerfile
|-- requirements.txt
\end{verbatim}

\subsubsection{\texttt{app/}}

The \texttt{app/} subdirectory contains all the source code to handle API requests, database functions, and LLM requests.

\begin{verbatim}
Automated-Students-short-answers-assessment/backend/app/
|-- ..
|-- api/
|-- auth/
|-- database/
|-- models/
|-- schemas/
|-- main.py
\end{verbatim}

\subsubsection{\texttt{main.py}}

The \texttt{main.py} file serves as the entry point for the FastAPI backend application. It defines and initializes the main FastAPI app instance, configures Cross-Origin Resource Sharing (CORS) to allow frontend requests (e.g., from \texttt{http://localhost:3000}), and includes all API routers such as users, login, questions, and others.

Upon application startup, the \texttt{startup\_event()} function is triggered. This function performs two key tasks:
\begin{enumerate}
    \item Initializes the database connection by calling \texttt{init\_db()}.
    \item Checks whether any combinations exist in the \texttt{Combination} table. If none are found, it creates a default grading combination with a predefined prompt and model name (\texttt{gemma3:4b}).
\end{enumerate}

This logic ensures the system always has a fallback grading configuration upon first deployment.

\begin{figure}[H]
    \centering
    \includegraphics[width=0.75\linewidth]{defaultPrompt.png}
    \caption{Default grading prompt template inserted into the database if no combinations exist. This prompt is used to evaluate student answers by comparing them to a reference answer using an gemma3:4b.}
    \label{fig:default-prompt}
\end{figure}





\subsubsection{\texttt{api/} }
The \texttt{api/} subdirectory contains the API router endpoints for different backend features. Each route is defined in a modular fashion to keep the application maintainable and scalable. 
\\ 
Here is the \texttt{collections.py} API route that handles collection management: 
\\ 
\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{dev-manual-figures/api-collection-import.png} 
    \caption{\texttt{collections.py} API Imports}
    \label{fig:enter-label}
\end{figure} 

The imports at the top are necessary imports from FastAPI and SQLAlchemy. The rest of the imports come from other packages within the \texttt{app/} directory.
\\ 

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{dev-manual-figures/api-collection-router.png} 
    \caption{\texttt{collections.py} base router}
    \label{fig:enter-label}
\end{figure} 

This line defines the base router for the collection endpoints as well as the prefix used to distinguish it. The base router will be imported into \texttt{main.py} to define the routes for the collection endpoints.
\\ 
 
\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{dev-manual-figures/api-collection-http.png}
    \caption{\texttt{collections.py} REST API Endpoints}
    \label{fig:enter-label}
\end{figure} 


These are two sample \texttt{GET} and \texttt{POST} HTTP endpoints for use in the frontend. The \texttt{response\_model} is a Pydantic model for data validation, \texttt{crud} is a semantic way to access the database for \texttt{CRUD} operations, and \texttt{get\_db} is a function that utilizes dependency injection to obtain the current database session to mitigate database access errors. 
% example goes here

\subsubsection{\texttt{auth/}}
This directory contains scripts for authentication in the backend. It only contains one file \texttt{auth.py}, which has various methods for hashing passwords, comparing hashed passwords, creating JWT tokens, and verifying JWT tokens.


\subsubsection{\texttt{database/}}
There are two files in the \texttt{database/} subdirectory, \texttt{connection.py} and \texttt{crud.py}. \\
\texttt{connection.py} is responsible for the initial database connection and database session management, which is used every time the database is accessed. It uses a dependency injection function  \texttt{get\_db} to manage database access.\\

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.3\textwidth]{dev-manual-figures/database-getdbexample.png}
    \caption{\texttt{get\_db/} Dependency Injection Function}
    \label{fig:enter-label}
\end{figure} 

\noindent {The \texttt{crud.py} module implements the CRUD operations for database access, providing an abstraction layer that simplifies interaction with the database. This allows other components of the backend to handle entities within the context of business logic more efficiently. \\
Each entity is given CRUD access through SQLAlchemy queries, which are structured similarly to SQL queries:} \\

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{dev-manual-figures/database-crud-example.png}
    \caption{Example Database Query for Collections}
    \label{fig:enter-label}
\end{figure} 
\noindent{In the future, it may be helpful to split up the crud file based on entities as the application grows in size to improve scalability, since the crud.py file is very large.}

\subsubsection{\texttt{models/}}
This directory contains the database models used in the application. This is not to be confused with the Large Language Models used in this application. These models were made using the SQLAlchemy module to allow for easier back-end and database integration. Here is an example of the \texttt{Collections} model:

\begin{figure}[htbp]
    \centering
    \includegraphics[width=1\linewidth]{dev-manual-figures/collections-model.png} 
    \caption{Example Collections Model}
    \label{fig:enter-label}
\end{figure} 

SQLAlchemy allows table name declarations, column definitions, and foreign key constraints to reference other tables. \texttt{Collections} requires relationships with other entities such as \texttt{User}, \texttt{Student}, and \texttt{Question}, so foreign key constraints are declared at the bottom of the class.

\newpage
\subsection{Introduction to Docker}
Docker is a platform that uses containerization technology to package applications and their dependencies into a standardized unit for software development and deployment. This section provides instructions for installing and running Docker on different operating systems.

\subsubsection{System Requirements}
\begin{itemize}
    \item \textbf{Windows:} Windows 10 64-bit: Pro, Enterprise, or Education (Build 17134 or later) with Hyper-V enabled, or Windows 10 64-bit Home (Build 19018 or later) with WSL 2 enabled
    \item \textbf{macOS:} macOS version 10.15 or newer (Catalina, Big Sur, Monterey, or newer)
    \item \textbf{Linux:} Kernel version 3.10 or higher, 64-bit installation
    \item \textbf{RAM:} At least 4GB of system RAM, 8GB recommended
    \item \textbf{CPU:} 64-bit processor with hardware virtualization support
     \item \textbf{GPU:} 8GB VRAM recommended
\end{itemize}



The first command shows the installed Docker version, and the second downloads and runs a test container to verify the installation.

\subsection{Running the Application with Docker Compose}

\subsubsection{Prerequisites}
Docker Compose is included with Docker Desktop for Windows and Mac. For Linux, you might need to install it separately:

\begin{verbatim}
sudo curl -L "https://github.com/docker/compose/releases/download/ \
v2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
\end{verbatim}

\subsubsection{Starting the Application}
\begin{enumerate}
    \item Clone the application \href{https://github.com/f74dragon/Automated-Students-short-answers-assessment}{repository} or extract the application files to a local directory
    \item Open a terminal or command prompt
    \item Navigate to the application directory containing the \texttt{docker-compose.yml} file
    \item Run the following command to start all services:
\end{enumerate}

\begin{verbatim}
docker-compose up -d
\end{verbatim}

This command builds, creates, and starts the containers defined in the \texttt{docker-compose.yml} file. The \texttt{-d} flag runs containers in the background.

\subsubsection{Accessing the Application}
Once the containers are running, access the application through a web browser:
\begin{itemize}
    \item Frontend: \url{http://localhost:3000}
    \item Backend API: \url{http://localhost:8001}
\end{itemize}

\subsubsection{Stopping the Application}
To stop all running containers:

\begin{verbatim}
docker-compose down
\end{verbatim}

To stop and remove all containers, networks, and volumes:

\begin{verbatim}
docker-compose down -v
\end{verbatim}

\subsubsection{Common Docker Commands}

\begin{tabular}{|p{0.3\textwidth}|p{0.6\textwidth}|}
\hline
\textbf{Command} & \textbf{Description} \\
\hline
\texttt{docker ps} & List running containers \\
\hline
\texttt{docker ps -a} & List all containers (running and stopped) \\
\hline
\texttt{docker images} & List all images \\
\hline
\texttt{docker logs [container-id]} & View logs for a specific container \\
\hline
\texttt{docker exec -it [container-id] bash} & Open a shell inside a running container \\
\hline
\texttt{docker-compose logs} & View logs from all containers defined in docker-compose.yml \\
\hline
\texttt{docker-compose restart} & Restart all services defined in docker-compose.yml \\
\hline
\end{tabular}

\subsubsection{Troubleshooting}

\subsubsection{Common Issues}
\begin{itemize}
    \item \textbf{Port conflicts:} If ports 3000 or 8001 are already in use, modify the port mapping in the \texttt{docker-compose.yml} file
    \item \textbf{Permission issues on Linux:} Ensure your user is added to the docker group or run commands with \texttt{sudo}
    \item \textbf{WSL 2 not enabled on Windows:} Follow the prompts to enable WSL 2 during installation
    \item \textbf{Insufficient memory:} Increase the memory allocated to Docker in Docker Desktop settings
\end{itemize}

\subsubsection{Resetting Docker}
If you encounter persistent issues, you can reset Docker to its default state:

\begin{enumerate}
    \item Open Docker Desktop
    \item Go to Settings/Preferences
    \item Click on "Troubleshoot" or "Reset"
    \item Select "Reset to factory defaults"
\end{enumerate}

\subsubsection{Updating Docker}
To update Docker:
\begin{itemize}
    \item \textbf{Windows and macOS:} Docker Desktop will notify you when updates are available
    \item \textbf{Linux:} Use your package manager to update (e.g., \texttt{sudo apt-get update \&\& sudo apt-get upgrade})
\end{itemize}

\subsubsection{Additional Resources}
\begin{itemize}
    \item Official Docker Documentation: \url{https://docs.docker.com}
    \item Docker Hub: \url{https://hub.docker.com}
    \item Docker Community Forums: \url{https://forums.docker.com}
\end{itemize}

%==============================================
% NEW SECTIONS START HERE
%==============================================

\section{Frontend Architecture}
The frontend is built using React.js and follows a component-based architecture. This section provides details about the structure, key components, and how they interact.

\subsection{Frontend Structure}
The frontend follows a standard React application structure:
\begin{verbatim}
frontend/
|-- public/             # Static files served directly
|   |-- favicon.ico     # Browser icon
|   |-- index.html      # Main HTML template
|   |-- manifest.json   # Progressive Web App manifest
|-- src/                # Source code
|   |-- App.js          # Main application component
|   |-- App.css         # Main application styles
|   |-- index.js        # Application entry point
|   |-- index.css       # Global styles
|   |-- pages/          # Page-level components
|   |-- styles/         # Component-specific styles
\end{verbatim}

\subsection{Key Components}
\begin{itemize}
    \item \textbf{App.js:} The main component that serves as the application's entry point. It defines the routing structure using React Router and provides global context for authentication and other shared state.
    
    \item \textbf{pages/Admin.js:} Component for the administrator dashboard. It allows administrators to manage models, prompts, and system settings.
    
    \item \textbf{pages/CollectionDetails.js:} Displays and manages all details for a specific collection, including student answers and grading functionality.
    
    \item \textbf{pages/Home.js:} The main dashboard showing all collections available to the user. Provides creation, editing, and deletion capabilities.
    
    \item \textbf{pages/Login.js:} Handles user authentication flow, including login and account creation.
    
    \item \textbf{pages/Pairs.js:} Manages prompt-model combinations (pairs) used for grading student answers.
    
    \item \textbf{pages/TestingWizard.js:} A step-by-step interface for creating and running assessment tests to evaluate different prompt-model combinations.
\end{itemize}

\subsection{Component Flow and Data Architecture}
The frontend follows a unidirectional data flow pattern:

\begin{figure}[H]
    \centering
    % Note: In a real implementation, place an actual diagram image here
    % \includegraphics[width=0.8\textwidth]{frontend-flow-diagram.png}
    \caption{Frontend Component Flow Diagram}
    \label{fig:frontend-flow}
\end{figure}

\begin{enumerate}
    \item User interactions trigger events in React components
    \item Event handlers make API calls to the backend
    \item Backend responds with data
    \item Component state is updated with new data
    \item UI re-renders to reflect state changes
\end{enumerate}

\subsection{API Integration}
The frontend communicates with the backend API using the Fetch API. Most API calls use the following pattern:

\begin{verbatim}
const fetchData = async () => {
  try {
    const response = await fetch('/api/endpoint', {
      method: 'POST', // or 'GET', 'PUT', 'DELETE'
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${token}` // JWT token for authentication
      },
      body: JSON.stringify(payload) // for POST/PUT requests
    });
    
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    
    const data = await response.json();
    // Update component state with data
    
  } catch (error) {
    console.error('Error fetching data:', error);
    // Handle error state
  }
};
\end{verbatim}

Key API endpoints used by the frontend include:
\begin{itemize}
    \item \texttt{/api/login/} - Authentication
    \item \texttt{/api/collections/} - Collection management
    \item \texttt{/api/students/} - Student data management
    \item \texttt{/api/questions/} - Question management
    \item \texttt{/api/model/} - AI model operations
    \item \texttt{/api/student\_answers/grade} - Grading operations
    \item \texttt{/api/tests/} - Test creation and execution
\end{itemize}

\subsection{State Management}
The application uses React's Context API for state management across components. Key contexts include:

\begin{itemize}
    \item \textbf{AuthContext:} Manages user authentication state, including login/logout functionality and token storage.
    \item \textbf{CollectionContext:} Provides collection data to relevant components and handles collection-related operations.
    \item \textbf{NotificationContext:} Manages application-wide notifications and alerts.
\end{itemize}

\subsection{Frontend Development Workflow}
To make changes to the frontend:

\begin{enumerate}
    \item Install Node.js and npm
    \item Navigate to the frontend directory
    \item Install dependencies: \texttt{npm install}
    \item Start the development server: \texttt{npm start}
    \item The application will be available at \texttt{http://localhost:3000} with hot-reloading enabled
    \item When finished with changes, build the production version: \texttt{npm run build}
\end{enumerate}

\section{Comprehensive File Inventory}
This section provides a detailed inventory of all important files in the project with explanations of their purpose and functionality.

\subsection{Root Configuration Files}
\begin{itemize}
    \item \textbf{.env:} Primary environment configuration file containing database credentials, application settings, and feature flags. Key variables include:
    \begin{itemize}
        \item \texttt{POSTGRES\_USER} - Database username
        \item \texttt{POSTGRES\_PASSWORD} - Database password
        \item \texttt{POSTGRES\_DB} - Database name
        \item \texttt{DOCKERIZED} - Flag to indicate if running in Docker (true/false)
        \item \texttt{JWT\_SECRET} - Secret key for JWT token generation and validation
    \end{itemize}
    
    \item \textbf{.env.docker:} Docker-specific environment variables, used when deploying with Docker.
    
    \item \textbf{.env.local:} Local development environment variables (not committed to version control).
    
    \item \textbf{docker-compose.yml:} Defines multi-container Docker application services including:
    \begin{itemize}
        \item Frontend service configuration
        \item Backend service configuration
        \item Database service configuration
        \item Ollama service for AI model interaction
        \item Network configuration between services
    \end{itemize}
    
    \item \textbf{docker-compose-no-nvidia.yml:} Alternative Docker configuration for systems without NVIDIA GPUs.
    
    \item \textbf{configPostWin.bat:} Windows-specific PostgreSQL configuration script that:
    \begin{itemize}
        \item Creates the required database
        \item Initializes database schema
        \item Sets up initial tables and relations
    \end{itemize}
\end{itemize}

\subsection{Backend Files}
\subsubsection{Core Files}
\begin{itemize}
    \item \textbf{backend/requirements.txt:} Lists all Python package dependencies required by the backend.
    
    \item \textbf{backend/Dockerfile:} Defines how to build the backend Docker image, including:
    \begin{itemize}
        \item Base Python image
        \item Directory structure setup
        \item Dependency installation
        \item Entrypoint command
    \end{itemize}
    
    \item \textbf{backend/app/main.py:} Application entry point that:
    \begin{itemize}
        \item Configures FastAPI app settings
        \item Sets up CORS middleware
        \item Registers all API routers
        \item Defines startup and shutdown events
        \item Initializes database connections
        \item Creates default model-prompt combination if none exists
    \end{itemize}
\end{itemize}

\subsubsection{API Files (backend/app/api/)}
Each file in this directory defines API endpoints for specific functionality:

\begin{itemize}
    \item \textbf{collections.py:} Manages collection creation, retrieval, update, and deletion. Provides endpoints for:
    \begin{itemize}
        \item Creating new collections
        \item Retrieving collections by user
        \item Updating collection details
        \item Deleting collections
    \end{itemize}
    
    \item \textbf{combinations.py:} Handles prompt-model pair management with endpoints for:
    \begin{itemize}
        \item Creating model-prompt combinations
        \item Listing available combinations
        \item Getting combination details
        \item Updating combinations
    \end{itemize}
    
    \item \textbf{login.py:} Authentication endpoints for:
    \begin{itemize}
        \item User login with JWT token generation
        \item Token validation
        \item Password reset functionality
    \end{itemize}
    
    \item \textbf{model.py:} AI model management with endpoints for:
    \begin{itemize}
        \item Listing available models
        \item Downloading new models
        \item Checking model status
    \end{itemize}
    
    \item \textbf{prompts.py:} Prompt management with endpoints for:
    \begin{itemize}
        \item Creating assessment prompts
        \item Retrieving prompts by category
        \item Updating prompt templates
        \item Deleting prompts
    \end{itemize}
    
    \item \textbf{questions.py:} Question management with endpoints for:
    \begin{itemize}
        \item Creating questions
        \item Listing questions by collection
        \item Updating questions
        \item Importing questions from CSV
    \end{itemize}
    
    \item \textbf{student\_answers.py:} Student
\end{itemize}