StandingsAPI is a .NET Core API designed to manage and track standings in an educational context. It provides services for managing exams, students, results, roles, and user authentication, with a structured layer approach for better maintainability and scalability.
- Standings.Application: Contains application logic, including DTOs, interfaces, services, and validation.
- Standings.Domain: Holds the domain entities and database context configurations.
- Standings.Infrastructure: Implements repositories and services for data persistence.
- Standings.API: The presentation layer which exposes endpoints via controllers.
- Authentication and Authorization: User registration, login, and role-based authorization.
- Student Management: Create, update, retrieve, and delete student records.
- Exam Management: Create, update, retrieve, and delete exams.
- Result Tracking: Store and retrieve exam results for students.
- Role and User Management: Handle user roles and permissions.
- .NET 6.0 SDK
- A database setup compatible with Entity Framework Core (e.g., SQL Server, PostgreSQL).
-
Clone the Repository
git clone https://github.com/justshfarida/StandingsAPI.git cd StandingsAPI
-
Configure Database
Update the connection string inappsettings.json
inStandings.API
to point to your database. -
Run Migrations
Run the following command to apply the initial database schema:dotnet ef database update --project Infrastructure/Standings.Persistence
-
Build and Run the Application
In the main project directory:dotnet build dotnet run --project Presentation/Standings.API
The API should now be running locally at https://localhost:5001
.
Below are some primary endpoints available in the API:
-
Authentication
POST /api/auth/login
: User login.POST /api/auth/register
: Register a new user.
-
Student
GET /api/student/{id}
: Get a student by ID.POST /api/student
: Create a new student.
-
Exam
GET /api/exam/{id}
: Get an exam by ID.POST /api/exam
: Create a new exam.
-
Result
GET /api/result/{id}
: Get result by ID.POST /api/result
: Record a new result.
-
Roles and Users
GET /api/user/{id}
: Get a user by ID.POST /api/role
: Create a new role.
- .NET 6.0 - Core framework for building the API.
- Entity Framework Core - ORM for database access.
- Automapper - For object-to-object mapping.
- JWT - For secure token-based authentication.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to the branch.
- Open a pull request.
Note: For detailed API documentation, refer to the Swagger documentation available at https://localhost:5001/swagger
when the application is running.