{"id":17947612,"url":"https://github.com/manosakpujiha/studentmanagementapi","last_synced_at":"2026-01-22T07:34:48.381Z","repository":{"id":258981054,"uuid":"869167105","full_name":"manosakpujiha/StudentManagementAPI","owner":"manosakpujiha","description":"A Student Management API","archived":false,"fork":false,"pushed_at":"2024-10-27T04:09:38.000Z","size":20997,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T17:23:42.332Z","etag":null,"topics":["c-sharp","dotnet-core-8","javascript","jwt-authentication","microsoft-azure","sqlite"],"latest_commit_sha":null,"homepage":"https://studentmanagmentapi.azurewebsites.net/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manosakpujiha.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-10-07T20:41:50.000Z","updated_at":"2024-12-30T13:15:47.000Z","dependencies_parsed_at":"2025-02-09T03:45:21.248Z","dependency_job_id":"31fb466e-acdb-4cc1-aefa-90e4d2b6edde","html_url":"https://github.com/manosakpujiha/StudentManagementAPI","commit_stats":null,"previous_names":["manosakpujiha/studentmanagementapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosakpujiha%2FStudentManagementAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosakpujiha%2FStudentManagementAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosakpujiha%2FStudentManagementAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manosakpujiha%2FStudentManagementAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manosakpujiha","download_url":"https://codeload.github.com/manosakpujiha/StudentManagementAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251731172,"owners_count":21634528,"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":["c-sharp","dotnet-core-8","javascript","jwt-authentication","microsoft-azure","sqlite"],"created_at":"2024-10-29T08:06:00.548Z","updated_at":"2026-01-22T07:34:48.367Z","avatar_url":"https://github.com/manosakpujiha.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Student Management API - https://studentmanagmentapi.azurewebsites.net/\n\n## Overview\n\nThe **Student Management API** is a web application designed to manage student data, including adding, updating, deleting, and viewing student records. The app includes a simple front-end interface that interacts with a back-end **ASP.NET Core API**, allowing users to manage students through a user-friendly interface. It also provides JWT-based authentication and authorization.\n\nThe project is deployed on **Microsoft Azure** and supports operations like fetching all students, adding new students, editing existing students, and deleting student records.\n\n## Features\n\n- **Add a New Student**: Input fields to add student details (first name, last name, email) and save them to the database.\n- **View All Students**: Display a list of all students with their details, such as ID, first name, last name, and email.\n- **Update Student Information**: Modify the information of an existing student.\n- **Delete a Student**: Remove a student record from the database using a delete button.\n- **Responsive Front-end**: Simple HTML-based user interface that communicates with the back-end API.\n- JWT Authentication and Authorization\n- Swagger/OpenAPI support for API documentation\n- HTTPS redirection\n\n\n\n## Technologies Used\n\n### Back-End (API):\n- **ASP.NET Core 6.0**: The core back-end framework used to create the API for managing students.\n- **Entity Framework Core**: ORM (Object-Relational Mapping) for database operations.\n- **SQLite**: The database used for storing student records.\n- **Microsoft Azure**: Hosting platform for the deployed API and front-end.\n- **Swagger**: API documentation and testing tool for interacting with the API endpoints.\n\n### Front-End:\n- **HTML5 \u0026 CSS3**: Used for structuring and styling the web page.\n- **JavaScript (Vanilla)**: Used to make API calls (fetch, post, delete) to the back-end API and dynamically update the page content.\n  \n### Tools:\n- **Azure App Service**: Used to deploy the API and host the front-end.\n- **Postman**: API testing tool (recommended for testing POST, DELETE, and PUT requests).\n- **cURL**: Command-line tool for testing API requests (alternative to Postman).\n\n## API Endpoints\n\n### Base URL: \n- `https://studentapi.azurewebsites.net`\n\n### API Routes:\n1. **GET** `/api/Students/GetAllStudents`  \n   - Fetches all students from the database.\n\n2. **GET** `/api/Students/GetStudentById/{id}`  \n   - Fetches a student by their ID.\n\n3. **POST** `/api/Students/AddStudent`  \n   - Adds a new student. Requires a request body with student details (firstName, lastName, email).\n\n4. **PUT** `/api/Students/{id}`  \n   - Updates an existing student's details by their ID.\n\n5. **DELETE** `/api/Students/RemoveStudent/{id}`  \n   - Deletes a student by their ID.\n\n## Project Setup\n\n### Prerequisites\n1. **.NET 8.0 SDK**: Ensure that you have .NET 8.0 installed on your local machine. [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)\n2. **SQLite**: The project uses SQLite for data storage, and the database is already configured.\n3. **Azure Account**: For deployment, an Azure account is required (optional for local testing).\n4. - [Visual Studio Code](https://code.visualstudio.com/) or any other IDE\n\n### Local Setup Instructions\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/manosakujiha/StudentManagementAPI.git\n    cd StudentManagementAPI\n    ```\n\n2. Restore the dependencies:\n    ```bash\n    dotnet restore\n    ```\n\n### Running the Application\n\n1. Build the project:\n    ```bash\n    dotnet build\n    ```\n\n2. Run the project:\n    ```bash\n    dotnet run --project StudentManagement.API\n    ```\n\n3. Open your browser and navigate to `https://localhost:5091/swagger` to view the Swagger UI.\n\n\n### JWT Authentication\n\nThe API uses JWT Bearer tokens for authentication. You need to include a valid JWT token in the `Authorization` header of your requests to access protected endpoints.\n\n## Configuration\n\n### JWT Settings\n\nThe JWT settings are configured in the `Program.cs` file. Update the `ValidIssuer`, `ValidAudience`, and `IssuerSigningKey` with your actual values.\n\n```csharp\noptions.TokenValidationParameters = new TokenValidationParameters\n{\n    ValidateIssuer = true,\n    ValidateAudience = true,\n    ValidateLifetime = true,\n    ValidateIssuerSigningKey = true,\n    ValidIssuer = \"StudentManagementAPI\",\n    ValidAudience = \"StudentManagementAPIAudience\",\n    IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(\"supersecretkey1234567890!@#$%^\"))\n};\n\n\nFront-End Setup\nServe the Front-End: Open the index.html file located in the wwwroot folder. The JavaScript in the file is configured to communicate with the API endpoints.\n\nTest the Application: Use the API routes listed above with tools like Postman or directly in the browser for GET requests to test the API.\n\nDeployment on Microsoft Azure\nThe project is deployed on Azure App Service using the F1 Free Tier. To redeploy the project to Azure, follow these steps:\n\nLog in to Azure CLI:\n\nbash\nCopy code\naz login\nDeploy the Web App:\n\nbash\nCopy code\naz webapp up --name studentmanagementapptwo --resource-group StudentResourceGroup --plan MyAppPlan --sku F1 --runtime \"dotnet|6.0\"\nAccess the Deployed Application:\n\nAPI: https://studentmanagementapptwo.azurewebsites.net\nSwagger UI (if enabled): https://studentmanagementapptwo.azurewebsites.net/swagger\nTesting the API\nUsing Swagger:\nIf Swagger is enabled, you can test the endpoints interactively by going to the /swagger URL:\n\narduino\nCopy code\nhttps://studentmanagementapptwo.azurewebsites.net/swagger\nUsing Postman:\nYou can use Postman to test the API by sending requests to the API routes.\n\nUsing Browser for GET Requests:\nAccess the GET endpoints directly in your browser by navigating to:\n\nruby\nCopy code\nhttps://studentmanagementapptwo.azurewebsites.net/api/Students/GetAllStudents\nTroubleshooting\n404 Error: Ensure the correct URL is used. The base URL should be https://studentmanagementapptwo.azurewebsites.net.\n500 Error: Check logs in Azure or locally using dotnet run to inspect the error message.\nLicense\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanosakpujiha%2Fstudentmanagementapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanosakpujiha%2Fstudentmanagementapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanosakpujiha%2Fstudentmanagementapi/lists"}