Skip to content

Commit

Permalink
updated the documentation of this project by adding the new file stru…
Browse files Browse the repository at this point in the history
…cture
  • Loading branch information
ibilalkayy committed Apr 29, 2024
1 parent 2f55e81 commit 3df9b47
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 83 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
)

const version = "v0.1.94"
const version = "v0.1.95"

// rootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Expand Down
171 changes: 89 additions & 82 deletions docs/structure.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,85 @@
./
./
├── .github
│ └── funding.yml
├── cmd
│ ├── budget
│ │ ├── budget.go
│ │ ├── handler
│ │ │ ├── adjust.go
│ │ │ ├── alert.go
│ │ │ ├── create.go
│ │ │ ├── get.go
│ │ │ ├── remove.go
│ │ │ └── view.go
│ │ ├── sub_handler
│ │ │ ├── msg.go
│ │ │ ├── remove.go
│ │ │ ├── setup.go
│ │ │ ├── update.go
│ │ │ └── view.go
│ │ ├── main.go
│ │ └── sub_handler
│ │ ├── msg.go
│ │ ├── remove.go
│ │ ├── setup.go
│ │ ├── update.go
│ │ └── view.go
│ ├── init
│ │ └── init.go
│ │ └── main.go
│ ├── spend
│ │ ├── handler
│ │ │ └── history.go
│ │ ├── sub_handler
│ │ │ ├── show.go
│ │ │ └── remove.go
│ │ └── spend.go
│ ├── total_amount
│ │ ├── total_amount.go
│ │ ├── handler
│ │ │ ├── add.go
│ │ │ ├── remove.go
│ │ │ ├── status.go
│ │ │ ├── update.go
│ │ │ └── view.go
│ │ ├── main.go
│ │ └── sub_handler
│ │ ├── active.go
│ │ ├── inactive.go
│ │ ├── amount.go
│ │ ├── categories.go
│ │ └── check.go
│ └── root.go
├── db
│ ├── alert_db
│ │ └── alert_db.go
│ ├── budget_db
│ │ ├── budget_db.go
│ │ └── history_db.go
│ ├── total_amount_db
│ │ ├── total_amount_db.go
│ │ └── total_amount_category.go
│ ├── migrations
│ │ ├── 001_create_budget_table.sql
│ │ ├── 002_create_alert_table.sql
│ │ └── 003_create_total_amount_table.sql
│ └── connection.go
│ │ ├── remove.go
│ │ └── show.go
│ └── total_amount
│ ├── handler
│ │ ├── add.go
│ │ ├── remove.go
│ │ ├── status.go
│ │ ├── update.go
│ │ └── view.go
│ ├── main.go
│ └── sub_handler
│ ├── active.go
│ ├── amount.go
│ ├── categories.go
│ ├── check.go
│ └── inactive.go
├── common
│ └── utils
│ └── conversion.go
├── docs
│ ├── commands.md
│ └── structure.md
├── email
│ ├── templates
│ │ └── alert.html
│ └── email.go
├── internal
├── entities
│ ├── alert.go
│ ├── budget.go
│ ├── email.go
│ ├── history.go
│ ├── init.go
│ ├── spend.go
│ └── total_amount.go
├── framework_drivers
│ ├── db
│ │ ├── connection.go
│ │ ├── alert_db
│ │ │ └── alert_db.go
│ │ ├── budget_db
│ │ │ ├── budget_db.go
│ │ │ └── history_db.go
│ │ ├── migrations
│ │ │ ├── 001_create_budget_table.sql
│ │ │ ├── 002_create_alert_table.sql
│ │ │ └── 003_create_total_amount_table.sql
│ │ └── total_amount_db
│ │ ├── total_amount_category.go
│ │ └── total_amount_db.go
│ ├── email
│ │ ├── email.go
│ │ └── templates
│ │ └── alert.html
├── tests
│ └── app
│ ├── alert
│ │ └── alert_test.go
│ └── budget
│ └── budget_test.go
├── usecases
│ ├── app
│ │ ├── alert
│ │ │ └── alert.go
Expand All @@ -76,19 +93,8 @@
│ │ │ └── spend.go
│ │ └── total_amount
│ │ └── total_amount.go
│ ├── middleware
│ │ └── env.go
│ └── common
│ ├── functions
│ │ └── functions.go
│ └── structs
│ └── structs.go
├── tests
│ └── app
│ ├── alert
│ │ └── alert_test.go
│ └── budget
│ └── budget_test.go
│ └── middleware
│ └── env_loader.go
├── .gitignore
├── .dockerignore
├── CODE_OF_CONDUCT.md
Expand All @@ -105,7 +111,7 @@

