Code Monkey home page Code Monkey logo

lemur's People

Contributors

bidluo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lemur's Issues

Registration

Objective

Enable new users to register and create an account on the platform.

User Stories

  1. As a new user, I want to be able to create an account, so that I can participate in discussions and save preferences.

Acceptance Criteria

  1. The user must enter a unique username and a password to register.
  2. The username must not already exist in the system.

Required API Fields

Request

  • username (String): The desired username for the new account.
  • password (String): The desired password for the new account.
  • password_verify (String): Password verification.
  • show_nsfw (Bool): Whether to show NSFW content or not.
  • email (String, optional): The email of the user.
  • captcha_uuid (String, optional): The captcha identifier.
  • captcha_answer (String, optional): The captcha answer.
  • honeypot (String, optional): Honeypot field for spam prevention.
  • answer (String, optional): Challenge question answer for spam prevention.

Response

  • jwt (String, optional): JWT token to authenticate subsequent requests.
  • registration_created (Bool): Indicates if the registration was successful.
  • verify_email_sent (Bool, optional): Indicates if the verification email was sent.

Out of Scope

  • Two-factor authentication.
  • Recovery of lost passwords.

Sorting

Objective

Provide a user with the ability to sort posts and comments according to various criteria. The sorting options for comments are "Hot", "Top", "New", and "Old". The sorting options for posts include "Active", "Hot", "New", "Old", "TopDay", "TopWeek", "TopMonth", "TopYear", "TopAll", "MostComments", "NewComments", "TopHour", "TopSixHour", "TopTwelveHour", "TopThreeMonths", "TopSixMonths", and "TopNineMonths". The time-bound "TopX" sort options should be contained within a submenu in the main sort menu.

User Stories

As a user, I want to:

  1. Sort the posts and comments I view according to my preferred criteria.
  2. Easily change my sorting preference in the UI.

Acceptance Criteria

  1. Posts and comments should be sortable according to the described criteria.
  2. The UI should offer an easy way to change the sorting preference.
  3. The “Top*" sorting options for posts should be arranged in a submenu, clearly separated from the main sorting options.

Required API Fields

Post

https://join-lemmy.org/api/types/SortType.html
sort param on post list API call with one of these options

Comment

https://join-lemmy.org/api/types/CommentSortType.html
sort param on the comment list API call with one of these options

Out of Scope

  1. Remembering sort
  2. Applying multiple sorting options at once.

SwiftData

Objective

Provide a seamless user experience in both online and offline situations. Users should be able to read posts and their associated comments even in the absence of internet connectivity. Additionally, provide users the ability to define the duration of offline data retention for each post.

User Stories

As a user, I want to:

  1. Be able to read posts and associated comments in offline mode which I have previously accessed.
  2. Define the duration for which a post and its comments should be stored offline (options: 5m, 30m, 1h, 12h, 1w, always).
  3. Manually refresh data if I wish.

Acceptance Criteria

  1. When a user accesses a post and its comments while online, the data should be stored locally for offline access.
  2. If a user specifies the offline retention period for a post, the app should respect this setting.
  3. The app should automatically delete posts and their associated comments that are past their defined offline retention period.
  4. If the user opens a post while offline, the app should display the locally stored version if available.
  5. A user should be able to manually refresh the data of a post.

Out of Scope

  1. Offline creation of new posts or comments.
  2. Offline updates or edits to existing posts or comments.
  3. Conflict resolution for outdated local data.
  4. Offline liking or other interactive activities.
  5. Storing comments that haven’t been loaded yet (no preload)

Authentication

Objective

Provide users with the ability to securely log in to the application and make authenticated requests to the API.

User Stories

  1. As a user, I want to securely login to the app using my email/username and password.
  2. As a user, I want my login session to persist across app closures and restarts.
  3. As a user, I want to securely logout from the app, ending my current session.

Acceptance Criteria

  1. User can enter their email/username and password into a form.
  2. Upon form submission, the app will make a POST request to the /login endpoint with the login payload.
  3. User can logout from the app which will invalidate their current session.

Required API Fields

Request

  • username_or_email: String
  • password: String

Response

  • jwt: String (The authentication token)

