This is a Habit Tracker Backend Code implemented Domain Driven Design and HTTP Api.
There is also Badge that act like a reward if the users meet the requirements to obtain the badge (Badge can't be duplicated).
The requirements are :
▸ Obtain Dominating Badge if the user get 4 streaks without do a habit in the wrong day
▸ Obtain Workaholic Badge if the user do the habit for 10 times. Doing the habit on the wrong day is also counted.
▸ Obtain Epic Comeback Badge if the user do the habit in the wrong day for 10 streaks, and then do the habit on the right day for 10 streaks.
The Domain Driven Design implemented in this code are DDD Building Block :
▸ Value Object
▸ Entity
▸ Aggregate
▸ Domain Service
▸ Factory
▸ Repository
There is 7 HTTP Endpoint :
▸ Get(GET) all habit endpoint.
▸ Get(GET) a habit with the right user id and habit id endpoint.
▸ Add(POST) new habit according to the user id endpoint with requested name(required) and days(optional) from Postman and return the value endpoint.
▸ Update(PUT) the habit's name with the right user id, habit id and with requested name from Postman and return the value endpoint.
▸ Delete(DELETE) a habit with the right user id and habit id and return the value endpoint.
▸ Do habit(POST) with the right user id and habit id and return the value endpoint.
▸ Get all the badge(GET) with the right user id.
▸ C#
▸ Asp.Net
▸ PostgreSQL
▸ Postman
▸ Visual Studio Code