CatHealthTracker is a modern ASP.NET Core Web API project that helps cat owners manage their petsβ health information in one place.
It allows users to track vaccinations, monitor weight changes, store medical history, and manage health reminders to avoid missing important care events.
The system provides features such as:
- Cat management
- Vaccination tracking
- Reminder management
The goal of the system is to make cat health tracking simple, organized, and reliable.
| Technology | Description |
|---|---|
| ASP.NET Core 10 | Web API framework |
| Entity Framework Core | ORM |
| SQL Server | Database |
| JWT Bearer Authentication | Authentication system |
| AutoMapper | DTO mapping |
| FluentValidation | Request validation |
| Scalar | API documentation UI |
| BCrypt.Net | Password hashing |
| Repository Pattern | Data access abstraction |
| Unit Of Work | Transaction management |
The project follows a layered architecture:
CatHealthTracker
β
βββ CatHealthTracker.API
βββ CatHealthTracker.Business
βββ CatHealthTracker.DataAccess
βββ CatHealthTracker.Entity
Handles:
- Controllers
- Middleware
- Authentication configuration
- HTTP request/response pipeline
Handles:
- Business rules
- Services
- DTOs
- Validators
- JWT generation
- Mapping profiles
Handles:
- Entity Framework Core
- Repository pattern
- Unit of Work
- DbContext
- Database operations
Handles:
- Database entities
- Base entity definitions
The project uses JWT Bearer Authentication.
Features:
- User registration
- User login
- Password hashing with BCrypt
- JWT token generation
- Protected endpoints with
[Authorize] - User-based resource access control
Example:
Authorization: Bearer YOUR_TOKEN- Create cat
- Update cat
- Delete cat (soft delete)
- Get user-specific cats
- Ownership protection
- Vaccine records
- Vaccination history
- Vaccine frequency tracking
- Reminder creation
- Reminder status tracking
- User-specific reminders
- JWT authentication
- User ownership validation
- Protected endpoints
- Password hashing
Entities are not physically removed from the database.
Instead:
IsDeleted = true
DeletedAt = DateTime.UtcNowGlobal query filters automatically hide deleted records.
| Method | Endpoint |
|---|---|
POST |
/api/auth/register |
POST |
/api/auth/login |
| Method | Endpoint |
|---|---|
GET |
/api/cats |
GET |
/api/cats/{id} |
POST |
/api/cats |
PUT |
/api/cats |
DELETE |
/api/cats/{id} |
| Method | Endpoint |
|---|---|
GET |
/api/reminders |
POST |
/api/reminders |
PUT |
/api/reminders/{id}/mark-sent |
| Method | Endpoint |
|---|---|
GET |
/api/vaccinationrecords |
GET |
/api/vaccinationrecords/{id} |
POST |
/api/vaccinationrecords |
| Method | Endpoint |
|---|---|
GET |
/api/vaccines |
POST |
/api/vaccines |
PUT |
/api/vaccines |
DELETE |
/api/vaccines/{id} |
The project uses Scalar UI for API documentation.
After running the project:
https://localhost:7237/scalar
git clone https://github.com/baytekincan/CatHealthTracker.git
cd CatHealthTrackerJWT and connection strings are stored using .NET User Secrets.
Initialize secrets:
dotnet user-secrets init --project CatHealthTracker.APIAdd SQL Server connection string:
dotnet user-secrets set "ConnectionStrings:SqlServer" "Server=(localdb)\\MSSQLLocalDB;Database=CatHealthTrackerDb;Trusted_Connection=True;" --project CatHealthTracker.APIAdd JWT configuration:
dotnet user-secrets set "Jwt:Issuer" "CatHealthTracker" --project CatHealthTracker.API
dotnet user-secrets set "Jwt:Audience" "CatUsers" --project CatHealthTracker.API
dotnet user-secrets set "Jwt:SecretKey" "YOUR_SECRET_KEY" --project CatHealthTracker.APIRun migrations:
dotnet ef database update \
--project CatHealthTracker.DataAccess \
--startup-project CatHealthTracker.APIdotnet run --project CatHealthTracker.APIPlanned improvements:
- Role-based authorization
- Email notifications
- Redis caching
- Docker support
- CI/CD pipeline
- Cloud deployment (Azure/AWS)
- Generic repository improvements
Can Baytekin