GoBet is a professional-grade .NET 10 Web API designed to modernize Public Autobus Transportation. Built on the principles of Clean Architecture, this platform manages real-time route scheduling, passenger ticketing, and secure fleet management.
GoBet aims to streamline the public transport experience by providing a scalable backend for:
- Passenger Management: Secure profiles and history.
- Route Logic: Automated scheduling and station management.
- Real-time Access: Lightweight API endpoints for mobile and web clients.
- Framework: .NET 10 (ASP.NET Core)
- Data Access: Entity Framework Core (Code First)
- Database: SQL Server
- Security: ASP.NET Core Identity + JWT (JSON Web Tokens)
- Architecture: Domain-Driven Design (DDD) & Repository Pattern
The solution is divided into four layers to ensure high maintainability and testability:
- GoBet.Domain: The heart of the system. Contains core entities (Bus, Route, Ticket), custom exceptions, and repository interfaces.
- GoBet.Application: Coordinates task execution. Contains DTOs, AutoMapper profiles, and business logic interfaces.
- GoBet.Infrastructure: Handles external concerns. Includes DB Context, Identity implementation, and third-party services (JWT/Email).
- GoBet.Api: The presentation layer. Handles HTTP request routing, middleware, and Swagger documentation.
- .NET 10 SDK
- SQL Server Express (or LocalDB)
- EF Core Tools (
dotnet tool install --global dotnet-ef)
- Clone the repository:
git clone [https://github.com/birukdjn/GoBet.git](https://github.com/birukdjn/GoBet.git) cd GoBet - Initialize User Secrets: Never commit sensitive keys. Initialize and set your local secrets:
cd GoBet.Api
dotnet user-secrets init
dotnet user-secrets set "JWT:Secret" "A_Long_Random_Security_Key_32_Chars"
dotnet user-secrets set "Authentication:Google:ClientSecret" "YourGoogleSecret"
dotnet user-secrets set "Authentication:Google:ClientId" "Your_ClientId"
dotnet user-secrets set "Authentication:Facebook:AppId" "Your_AppId"
dotnet user-secrets set "Authentication:Facebook:AppSecret" "Your_App_Secret"
- Apply Database Migration: Ensure your connection string in appsettings.Development.json points to your local SQL instance:
dotnet ef database update --project ../GoBet.Infrastructure --startup-project .- Run the App:
dotnet runThe GoBet API provides a secure and flexible authentication system:
- Identity: Managed by ASP.NET Core Identity with custom ApplicationUser.
- Traditional: Standard registration and login using email and hashed passwords via ASP.NET Core Identity.
- Social: Support for external providers including Google and Facebook OAuth2.
- Password Recovery: Secure, token-based "Forgot Password" and "Reset Password" workflow.
- Role-Based Access (RBAC): Distinct permissions for Passenger, Driver, and Admin.
When the application is running, you can explore, test, and interact with the API endpoints using the Swagger UI:
We welcome contributions to the project! Please follow these steps:
- Create a Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'feat: Add some AmazingFeature' - Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request against the main branch.