{"id":28036098,"url":"https://github.com/m7moudgadallah/exami","last_synced_at":"2026-05-07T02:34:25.806Z","repository":{"id":291860092,"uuid":"930974915","full_name":"m7moudGadallah/Exami","owner":"m7moudGadallah","description":"Exami is a simple Examination System that makes exam management easy.","archived":false,"fork":false,"pushed_at":"2025-02-28T23:04:27.000Z","size":1618,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T18:04:20.433Z","etag":null,"topics":["ado-dotnet","csharp","dotnet","sqlserver","windows-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m7moudGadallah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-11T14:19:07.000Z","updated_at":"2025-03-10T22:08:20.000Z","dependencies_parsed_at":"2025-05-11T12:03:56.070Z","dependency_job_id":null,"html_url":"https://github.com/m7moudGadallah/Exami","commit_stats":null,"previous_names":["m7moudgadallah/exami"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/m7moudGadallah/Exami","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m7moudGadallah%2FExami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m7moudGadallah%2FExami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m7moudGadallah%2FExami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m7moudGadallah%2FExami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m7moudGadallah","download_url":"https://codeload.github.com/m7moudGadallah/Exami/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m7moudGadallah%2FExami/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261338956,"owners_count":23143892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ado-dotnet","csharp","dotnet","sqlserver","windows-forms"],"created_at":"2025-05-11T12:03:12.784Z","updated_at":"2026-05-07T02:34:25.801Z","avatar_url":"https://github.com/m7moudGadallah.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exami\n\n## Overview\n\nThis project is a desktop application for an Examination System. It has three user roles: **admins, teachers, and students**. **Teachers** can create exams and questions. **Students** can log in securely and take **practice or final exams**. The system also generates exam result reports in different formats.\n\n## Features\n\n### Admin Features\n\n- Manage **subjects, teachers, and students**.\n- Assign exams to students.\n- Generate exam reports.\n\n### Teacher Features\n\n- Create, edit, and delete **exams**.\n- Add, edit, and remove **exam questions**.\n- View exam reports.\n\n### Student Features\n\n- **Login** securely.\n- View and start available exams.\n- Mark **questions inside the exam** with bookmarks for review.\n- See **scores and correct answers** after practice exams.\n\n_For more details, Please review [System Requirements Specification Document](./attachments/docs/examination-system-requirements-doc.pdf)_\n\n## Technologies\n\n- **Programming Language**: C#\n- **Framework**: .NET Core (Windows Forms)\n- **Database**: SQL Server (Using ADO.NET for interaction)\n\n## High-Level Architecture\n\nOur project follows a simplified **multi-tier architecture** to ensure better organization and maintainability:\n\n- **Entities (Data Model)** – Classes that map to database tables and represent the data structure.\n- **Mappers**: Converts database rows (`DataRow` or `DataTable`) into entity objects and vice versa.\n- **DbContext(Singleton Class)**: Handles all database interactions, such as executing queries and commands.\n- **Service Layer (Business Logic)** – Contains the core logic of the system. This layer interacts with the database using the `DbContext` and mappers. SQL statements are written directly within service methods for simplicity.\n- **Presentation Layer (UI)** – The **Windows Forms** application that interacts with users and provides an intuitive interface for admins, teachers, and students.\n\n![High-Level Architecture](./attachments/imgs/iti-examination-system-architecture.png)\n\n## File Structure\n\nWe use a **single .NET solution** with multiple projects, ensuring **a clear separation of concerns** and making development **structured and intuitive**. Below is the updated project structure:\n\n### Solution Structure\n\n- **Exami.Presentation** – A Windows Forms project that handles the user interface.\n\n  - **Forms**: Contains forms for different user roles (e.g., `AdminForm.cs`, `TeacherForm.cs`, `StudentForm.cs`).\n  - **Controls**: Custom UI controls if any.\n  - **Resources**: Icons, images, and other resources.\n  - **Helpers**: Contains any extra classes or helper methods.\n\n- **Exami.Entities** – Defines data models mapped to database tables.\n\n  - **Entities**: Includes classes like `User.cs`, `Exam.cs`, `Question.cs`, and `Answer.cs`.\n\n- **Exami.Services** – Contains the core application logic.\n\n  - **Services**: Implements business logic for different features (e.g., `ExamService.cs`, `UserService.cs`).\n  - **DTOs**: Custom types for input/output used in service methods.\n  - **Mappers**: Mapping logic between entities and DTOs if needed.\n  - **Helpers**: Contains static classes with helper extension methods for services (e.g. `GetAllEntitiesHelper.cs`).\n\n- **Exami.Utilities** – A helper project for common functionalities.\n\n  - **Logging**: Logging utilities (e.g., `Logger.cs`).\n  - **Config**: Configuration management (e.g., `AppConfig.cs`).\n  - **Extensions**: Utility methods or extension methods.\n\n- **Exami.Database** – Manages shared database logic.\n  - **DbContext**: Handles all database interactions.\n  - **DbCommandParams**: Encapsulates parameters for database commands.\n  - **SqlQueryBuilder**: Builds SQL queries dynamically.\n- **Exami.Test** – A console application used for **manual testing purposes** during development.\n  - This project allows developers to test specific functionalities without running the full application.\n  - **Note** : This project is **development-only** and will be **excluded from the final build and shipment** .\n\n### Benefits of This Structure\n\n- **Separation of Concerns**: Each project has a distinct responsibility, ensuring clean and maintainable code.\n- **Scalability**: The structure makes it easier to add new features or enhance existing ones without affecting other parts of the system.\n- **Maintainability**: Changes in one layer do not affect others, reducing the risk of unintended side effects.\n- **Reusability**: Common functionalities are centralized in the `Exami.Utilities` and `Exami.Database` projects, promoting code reuse.\n\n## Database Design\n\n![Database Design](./attachments/imgs/iti-examination-system-erd.png)\n\n_For more details, Please review [Database Schema in detail using DBML](./attachments/docs/database-erd.dbml)_\n\n## Class Diagram\n\nThe class diagram below illustrates the relationships between key classes in the system. It show how services interact with `DbContext` to perform operations and how it uses mappers to convert data from different formats like `DataTable` to entities.\n\n![General Class Diagram](./attachments/imgs/iti-examination-system-general-class-diagram.png)\n\n## UI Design\n\nWe designed a **simple and user-friendly** Windows Forms interface, with separate screens for **Admins, Teachers, and Students**.\n\nEach role gets an **easy-to-use interface** tailored to their tasks:\n\n- **Admin Panel** – Manage users, subjects, and assign exams.\n- **Teacher Panel** – Create exams, add questions, and view reports.\n- **Student Panel** – View and take exams, bookmark questions, and see results.\n\nCheck out our [**prototype sketches on Figma**](https://www.figma.com/design/ZzDNDuK7cYCWJH04KFx1Gl/C%23-Project-UI?m=auto\u0026t=BsQYRQdJ5xg0YcA6-1) for a preview of the design.\n\n## Deployment\n\nAfter development, we will **publish the application as a single executable file**, making installation **simple and user-friendly**.\n\n### Deployment Steps\n\n- **Build the application** in **Release mode**.\n- **Use .NET’s Single-File Publishing** to generate a standalone executable.\n- **Package the app** with an installer for easy setup.\n- **Ensure dependencies** (like SQL Server) are correctly configured.\n- **Distribute the installer** to users.\n\n## Installation\n\n### Development Installation\n\n1. **Clone the Repository**:\n\n   ```bash\n   git clone \u003crepository-url\u003e\n   ```\n\n2. **Open the Solution in Visual Studio** (`\\Exami` Directory).\n3. **Restore NuGet Packages**: Let Visual Studio restore the packages automatically, or manually restore them using:\n\n   ```bash\n   dotnet restore\n   ```\n\n4. **Set Up Configuration**:\n\n   - Copy `appsettings.example.json` to `appsettings.json`:\n\n   ```bash\n   copy Utility\\appsettings.example.json Utility\\appsettings.json\n   ```\n\n   - Update the values in `appsettings.json` with local environment-specific settings.\n\n5. **Configure Database** : Set up the database locally using those [scripts](./scripts/db/) and update the connection string in `appsettings.json`.\n\n6. **Build and Run**:\n\n   - Build the solution (`Ctrl + Shift + B` in Visual Studio).\n   - Run the application to ensure everything is set up correctly.\n\n## Conclusion\n\nThis **Examination Management System** makes exams **easier to create, take, and manage**. It has a **clear structure** with different roles for **admins, teachers, and students**.\n\nWith **secure logins, exam reports, and question bookmarking**, it helps students and teachers **use exams smoothly**. Built with **C#, SQL Server, and Windows Forms**, it is **simple, fast, and reliable**.\n\n## License\n\nThis repository is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## Glossary\n\nThis section defines key terms and concepts used throughout the documentation:\n\n- **Entities**:\n  Classes that represent data models and map directly to database tables. For example, `User`, `Exam`, and `Question` are entities in this project.\n\n- **DbContext**:\n  A utility class responsible for handling all interactions with the database. It executes SQL queries and commands, such as inserting, updating, or retrieving data.\n\n- **DTO (Data Transfer Object)**:\n  A lightweight object used to transfer data between different layers of the application. DTOs simplify communication by encapsulating only the necessary data for a specific operation.\n\n- **Service**:\n  A component in the business logic layer that contains the core functionality of the system. Services handle operations like creating exams, managing users, or calculating scores.\n\n- **Mappers**:\n  Classes or methods that convert data between different formats. In this project, mappers are used to transform database rows (`DataRow` or `DataTable`) into entity objects and vice versa.\n\n- **UI (User Interface)**:  \n  The part of the application that users interact with. In this project, the UI is built using Windows Forms.\n\n- **Business Logic**:  \n  The rules and processes that govern how the application works. In this project, business logic is implemented in the service layer.\n\n- **Data Access Layer**:  \n  The layer responsible for interacting with the database. In this project, the `DbContext` acts as the data access layer.\n\n- **Presentation Layer**:  \n  The layer responsible for displaying information to users and collecting input. In this project, the presentation layer is implemented using Windows Forms.\n\n- **Configuration Files**:  \n  Files used to store application settings, such as connection strings or logging configurations. In this project, `appsettings.json` or similar files are used to manage configuration.\n\n- **Logging**:  \n  The process of recording events or errors that occur during application execution. This project uses basic logging (e.g., `Debug.WriteLine`) for debugging purposes or more advanced logging libraries for production environments.\n\n- **ERD (Entity Relationship Diagram)**:  \n   A visual representation of database tables and their relationships. The ERD in this project shows how tables like `User`, `Exam`, and `Question` are connected.\n\n- **ADO.NET**:  \n  A .NET framework for interacting with databases. This project uses ADO.NET components like `SqlConnection`, `SqlCommand`, and `SqlDataAdapter` to execute database operations.\n\n- **Microsoft.Data.SqlClient**:  \n  A library in .NET for working with SQL Server databases. It provides classes like `SqlConnection` and `SqlCommand` for database interaction.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm7moudgadallah%2Fexami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm7moudgadallah%2Fexami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm7moudgadallah%2Fexami/lists"}