Healthify is a CRUD application built using the Go language and the Gofr framework. It allows users to track their health-related data, including name, age, and daily calories intake.
- Technologies Used
- Features
- Diagrams
- Database Structure
- Environment Variables
- Getting Started
- Postman Collection
- API Endpoints
- Testing
- Contributing
Make sure you have the following installed before running the application:
- Create: Add new entries with user information such as name, age, and calories intake.
- Read: Retrieve and display user data, calculate BMI, and assess calories intake.
- Update: Modify existing entries to keep health information up-to-date.
- Delete: Remove entries for users who no longer need to be tracked.
Sequence Diagram Use Case Diagram
The application uses a database table with the following structure:
Field | Type | Description |
---|---|---|
id | INT | Unique identifier |
name | VARCHAR(255) | User's name |
age | INT | User's age |
calories | INT | Daily calories intake |
Database Configuration:
- DB_HOST: localhost
- DB_PORT: 3306
- DB_USER: root
- DB_PASSWORD: zopsmart123#
- DB_NAME: health
-
Clone the Repository:
git clone https://github.com/hardik2207/healthify.git cd healthify
-
Run the Application:
go run route.go
-
Testing with Postman: Use Postman to test the CRUD operations. Import the provided Postman collection for quick and easy testing.
-
POST /user:
-
GET /users:
-
PUT /user/{id}:
-
DELETE /user/{id}:
The project includes a Postman collection for testing API endpoints.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.