0% found this document useful (0 votes)
7 views

Backend Task 2

The document outlines a task to build RESTful APIs for user authentication and a blog platform with JWT authentication. It details key functionalities including user signup, login, logout, profile management, and CRUD operations for blog posts. Additionally, it emphasizes the importance of comprehensive documentation and testing using tools like Postman and Jest, while suggesting technologies such as MongoDB and SQLite.

Uploaded by

harsh singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Backend Task 2

The document outlines a task to build RESTful APIs for user authentication and a blog platform with JWT authentication. It details key functionalities including user signup, login, logout, profile management, and CRUD operations for blog posts. Additionally, it emphasizes the importance of comprehensive documentation and testing using tools like Postman and Jest, while suggesting technologies such as MongoDB and SQLite.

Uploaded by

harsh singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Task-2

Task: Perform basic CRUD operation with JWT authentication.


Date of Submission: 04/11/2024

1. Objective:
○ Build RESTful APIs for basic user authentication and a blog platform.
○ Implement JWT (JSON Web Token) for secure user sessions.
○ Document the APIs with comprehensive details, including routes, request and
response formats.
2. Key Functionalities:
○ Authentication APIs:
■ Signup: Endpoint for user registration. Users should provide basic
information such as username, email, password, and profile details (e.g., bio,
profile picture).
■ Login: Endpoint for logging in, returning a JWT token for session handling.
■ Logout: Invalidate or clear the JWT token, allowing for a secure logout
experience.
■ Profile: Fetch and update profile information using the JWT token for
authenticated access.
○ Blog CRUD Operations:
■ Create Post: Allow authenticated users to create posts. Fields required:
■ Title: Short title of the post.
■ Image: Optional image upload functionality for the post.
■ Description: Main content of the post.
■ Date and Time of Post: Automatically capture the date and time.
■ Tags: Add optional tags for categorizing posts.
■ Read Posts: Fetch individual or multiple posts, can implement search
filter(optional).
■ Update Post: Allow users to edit their posts.
■ Delete Post: Allow users to delete their post.

3. Documentation and Testing:


○ Use Postman, Thunder client or Jest for API testing.
○ Create comprehensive documentation using tools like Swagger, Postman, or google
docs.
○ Include examples of requests and responses for each endpoint.
○ Outline authentication flow, JWT token usage, and any error messages with HTTP
status codes.
4. Suggested Technologies:
○ Database: Use Mongo DB for Node JS, H2 for spring boot and SQLite for Django.
○ API Testing: Use Jest, Postman or Thunder client for testing.
5. Expected Outcome:
○ A fully functional API with JWT authentication, basic CRUD operations, and proper
documentation.
○ Code should be clean, modular, and include comments where necessary.

*Learning Goals with implementation:

1. Session Authentication and Cookie Storage: Understand how to handle sessions and
cookies as an alternative authentication method.
2. Jest API Testing Tool: Learn and implement tests using Jest to ensure API reliability.
3. OAuth: Integrate OAuth to support external authentication.

You might also like