Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bardan Dhakal - Completed intern assesment with all necessary requirements #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DB_FILE_PATH=./database.sqlite
30 changes: 15 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
Please answer the following questions.

1. What is your name?

Bardan Dhakal

2. How long did you work on this project?

1 hr 50 min

3. What is the most challenging part of the project?

The most challenging part of this project was handling the list completed and incompleted tasks requirement. Since, I had already implemented the list all task requirements via a GET /tasks route, the new route that I implemented to filter tasks based upon completion was not working because the first GET /tasks route was always implemented. Therefore the second route that implemented filtering based on completion never worked. This took me a while to figure out and I solved the issue by merging the two routes.

4. What did you learn from this project?

I learned how to build a RESTful API that supports CRUD operations for task management. Additionally, I gained experience in working with query parameters for filtering data, Debugging path conflicts and improving the overall structure and error handling of a Node.js application

5. What would you like to add or improve in this project?

I would like to add a search functionality to allow the users to search tasks by keywords and soft deletion where deleted tasks can be recovered if needed by the user.

6. What is your feedback on this project?

This project is a great exercise to learn full-stack development concepts especially API design.

7. What is your suggestion for this project?

I want to suggest introducing a frontend to this project to make it more user-friendly and adding documentation for better usability.

8. Could you mark which of the following requirements you have completed?

Create a Todo App todo the following requirements:

- [ ] It should be possible to create a task.
- [ ] It should be possible to read a task.
- [ ] It should be possible to mark a task as completed.
- [ ] It should be possible to update the title of task.
- [ ] It should be possible to delete a task.
- [ ] It should be possible to list all tasks.
- [ ] It should be possible to list all completed tasks.
- [ ] It should be possible to list all pending tasks.
- [Completed] It should be possible to create a task.
- [Completed] It should be possible to read a task.
- [Completed] It should be possible to mark a task as completed.
- [Completed] It should be possible to update the title of task.
- [Completed] It should be possible to delete a task.
- [Completed] It should be possible to list all tasks.
- [Completed] It should be possible to list all completed tasks.
- [Completed] It should be possible to list all pending tasks.

Once competed, you can submit a pull request to the original repository.

Expand Down
Binary file added database.sqlite
Binary file not shown.
5 changes: 5 additions & 0 deletions models/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Task.init(
type: DataTypes.STRING,
allowNull: false,
},
completed: { //Added new attribute to task to mark whether it is completed or not
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: false,
}
},
{
sequelize, // Pass the connection instance
Expand Down
16 changes: 16 additions & 0 deletions node_modules/.bin/color-support

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/color-support.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/color-support.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/mkdirp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/mkdirp.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/mkdirp.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/node-gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/node-gyp.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/node-gyp.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/node-which.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/node-which.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading