https://github.com/mk-milly02/calories-tracking-api
This is a RESTful API built with .NET and PostgreSQL that allows users to track their daily calorie intake by recording meals.
https://github.com/mk-milly02/calories-tracking-api
api dotnet entity-framework-core postgresql
Last synced: 11 months ago
JSON representation
This is a RESTful API built with .NET and PostgreSQL that allows users to track their daily calorie intake by recording meals.
- Host: GitHub
- URL: https://github.com/mk-milly02/calories-tracking-api
- Owner: mk-milly02
- License: mit
- Created: 2023-06-13T16:43:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-16T18:59:42.000Z (almost 3 years ago)
- Last Synced: 2025-04-23T12:18:47.095Z (about 1 year ago)
- Topics: api, dotnet, entity-framework-core, postgresql
- Language: C#
- Homepage:
- Size: 522 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Calories Tracking API
> This is a RESTful API built with .NET and PostgreSQL that allows users to track their daily calorie intake by recording meals.
## Features
- Authentication with JWT
- Basic user account operations including setting daily calorie limit
- User and meal CRUD opeartions
- Pagination and filtering where necessary
## Database Model
The database includes tables that manage user-related data such as accounts, roles, authentication tokens, meals, etc.

## Frameworks and Libraries
The API uses the following libraries and frameworks to deliver various functionalities:
- .NET 7
- Entity Framework Core 7.0.10 (with PostgreSQL)
## Configuration
To run the project, add configurations to `appsettings.json` in the presentation layer. For integration testing, add a `secret.json` file to the tests project with the necesaary configurations.
```
{
"nutritionix-api": {
"application-id": "{provide-id}",
"application-key": "{provide-key}"
},
"Authentication": {
"Schemes": {
"Bearer":
{
"issuer": "calories-tracking-api",
"audience": "{audience}",
"secret-key": "{secret-key}"
}
}
},
"ConnectionStrings": {
"default": "Host=...;Username=...;Password=...;Database=...;"
},
"Identity": {
"Administrator": {
"FirstName": "John",
"LastName": "Snow",
"Username": "crow_lord",
"Email": "bastard@thewall.com",
"Password": "www.winT3rf3II.com"
},
"RegularUser": {
"FirstName": "Julius",
"LastName": "Pepperwood",
"Username": "julius.pepperwood",
"Email": "jp@theloft.com",
"Password": "Sweatyback1234!"
},
"UserManager": {
"FirstName": "Micheal",
"LastName": "Scott",
"Username": "mj.scott",
"Email": "manager@calories-tracker.com",
"Password": "ilOv3ho,y"
}
}
}
```
## API Documanetation
`/swagger`

### Contributing
Contributions are welcome! If you have any suggestions, bug reports, or feature requests , please open an issue or submit a pull request.
### License
This project is licensed under the MIT License. See the `LICENSE` file for details.