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

added repository templates #10

Merged
merged 4 commits into from
Jul 28, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions solutions/task-template-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Node.js Simple API Submission

## Submission Link

Name - Link to Github repo / article
99 changes: 99 additions & 0 deletions task-challenges/task-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Backend API Challenge: Node.js Simple API

**Creator :** XYZ

## Prerequisites

- Basic JavaScript and Node.js
- Express.js
- MongoDB (or any other database of your choice)
- Basic knowledge of RESTful API principles

## The Tech

- Node.js
- Express.js (for creating the API)
- MongoDB (for storing data; you can use Mongoose for easier interaction)
- Postman or any other API testing tool

## The Challenge

Create a simple backend API to manage a collection of resources (e.g., articles, tasks, or any other entity). This challenge will help to understand your thinking process and judge your skill level.

### For Beginner Level

#### CRUD Operations on a Simple Resource (e.g., Articles, Tasks)

**Create Resource:** Add a new resource.
**Get All Resources:** Retrieve all resources.
**Get Resource by ID:** Retrieve a specific resource by its ID.
**Update Resource:** Update a specific resource.
**Delete Resource:** Delete a specific resource.

#### Bonus Points

**Search Functionality:** Implement a search endpoint to find resources by title or content.

### For Intermediate Level

#### CRUD Operations on a Simple Resource (e.g., Articles, Tasks)

**Create Resource:** Add a new resource.
**Get All Resources:** Retrieve all resources.
**Get Resource by ID:** Retrieve a specific resource by its ID.
**Update Resource:** Update a specific resource.
**Delete Resource:** Delete a specific resource.

#### User Authentication

**Sign Up:** Create a new user account.
**Login:** Authenticate a user and return a token.
**Logout:** Log out a user (invalidate the token).

#### Bonus Points

**Get User Profile:** Retrieve the authenticated user's profile
**Search Functionality:** Implement a search endpoint to find resources by title or content.

### For Advanced Level

#### CRUD Operations on a Simple Resource (e.g., Articles, Tasks)

**Create Resource:** Add a new resource.
**Get All Resources:** Retrieve all resources.
**Get Resource by ID:** Retrieve a specific resource by its ID.
**Update Resource:** Update a specific resource.
**Delete Resource:** Delete a specific resource.

#### User Authentication

**Sign Up:** Create a new user account.
**Login:** Authenticate a user and return a token.
**Logout:** Log out a user (invalidate the token).

#### Bonus Points

**Get User Profile:** Retrieve the authenticated user's profile.
**Token Refresh:** Implement a token refresh mechanism to allow users to obtain a new token without re-authenticating.
**Password Reset:** Implement a password reset functionality.
**Search Functionality:** Implement a search endpoint to find resources by title or content.

## Deadline

- Its optional and its decided by the author.
- If timeline is given, please specify the time required for peer review.

## Deliverables (Optional)

- Deploy the API on a platform like [Render](https://render.com/), [Railway](https://railway.app/), or any other cloud service.
- Submit the code in a GitHub repository.
- Create a `README` in solutions directory with the name `task-template-solution.md`, so the person doing the challenge can post their name with link to their solution. We will take input from the repo for peer review and final submission.

### Code Submission

[Backend API submission readme](../solutions/task-template-submission.md)

## Going Further

- **Authentication:** Learn about token-based authentication (e.g., JWT).
- **Testing:** Learn about testing your API using tools like Mocha, Chai, or Jest