### Budget command files

- **cmd/budget/budget.go:** Budget service entry point.
- **cmd/budget/main.go:** Budget service entry point.
- **cmd/budget/handler/adjust.go:** Handler for adjusting budget.
- **cmd/budget/handler/alert.go:** Handler for alerting.
- **cmd/budget/handler/create.go:** Handler for creating budget.
Expand All @@ -123,7 +129,7 @@

### Total amount command files

- **cmd/total_amount/total_amount.go:** The management of the total amount to set the target.
- **cmd/total_amount/main.go:** The management of the total amount to set the target.
- **cmd/total_amount/handler/add.go:** Handler for adding the total amount.
- **cmd/total_amount/handler/remove.go:** Handler for removing the total amount data.
- **cmd/total_amount/handler/status.go:** Handler for handling the total amount's status.
Expand All @@ -139,20 +145,20 @@

### Other command files

- **cmd/init/init.go:** Flow initialization functionality.
- **cmd/spend/spend.go:** Spending money on various categories.
- **cmd/init/main.go:** Flow initialization functionality.
- **cmd/spend/main.go:** Spending money on various categories.
- **cmd/spend/handler/history.go:** Show the transaction history.
- **cmd/spend/sub_handler/show.go:** Show the history data.
- **cmd/spend/sub_handler/remove.go:** Remove the history data.

### Database files

- **db/connection.go:** Database connection setup.
- **db/migrations/001_create_budget_table.sql:** SQL script for creating budget table.
- **db/migrations/002_create_alert_table.sql:** SQL script for creating alert table.
- **db/alert_db/alert_db.go:** CRUD operation for the alert functionanlity.
- **db/budget_db/budget_db.go:** CRUD operation for the budget functionanlity.
- **db/total_amount_db/total_amount_db.go:** CRUD operation for the total amount functionanlity.
- **framework_drivers/db/connection.go:** Database connection setup.
- **framework_drivers/db/migrations/001_create_budget_table.sql:** SQL script for creating budget table.
- **framework_drivers/db/migrations/002_create_alert_table.sql:** SQL script for creating alert table.
- **framework_drivers/db/alert_db/alert_db.go:** CRUD operation for the alert functionality.
- **framework_drivers/db/budget_db/budget_db.go:** CRUD operation for the budget functionality.
- **framework_drivers/db/total_amount_db/total_amount_db.go:** CRUD operation for the total amount functionality.

### Documentation files

Expand All @@ -161,25 +167,26 @@

### Email files

- **email/email.go:** Handling the email function.
- **email/templates/alert.html:** Email template for alert notification.
- **framework_drivers/email/email.go:** Handling the email functionality.
- **framework_drivers/email/templates/alert.html:** Email template for alert notification.

### App logic files

- **internal/app/alert/alert.go:** Logic for alert management functionality.
- **internal/app/budget/budget.go:** Logic for budget management functionality.
- **internal/app/init/init.go:** Logic for init functionality.
- **internal/app/spend/history.go:** Logic for handling the history.
- **internal/app/spend/spend.go:** Logic for transaction functionality.
- **internal/app/spend/notification.go:** Functions for setting the hourly, daily and more notifications.
- **internal/app/total_amount/total_amount.go:** Logic for handling the total amount data.
- **internal/common/functions/functions.go:** Contains functions that are not directly attached to a file structure.
- **internal/common/structs/structs.go:** Contains type structures for various functions.
- **internal/middleware/env.go:** Environment middleware for handling environment variables.
- **usecases/app/alert/alert.go:** Logic for alert management functionality.
- **usecases/app/budget/budget.go:** Logic for budget management functionality.
- **usecases/app/init/init.go:** Logic for init functionality.
- **usecases/app/spend/history.go:** Logic for handling the history.
- **usecases/app/spend/spend.go:** Logic for transaction functionality.
- **usecases/app/spend/notification.go:** Functions for setting the hourly, daily and more notifications.
- **usecases/app/total_amount/total_amount.go:** Logic for handling the total amount data.

### Middleware files

- **usecases/middleware/env_loader.go:** Environment middleware for handling environment variables.

### Testing files

- **tests/app/budget/alert_test.go:** Test file for handling the alert test functions.
- **tests/app/alert/alert_test.go:** Test file for handling the alert test functions.
- **tests/app/budget/budget_test.go:** Test file for handling the budget test functions.

### Root files
Expand Down

0 comments on commit 3df9b47

Please sign in to comment.