ASP.NET Core (.NET 10) Web API backend for a "Life Grid" To-Do application. The app visualizes a user's life as a grid of days/weeks, supports daily habits/tasks, journaling, and basic lifetime statistics.
The solution is structured using Clean Architecture.
Dependencies point inward:
CalendarLife.Domain: entities and core types (no external dependencies)CalendarLife.Application: use cases (CQRS), validation, interfaces (depends on Domain)CalendarLife.Infrastructure: persistence/integrations (implements Application interfaces)CalendarLife.Api: HTTP host (wires everything together)
The project models a user's life by an integer day index.
DailyRecord.DayIndexis the day index (e.g.,20000= ~20k days after birth)
The backend is expected to store only the days the user actually modified (not pre-create every day).
The Domain defines a 3-state enum (used by the current entities):
PendingCompletedFailed
Implemented as DayStatus in CalendarLife.Domain/Enums/DayStatus.cs.
This section describes the current code (not the final EF Core schema). Infrastructure/EF Core mappings are still pending.
From CalendarLife.Domain.Entities.User:
| Property | Type |
|---|---|
Id |
GUID |
Name |
string |
BirthDate |
DateTime |
Relationships:
- 0/1
UserSetting - Many
DefaultTask - Many
DailyRecord
From CalendarLife.Domain.Entities.UserSetting (note: PK is Id):
| Property | Type |
|---|---|
Id |
GUID |
UserId |
GUID |
SquareSize |
int |
ShowHelp |
bool |
SetupCompleted |
bool |
From CalendarLife.Domain.Entities.DefaultTask:
| Property | Type |
|---|---|
Id |
GUID |
UserId |
GUID |
Text |
string |
Duration |
int |
Completed |
DayStatus |
Note:
Completedcurrently usesDayStatusin code. IfDefaultTaskis a pure template, this likely becomes removable later.
From CalendarLife.Domain.Entities.DailyRecord:
| Property | Type |
|---|---|
SeqId |
int |
UserId |
GUID |
DayIndex |
int |
Journal |
string |
DayStatus |
DayStatus |
Relationships:
- Many
DailyTask
Note:
SeqIdandDayIndexboth exist in the current code. If they represent the same concept, the model will likely converge to a single field.
From CalendarLife.Domain.Entities.DailyTask:
| Property | Type |
|---|---|
Id |
GUID |
DailyRecordId |
GUID |
SourceDefaultTaskId |
GUID? |
Text |
string |
Duration |
int |
Completed |
DayStatus |
Note:
Completedcurrently usesDayStatusin code (3 states).Also note:
DailyRecordIdis aGuid, whileDailyRecordcurrently hasSeqIdas its identifier. EF Core persistence/mapping for this relationship is not implemented yet, so the database schema is still a work in progress.
- Create solution and projects
- Project references follow Clean Architecture dependency rules
- Entities created in
CalendarLife.Domain/Entities -
DayStatusenum created inCalendarLife.Domain/Enums
- Add
Interfaces/(e.g.,ICalendarLifeDbContext) - Add CQRS (MediatR) commands/queries
- Add EF Core + Npgsql packages
- Implement
DbContextand mappings - Add migrations
- Replace template endpoint (
/weatherforecast) with real controllers/endpoints - Wire Application + Infrastructure via DI
Built with code, caffeine, and Italian dreams. 🇮🇹☕