diff --git a/src/components/Projects/ProjectsList.tsx b/src/components/Projects/ProjectsList.tsx index 3d786ca70..bff55d227 100644 --- a/src/components/Projects/ProjectsList.tsx +++ b/src/components/Projects/ProjectsList.tsx @@ -114,6 +114,9 @@ export function ProjectsList(props: ProjectsListProps) { )} {matchingProjects + .sort((a, b) => { + return b.frontmatter.sort - a.frontmatter.sort; + }) .sort((project) => { return project.frontmatter.difficulty === 'beginner' ? -1 diff --git a/src/data/projects/expense-tracker.md b/src/data/projects/expense-tracker.md new file mode 100644 index 000000000..6d078da18 --- /dev/null +++ b/src/data/projects/expense-tracker.md @@ -0,0 +1,80 @@ +--- +title: 'Expense Tracker' +description: 'Build a simple expense tracker application to manage your finances.' +isNew: false +sort: 2 +difficulty: 'beginner' +nature: 'CLI' +skills: + - 'Programming Language' + - 'CLI' + - 'Filesystem' + - 'Logic Building' +seo: + title: 'Expense Tracker' + description: 'Build a simple expense tracker application to manage your finances.' + keywords: + - 'expense tracker cli' + - 'backend project idea' +roadmapIds: + - 'backend' +--- + +Build a simple expense tracker application to manage your finances. The application should allow users to add, delete, and view their expenses. The application should also provide a summary of the expenses. + +## Requirements + +Application should run from the command line and should have the following features: + +- Users can add an expense with a description and amount. +- Users can update an expense. +- Users can delete an expense. +- Users can view all expenses. +- Users can view a summary of all expenses. +- Users can view a summary of expenses for a specific month (of current year). + +Here are some additional features that you can add to the application: + +- Add expense categories and allow users to filter expenses by category. +- Allow users to set a budget for each month and show a warning when the user exceeds the budget. +- Allow users to export expenses to a CSV file. + +The list of commands and their expected output is shown below: + +```bash +$ expense-tracker add --description "Lunch" --amount 20 +# Expense added successfully (ID: 1) + +$ expense-tracker add --description "Dinner" --amount 10 +# Expense added successfully (ID: 2) + +$ expense-tracker list +# ID Date Description Amount +# 1 2024-08-06 Lunch $20 +# 2 2024-08-06 Dinner $10 + +$ expense-tracker summary +# Total expenses: $30 + +$ expense-tracker delete --id 1 +# Expense deleted successfully + +$ expense-tracker summary +# Total expenses: $20 + +$ expense-tracker summary --month 8 +# Total expenses for August: $20 +``` + +## Implementation + +You can implement the application using any programming language of your choice. Here are some suggestions: + +- Use any programming language for any available module for parsing command arguments (e.g. python with the `argparse`, node.js with `commander` etc). +- Use a simple text file to store the expenses data. You can use JSON, CSV, or any other format to store the data. +- Add error handling to handle invalid inputs and edge cases (e.g. negative amounts, non-existent expense IDs, etc). +- Use functions to modularize the code and make it easier to test and maintain. + +
+ +This project idea is a great way to practice your logic building skills and learn how to interact with the filesystem using a CLI application. It will also help you understand how to manage data and provide useful information to users in a structured way. \ No newline at end of file diff --git a/src/data/projects/stock-cli.md b/src/data/projects/stock-cli.md deleted file mode 100644 index 81206f48b..000000000 --- a/src/data/projects/stock-cli.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: 'Stock CLI' -description: 'Build a command line interface (CLI) to track your tasks and manage your to-do list.' -isNew: false -difficulty: 'intermediate' -nature: 'API' -skills: - - 'Programming Language' - - 'CLI' - - 'Filesystem' - - 'Logic Building' -seo: - title: 'Task Tracker CLI' - description: 'Build a command line interface (CLI) to track your tasks and manage your to-do list.' - keywords: - - 'task tracker cli' - - 'backend project idea' -roadmapIds: - - 'backend' ---- - -You are required to build a command line interface (CLI) application that allows users to manage their tasks and to-do list. The application should be able to perform the following operations: - -- Add a new task -- List all tasks -- Mark a task as done -- Delete a task -- Update a task -- Search for a task -- Filter tasks by status (done, pending) - diff --git a/src/data/projects/task-tracker.md b/src/data/projects/task-tracker.md index e6b529ad5..a4af32cba 100644 --- a/src/data/projects/task-tracker.md +++ b/src/data/projects/task-tracker.md @@ -2,13 +2,13 @@ title: 'Task Tracker' description: 'Build a command line (CLI) app to track your tasks and manage your to-do list.' isNew: false +sort: 1 difficulty: 'beginner' nature: 'CLI' skills: - 'Programming Language' - 'CLI' - 'Filesystem' - - 'Logic Building' seo: title: 'Task Tracker CLI' description: 'Build a command line interface (CLI) to track your tasks and manage your to-do list.' diff --git a/src/lib/project.ts b/src/lib/project.ts index 33062cf2f..8bd37bc24 100644 --- a/src/lib/project.ts +++ b/src/lib/project.ts @@ -12,6 +12,7 @@ export interface ProjectFrontmatter { title: string; description: string; isNew: boolean; + sort: number; difficulty: ProjectDifficultyType; nature: string; skills: string[]; diff --git a/src/pages/projects/[projectId].astro b/src/pages/projects/[projectId].astro index 9c1f0d5b2..cbbb4c0db 100644 --- a/src/pages/projects/[projectId].astro +++ b/src/pages/projects/[projectId].astro @@ -111,12 +111,12 @@ const githubUrl = `https://github.com/kamranahmedse/developer-roadmap/tree/maste
Found a mistake?