Out of Scope

  • Account creation/registration
  • Password recovery
  • Two-Factor Authentication (TOTP)

Further Details

Upon successful login, the server will respond with a JWT token. This token should be included as an 'auth' parameter in the query string for all subsequent authenticated requests. The format of the parameter should be ?auth={token} where {token} is replaced with the actual JWT token received.

Server connection management

Objective

To provide users with the ability to add and remove federated sites from the app and provide a list of default sites.

User Stories

  1. As a user, I want to add new federated sites to my list, so I can view and interact with the communities on those sites.
  2. As a user, I want to remove federated sites from my list, so I can curate the content I see.
  3. As a user, I want a list of default sites provided, so I can quickly start browsing without needing to add sites manually.

Acceptance Criteria

  1. Users can add a new site by entering the site's URL.
  2. Users can remove an existing site from their list.
  3. Users can select a specific site to view.
  4. Users are presented with a list of default sites upon app installation.

Out of Scope

  • Interleaving content from multiple sites into a single mixed feed.
  • Validation of site URLs during the addition process.
  • The ability to modify the details of an existing site on the list.

Create Comment List View

Description:
We need to implement a view that displays a list of comments for a specific post. The comments should be ordered based on their 'hot rank'. In cases where child comments are returned from the API, these should be displayed under their parent comment.

Requirements:

  • Fetch comments associated with a specific post.
  • Display comments with child comments where applicable, understanding the hierarchy from the 'path' field (0 is top level, subsequent ids represent parent and child comments respectively).

Fields from API:

  • comment.id
  • comment.content
  • comment.published
  • comment.path
  • creator.id
  • creator.name
  • counts.score
  • counts.upvotes
  • counts.downvotes
  • counts.child_count

Acceptance Criteria:

  1. When a user opens a post, they should see a list of comments.
  2. Each comment should show its content, the name of its creator, its score, and its publish date.
  3. If a comment has child comments that were returned from the API, these should be displayed under the parent comment, clearly indicating their relationship.

Community List

Objective

Provide a user interface that displays a list of communities from the selected Lemmy instance. The list should be sorted by the selected sort order, and can be filtered to show/hide NSFW communities. The user should be able to tap on a community to view its details.

User Stories

  1. View Community List - As a user, I want to see a list of communities so that I can explore the different groups available on a Lemmy instance.
  2. Sort Community List - As a user, I want to sort the list of communities so that I can view them in an order that suits me.
  3. Filter NSFW Communities - As a user, I want to have the option to hide or show NSFW communities.
  4. View Community Details - As a user, I want to tap on a community to view its details and posts.

Acceptance Criteria

  • The community list is displayed upon navigating to the community list screen.
  • The community list can be sorted according to the selected sort order.
  • The community list can be filtered to hide or show NSFW communities.
  • Tapping on a community takes the user to the detailed view of that community.

Required API Fields

Request

  • auth?: Token for authenticated requests
  • show_nsfw?: Optional boolean to toggle the display of NSFW communities
  • sort?: Optional string to determine the sort order of communities

Out of Scope

  • Actions related to a community from the list (subscribe, etc.).
  • Interleaving community lists from different servers.

Post detailed view (excl comments)

Objective

Enable full post content view with associated metadata (excluding comments, voting, bookmarking, and NSFW functionality).

User Stories

  1. As a user, I want to access a detailed view by tapping a post.
  2. As a user, I want to see post metadata: author, creation date, community.
  3. As a user, I need a way to return to the list view from the detailed view.

Acceptance Criteria

  1. Tapping on a post in the list view navigates to a detailed view of the post.
  2. The detailed view shows the post's full content (post.url) and metadata (post.name, creator.name, post.published, community.name, counts.comments, counts.score, counts.upvotes, counts.downvotes).
  3. A mechanism is provided for the user to return to the list view from the detailed view.

Required API Fields

  • post.id
  • post.name
  • post.url
  • post.published
  • creator.name
  • community.name
  • counts.comments
  • counts.score
  • counts.upvotes
  • counts.downvotes

Out of Scope

  • Comment interaction
  • Upvote/Downvote actions
  • Bookmarking posts
  • NSFW flag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.