Skip to content

Commit

Permalink
Merge pull request #10 from Virtual-Coffee/repo-setup
Browse files Browse the repository at this point in the history
added repository templates
  • Loading branch information
meg-gutshall authored Jul 28, 2024
2 parents c15990e + ce4290a commit 894a6e3
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
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

0 comments on commit 894a6e3

Please sign in to comment.