Skip to content

Commit

Permalink
updated the docs by improving structure and adding more commands to t…
Browse files Browse the repository at this point in the history
…he application
  • Loading branch information
ibilalkayy committed Apr 24, 2024
1 parent 8ebd738 commit 815cfea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"github.com/spf13/cobra"
)

const version = "v0.1.88"
const version = "v0.1.89"

// rootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "flow",
Version: version,
Short: "Manage budgets with Formance API",
Short: "Manage budgets with Payment APIs",
Long: `Flow is a budget planning application designed to empower users with the ability to track,
analyze, and optimize their spending habits and financial goals. With a user-friendly CLI.
Expand Down
2 changes: 1 addition & 1 deletion cmd/total_amount/sub_handler/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// CheckCmd represents the check command
var CheckCmd = &cobra.Command{
Use: "check",
Short: "A brief description of your command",
Short: "Check the status of the total amount",
Run: func(cmd *cobra.Command, args []string) {
values, err := total_amount_db.ViewTotalAmount()
if err != nil {
Expand Down
12 changes: 9 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Welcome to the Flow command reference! This document provides an overview of the

## Introduction to Flow

Flow helps users manage their finances and achieve greater financial stability by leveraging the Formance API for a comprehensive financial management solution. With Flow, users can:
Flow helps users manage their finances and achieve greater financial stability by leveraging different payment APIs for a comprehensive financial management solution. With Flow, users can:

- **Track Spending**: Easily track their spending across different categories.
- **Set Budgets**: Create budgets for various spending categories to control expenses.
Expand Down Expand Up @@ -37,7 +37,7 @@ Sure, let's break down each command along with its structure for better understa
### 2. `flow init`
- **Description**: Initalize your flow application before running other commands.
- **Note**: All these commands are required to enter.
- **Usage**: `flow budget flow [flags]`
- **Usage**: `flow budget init [flags]`
- **Flags**:
- `-a, --app_password string` Write the App Password of your Gmail account
- `-d, --dbname string` Write the PostgreSQL DB name
Expand Down Expand Up @@ -142,6 +142,8 @@ Sure, let's break down each command along with its structure for better understa
### 14. `flow spend`
- **Description**: Provides spending services on various categories.
- **Usage**: `flow spend [flags]`
- **Available Commands**:
- `history`: Show the transaction history
- **Flags**:
- `-a, --amount string`: Write the spending amount for a category
- `-c, --category string`: Write the category name to spend the money on
Expand All @@ -163,13 +165,13 @@ Sure, let's break down each command along with its structure for better understa
- **Available Commands**:
- `active`: Make the total amount active
- `inactive`: Make the total amount inactive
- `check`: Check the status of the total amount

### 17. `flow total-amount add`
- **Description**: Add the total amount data.
- **Usage**: `flow total-amount add [flags]`
- **Flags**:
- `-a, --amount string`: Write the total amount that you want to set
- `-e, --exclude string`: Specify a category to exclude from the total amount
- `-i, --include string`: Specify a category to include in the total amount
- `-l, --label string`: Provide a label for setting up your total amount
- `-h, --help`: help for set
Expand All @@ -180,11 +182,15 @@ Sure, let's break down each command along with its structure for better understa
- **Flags**:
- `-a, --amount string`: Write the total amount that you want to update
- `-l, --label string`: Write the label that you want to update
- `-n, --newcategory string`: Write the new category to update with
- `-o, --oldcategory string`: Write the old category that you want to update
- `-h, --help`: help for set

### 19. `flow total-amount remove`
- **Description**: Remove the total amount data.
- **Usage**: `flow total-amount remove [flags]`
- **Flags**:
- `-c, --category string`: Write the category to remove it's date

### 20. `flow total-amount view`
- **Description**: View the total amount data.
Expand Down
16 changes: 14 additions & 2 deletions docs/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
│ ├── init
│ │ └── init.go
│ ├── spend
│ │ ├── handler
│ │ │ └── history.go
│ │ ├── sub_handler
│ │ │ ├── show.go
│ │ │ └── remove.go
│ │ └── spend.go
│ ├── total_amount
│ │ ├── total_amount.go
Expand All @@ -32,14 +37,16 @@
│ │ └── sub_handler
│ │ ├── active.go
│ │ ├── inactive.go
│ │ ├── amount.go
│ │ ├── categories.go
│ │ └── amount.go
│ │ └── check.go
│ └── root.go
├── db
│ ├── alert_db
│ │ └── alert_db.go
│ ├── budget_db
│ │ └── budget_db.go
│ │ ├── budget_db.go
│ │ └── history_db.go
│ ├── total_amount_db
│ │ ├── total_amount_db.go
│ │ └── total_amount_category.go
Expand All @@ -64,6 +71,7 @@
│ │ ├── init
│ │ │ └── init.go
│ │ ├── spend
│ │ │ ├── history.go
│ │ │ ├── notification.go
│ │ │ └── spend.go
│ │ └── total_amount
Expand Down Expand Up @@ -133,6 +141,9 @@

- **cmd/init/init.go:** Flow initialization functionality.
- **cmd/spend/spend.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

Expand All @@ -158,6 +169,7 @@
- **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.
Expand Down

0 comments on commit 815cfea

Please sign in to comment.