id
stringclasses
20 values
date
timestamp[s]date
2025-05-12 00:00:00
2025-05-12 00:00:00
level
stringclasses
4 values
description
stringlengths
28
5.03k
project
stringclasses
50 values
task-1
2025-05-12T00:00:00
easy
JS class Question constructor params are: title (string), name (string), preview (boolean, default false), and has a member 'root'. 'Question.root' is a fieldset (class 'q', id is param 'name',) containing a title legend (class 'q-title') and a body container (class 'q-body'). Save codes as es-module file 'common/Question.js'. Add a button 'Add Question' (class 'add-question') in 'design.js', and click it to create a Question (random title and unique name) whose root is prepended to the form. Save styles to 'common/Question.less' imported by 'common.less'.
less
task-2
2025-05-12T00:00:00
easy
In design page, a Question title is clicked to edit (contenteditable=true) in place. In preview page, title can not be edited. Append 'Question.root' with a config panel (class 'q-config') containing a button (class 'q-remove') clicked to remove the question from the form. Config panel should be hidden in preview page. Extract all colors to LESS map variable '@color', all padding/margin value to LESS variables (using computed value) and all border properties to mixins. Use LESS functions to handle similar colors, e.g. lighter or darker colors. Save these variables and mixins to 'common/config.less' which should be imported by 'common.less'.
less
task-3
2025-05-12T00:00:00
easy
Class SurveyDesign constructor params are: formSelector (string), title (string). Method 'prependQuestion(question)' and 'appendQuestion(question)' are used to prepend/append a 'question.root' to the form (got by param 'formSelector'). Save codes to 'common/SurveyDesign.js' imported by 'design.js'. Move '.add-question' button codes to 'common/SurveyDesign.js' which should import './Question.js'. Save styles to 'common/SurveyDesign.less' imported by 'common.less'.
less
task-4
2025-05-12T00:00:00
easy
Add 'Save' button (class 'save') and 'Preview' button (class 'preview') in 'common/SurveyDesign.js'. Click 'Save' button to save Survey data to 'localStorage.data'. Survey data format is like `{title:'survey title', questions:[{className:'Question', title:'title 1', name:'question1'}, {className:'Question', title:'title2', name:'question2'}]}`. Each type of question's JSON data should contain all properties from constructor params and configs. Click 'Preview' button to save Survey data and open preview page in new window. Save codes to 'common/SurveyDesign.js'.
less
task-5
2025-05-12T00:00:00
easy
Class SurveyPreview (file 'common/SurveyPreview.js', used by 'preview.js') constructor params are: formSelector (string), title (string). Method 'prependQuestion(question)' and 'appendQuestion(question)' are used to prepend/append a 'question.root' to the form (got by param 'formSelector'). Create a SurveyPreview instance with data parsed from 'localStorage.data' and all questions should use preview mode in which config panel should be hidden and question can not be editable. Save styles to 'common/SurveyPreview.less' imported by 'common.less'.
less
task-6
2025-05-12T00:00:00
moderate
Class SingleSelectionQuestion (file 'common/SingleSelectionQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), options (string array). Use radio as selection control whose value is the options index. Options are rendered in '.q-body'. Add a button (class 'add-single') in 'common/SurveyDesign.js', and click it to create a SingleSelectionQuestion (random title, unique name, 3 random options) whose root is prepended to the form. Click config panel button (class 'add-option') to add an option. In design page each option row (class 'option') in '.q-body', user can click button (class 'remove-option') to remove an option, click option text (class 'option-text') to edit it (contenteditable=true) in place. Save styles to 'common/SingleSelectionQuestion.less' imported by 'common.less'.
less
task-7
2025-05-12T00:00:00
moderate
Class MultiSelectionQuestion (file 'common/MultiSelectionQuestion.js', 'common/MultiSelectionQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), options (string array). Use checkbox as selection control whose value is the options index. Options are rendered in '.q-body'. Add a button (class 'add-multi') in 'common/SurveyDesign.js', and click it to create a MultiSelectionQuestion (random title, unique name, 3 random options) whose root is prepended to the form. Click config panel button (class 'add-option') to add an option. In design page each option row (class 'option') in '.q-body', user can click button (class 'remove-option') to remove an option, click option text (class 'option-text') to edit it in place.
less
task-8
2025-05-12T00:00:00
moderate
Class OpenQuestion (file 'common/OpenQuestion.js', 'common/OpenQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), isMultilines (boolean). When isMultilines is false question value does not contain any line break character. Add a button (class 'add-open') in 'common/SurveyDesign.js', and click it to create an OpenQuestion (random title, unique name) whose root is prepended to the form. Add a checkbox (class 'q-multilines') associated with 'OpenQuestion.isMultilines' to the config panel.
less
task-9
2025-05-12T00:00:00
moderate
Class RatingQuestion (file 'common/RatingQuestion.js', 'common/RatingQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), starCount (number, default 5). Add a button (class 'add-rating') in 'common/SurveyDesign.js', and click it to create a RatingQuestion (random title, unique name) whose root is prepended to the form. Add a config panel checkbox (class 'q-starCount') associated with 'RatingQuestion.starCount'. Highlight star options (class 'option') up to the clicked star option, and get the rating value (stored in param-named control) from 0 to 1.
less
task-10
2025-05-12T00:00:00
moderate
Class RankingQuestion (file 'common/RankingQuestion.js', 'common/RankingQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), options (string array). Add a button (class 'add-ranking') in 'common/SurveyDesign.js', and click it to create a RankingQuestion (random title, unique name and 3 random options) whose root is prepended to the form. Click config panel button (class 'add-option') to add an option. In design page, each option row (class 'option'), user can click button (class 'remove-option') to remove an option, click option text (class 'option-text') to edit it in place. In preview page, insert after the target option (class 'option') when dragging the source option to drop into the target one; Store comma separated option indices in param-named control.
less
task-11
2025-05-12T00:00:00
moderate
Class NpsQuestion (file 'common/NpsQuestion.js', 'common/NpsQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean). Add a button (class 'add-nps') in 'common/SurveyDesign.js', and click it to create a NpsQuestion (random title, unique name) whose root is prepended the form. In preview page, highlight the clicked score option (class 'option'), and store score (0-10) in param-named control.
less
task-12
2025-05-12T00:00:00
challenging
Class LikertQuestion (file 'common/LikertQuestion.js', 'common/LikertQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), options (string array), statements (string array). LikertQuestion is a table whose each row represents a statement (single selection), and each column is a radio option. Store each statement selection value in the control whose name is like {param-name}_{statement-index}. Add a button (class 'add-likert') in 'common/SurveyDesign.js', and click it to create a LikertQuestion (random title, unique name, 5 random options, 3 statements) whose root is prepended to the form.
less
task-13
2025-05-12T00:00:00
challenging
Click config panel button (class 'add-statement') to add an statement row. In design page each statement row (class 'statement'), user can click button (class 'remove-statement') to remove an statement row, click statement text (class 'statement-text') to edit it in place. In design page each option cell (class 'option'), user can click button (class 'add-option') to add an option column, click button (class 'remove-option') to remove an option column, click option text (class 'option-text') to edit it in place.
less
task-14
2025-05-12T00:00:00
challenging
Add questions contents (class 'contents', file 'common/Contents.js' used by 'common/SurveyDesign.js' and 'common/SurveyPreview.js') panel fixed at the right side of the page. Contents can not cover any question content. Each contents item (class 'contents-item') has the text from the associated question's title. Click each contents item to scroll page to the associated question. Update contents after questions updated in the form. Insert after the target contents item when dragging the source one into the target one; Change the position of associated questions at the same time. Save styles to 'common/Content.less' imported by 'common.less'.
less
task-15
2025-05-12T00:00:00
challenging
Add a config panel checkbox (class 'q-required') associated with Question.required (boolean, default false). Preview page form can not be submitted when any required question has no/empty value. Give priority to implement 'required' feature using each Question's form controls 'required' attribute. Implement 'required' feature for SingleSelectionQuestion, NpsQuestion, LikertQuestion, RatingQuestion.
less
task-16
2025-05-12T00:00:00
moderate
Add a config panel checkbox (class 'q-minLength') associated with 'OpenQuestion.minLength' (number, default 0). A required OpenQuestion's answer length should be greater than 0. OpenQuestion's answer length should be equal or greater than minLength.
less
task-17
2025-05-12T00:00:00
moderate
A required MultiSelectionQuestion should contain at least one checked option. If not valid, use alert dialog to display information and prevent form submitting.
less
task-18
2025-05-12T00:00:00
challenging
Class DataQuestion (file 'common/DataQuestion.js', 'common/DataQuestion.less') inherits from Question. Its constructor params are: title (string), name (string), preview (boolean), type (one of url/tel/email/date/number, as input element type). Add a button (class 'add-data') in 'common/SurveyDesign.js', and click it to create a DataQuestion (random title, unique name, random type) whose root is prepended to the form. Add a config panel select (class 'q-type', options url/tel/email/date/number) associated with 'DataQuestion.type'.
less
task-19
2025-05-12T00:00:00
challenging
Add a config checkbox 'Shuffle' (class 'q-shuffle') and 'isShuffleMode' property for SingleSelectionQuestion, MultiSelectionQuestion, RankingQuestion. Shuffle options if needed in preview page.
less
task-20
2025-05-12T00:00:00
challenging
Add button 'Add' (class 'add') in each question config panel. Click '.add' button to display the popup panel whose buttons are clicked to insert a new question after the current one. The popup panel (class 'popup') contains all buttons clicked to add different type of question to the form. Click page to close the popup panel.
less
task-1
2025-05-12T00:00:00
easy
1) create home page (app/page.tsx) with route '/' showing '🛍️🛍️🛍️ Welcome to Shopping Mart !' in h1 tag 2) create login page (app/login/page.tsx) at route '/login' showing '💡 Please Login First' in h1 tag
lowdb
task-2
2025-05-12T00:00:00
easy
1) create a new api (GET /api/usernames) by creating api route file (app/api/usernames/route.ts) 2) in this api, return a string list in body to get all usernames by User Model (db.data.users), example: ['user1', 'user2'] 3) Hint: use global.db.data.users and get user model by lowdb API
lowdb
task-3
2025-05-12T00:00:00
easy
1) define a Product type in global.d.ts, update defaultData in instrumentation.ts 2) POST /api/products to insert product data (Request Body follow {'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}) 3) Return { success: true, data: {'id': 'xxxx' } } when inserted successfully 4) GET /api/products to fetch all products 5) Return { success: true, products: [{'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}] } when fetched successfully 6) Hint: use global.db.data.products and get product model by lowdb API
lowdb
task-4
2025-05-12T00:00:00
easy
1) create api route file (app/api/products/[id]/route.ts) for /api/products/:product_id 2) GET /api/products/:product_id to get single products information, Return { success: true, data: {'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}} 3) when product not found, return { success: true, data: null } 4) PUT /api/products/:product_id to update products information (Request Body follow {'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}) 5) Return { success: true, data: {'id': 'xxxx' } } when updated successfully 6) DELETE /api/products/:product_id to delete product data (Return { success: true, data: {'id': 'xxxx' } } when deleted successfully)
lowdb
task-5
2025-05-12T00:00:00
easy
1) Add page with path '/products' to display all products (image, name, price) 2) UI Structure For Product Cards: <div className='product-card' id='product_card_{{id}}'><img className='product-image' src={{image}}/><div className='product-name'>{{name}}</div><div className='product-price'>{{price}}</div></div> 3) add a button (.home-go-products-link) in home page to navigate to '/products' 4) .product-card is wrapped in .product-list 5) create css file to beautify CSS
lowdb
task-6
2025-05-12T00:00:00
moderate
1) Add product detail page with path '/products/:product_id' 2) Add classNames for UI: .product-card, .product-image, .product-name, .product-price, .product_quantity, .product-description 3) In /product page, When .product-card clicked, goto related product detail page 4) create css file to beautify CSS 5) If Not Found, show 'Product Not Found'
lowdb
task-7
2025-05-12T00:00:00
moderate
1) POST /api/auth to login into system with example payload {username: 'xxx', password: 'xxx'} and example response { success: true } 2) GET /api/auth to get the full information of current user, example response {'username': 'xxx', 'role': 'xxx', 'coin': xxx} 3) if not login, return 401 status 4) use 'jose' to generate JWT in cookie by key: 'TOKEN', the payload of JWT follow example{'username': 'xxx', 'role': 'xxx'} 5) secret is 'WEBBENCH-SECRET', use default HS256 algorithm and expired in 1 hour
lowdb
task-8
2025-05-12T00:00:00
moderate
1) Create login form (.login-form) with username input (.username), password input (.password), and submit button (.login-btn) 2) on successful login redirect to home page showing 'Hello {username}!'(h1), on failed login show 'Login Failed' message 3) The username in home page should be rendered in Server Side, create a new Server Action (actions/auth.ts) to get current auth 4) create css file to beautify CSS
lowdb
task-9
2025-05-12T00:00:00
moderate
1) Create register page with route '/register' with form (.register-form) containing: - username (input.username) - password (input.password) - confirm password input (input.confirm-password) - submit button (.register-button) 2) Show error messages in .error-message div for validation failures, error text is: - 'Passwords must match' - 'Username already exists' 3) Redirect to home page and auto login when register successful 4) Add .login-link, clicked to /login 5) Add a .register-link in /login page, clicked to /register 6) Add Server Action to handle register form submission, the initial coin for new user is 1000 7) create CSS file to beautify CSS
lowdb
task-10
2025-05-12T00:00:00
moderate
1) Render STATIC page /profile/:username to display the user profile with UI: - h1.profile-username - .profile-coin 2) Users can only visit their own profile, and Admins can visit the profiles of all people 3) If the privilege is violated, redirect to the /login page 4) If User not found, shows User not found 5) Create CSS file to beautify CSS 6) DO NOT use a third-party UI library
lowdb
task-11
2025-05-12T00:00:00
challenging
1) Add a component in components/HeaderUserMenu.tsx: - if not logged in, display a button (.header-go-login) that navigates to /login - if logged in, display the username (.header-username) on the right side of the site header 2) If user is logged in, when the .header-username is hovered, show a dropdown menu with: - a button (.header-logout-btn) for logging out - a button (.header-go-user-profile) for navigating to the current user's profile page 3) Create CSS file to beautify CSS 4) DO NOT use a third-party UI library
lowdb
task-12
2025-05-12T00:00:00
challenging
1) Add Recharge Button (.recharge-button) in Profile page 2) button is only visible when the user of the profile is current user 3) When Recharge Button clicked, recharge 1000 coin 4) Create CSS file to beautify CSS 5) DO NOT use a third-party UI library 6) Keep profile page STATIC
lowdb
task-13
2025-05-12T00:00:00
challenging
1) Create Admin Portal for admin role with routes '/admin/products' and '/admin/users' 2) Every product and user is wrapped in table row with IDs #admin_product_{product_id} and #admin_user_{username} respectively 3) Display the full information of products and users in table rows 4) On the Home page, add .home-go-product-portal-link and .home-go-user-portal-link to navigate to respective portals 5) For any route inside /admin, Redirect to /login if there is no privilege 6) Create CSS files to beautify CSS
lowdb
task-14
2025-05-12T00:00:00
challenging
1) Implement Wishlist feature where users can add products to their wishlist using button (.add-to-wishlist) in the product detail page 2) Create a separate Wishlist page at route '/wishlist' displaying all products the user has added 3) structured as <div className='wishlist-item' id='wishlist_item_{product_id}'><img className='wishlist-image' src='/'/><div className='wishlist-name'></div><div className='wishlist-price'></div></div> 4) Add functionality to remove items from wishlist with button (.remove-from-wishlist) 5) Store wishlist items in the database 6) Add button (.home-go-wish-list) in home page to navigate to '/wishlist' 7) Create CSS file to beautify the Wishlist UI 8) DO NOT use a third-party UI library
lowdb
task-15
2025-05-12T00:00:00
challenging
1) In components/Cart.tsx, create an appealing cart button .cart-button that shows the number of items in the cart 2) When clicked, it shows a popover of all items in the cart 3) Wrap Product Title, image, quantity (.cart-item-quantity), remove button (.cart-item-remove) in #cart_item_{product_id} 4) On the Detail Page, add an .add-to-cart-button. When clicked, add this product to the cart 5) Store Cart Info in the DB for the current User 6) Place Shopping Cart which can be seen in every page in the right-bottom of page 7) Create CSS files to beautify CSS 8) DO NOT use a third-party UI library
lowdb
task-16
2025-05-12T00:00:00
challenging
1) Add a button .place-order-in-cart in the Popover of Shopping Cart 2) when clicked, create an order with 'Pending payment' status without paying or decreasing product quantity 3) When Order created, redirect to /order/:order-id 4) When Order created, clear Cart 5) Add .header-go-to-my-orders to the dropdown in HeaderUserMenu.tsx, when clicked, go to the Orders Page of the current user 6) Each order in my orders page should be displayed with id, status total price inside #my_order_${order_id} 7) Clicking on an order should jump to the order detail page at /order/:order-id 8) In /order/:order-id, display the product title, images, price in tr#product_in_order_${product_id}, display the order price and order status 9) Create CSS files to beautify CSS 10) DO NOT use a third-party UI library
lowdb
task-17
2025-05-12T00:00:00
challenging
1) Add the .pay-my-order button to /order/:order-id 2) Button is visible when the status is 'Pending payment' 3) When .pay-my-order is clicked: - the status of the order becomes 'Finished' - the Coin is paid by current user - Decrease product quantity 4) If payment fails, update the order status to 'Failed' 5) Create CSS files to beautify CSS 6) DO NOT use a third-party UI library
lowdb
task-18
2025-05-12T00:00:00
challenging
1) Add a .refund-button in Order Detail Page when order is paid 2) When .refund-button is clicked, change the order status to 'Refund Reviewing' 3) Create /admin/orders for admin to manage all orders, with a unique identifier #admin_order_{order_id} 4) Add a .pass-refund-review-button in #admin_order_{order_id} if the order is under 'Refund Reviewing' 5) When .pass-refund-review-button is clicked: - update the order status to 'Refund Passed' - ensure that the Coin is refunded to the user's account 6) In Home page, add .home-go-order-portal-link to navigate to /admin/orders 7) Create CSS files to beautify CSS 8) DO NOT use a third-party UI library
lowdb
task-19
2025-05-12T00:00:00
challenging
1) Implement a Comment and Rating System where users can leave feedback on products only after completing a payment transaction 2) Store comments in DB 3) On the product detail page, display the average rating of the product at the top, using classNames: - .product-average-rating (with number inside) 4) When a user has purchased the product, display a form on the product page with classNames: - .comment-form - .rate-input with five stars inside: (.rate-1-star, .rate-2-star, ... , .rate-5-star) - .comment-textarea - .comment-submit-button 5) Display all comments in a list on the product page, with each comment showing: - the username - the rating - the comment text 6) styled using classNames: - .comment-item - .comment-username - .comment-rating(with number inside) - .comment-text 7) Every User can ONLY comment a product for one time 8) Create CSS files to beautify CSS 9) DO NOT use a third-party UI library
lowdb
task-20
2025-05-12T00:00:00
challenging
1) Implement an invitation system where current users can view their unique .referral-code (with pure referral-code as innerText) on their profile page 2) explaining the invitation rule under .referral-code: 'When a new user registers through your referral code, you will earn $888, and an additional $1888 when they pay for their first order.' 3) The system should automatically credit the referring user with reward by this rule 4) On the register page, add a .referral-code-input field allowing new users to input the referral code during registration 5) Create CSS files to beautify the invitation system, ensuring a cohesive look 6) DO NOT use a third-party library
lowdb
task-1
2025-05-12T00:00:00
easy
1) Create components/Header.tsx that displays 'Hello Blog' at the top of the page with appealing background color. 2) Create components/Main.tsx where content is aligned at the top left and fills the remaining space. 3) Develop components/Blog.tsx that accepts 'title' and 'detail' as props. Display mock blog data in Main.tsx using this Blog component with the mock data: { title: 'Morning', detail: 'Morning My Friends' }. 3) Render Header.tsx And Main.tsx in App.tsx 4) The classname of title in Blog.tsx is 'blog-title', the width of blog-title is 'fit-content', fontSize is 24px
mobx
task-2
2025-05-12T00:00:00
easy
1) Create a appealing BlogList component that accepts an array of blogs as props and displays the titles in div elements with the className 'list-item'. 2) Create stores/blog.ts, use MobX to create a store with blog data, initialState is: ``` { blogs: [{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}] } ``` 2) In Main.tsx, render BlogList with the data from the store (by using observer in mobx-react-lite to auto update the BlogList when the blog data changes) 3) Position BlogList on the left side of Main.tsx with a width of 300px; each blog item should have a height of 40px and a border-box layout. 4) Only One Blog.tsx occupies the remaining space of Main.tsx. The content of Blog.tsx should be the first item of blog list.
mobx
task-3
2025-05-12T00:00:00
easy
1) Make blog items in BlogList selectable. When an item in BlogList is selected, highlight it with appealing style and display its content in the Blog Component. 2) Set 'Morning' as the default selected blog. 3) Beautify the List without changing the size of List Item 4) Use MobX to manage the selected blog. Use observer in mobx-react-lite to auto update.
mobx
task-4
2025-05-12T00:00:00
easy
1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'. 2) Use MobX to manage the 'formVisible' state. When formVisible is true, the BlogForm should be displayed, otherwise, it should be hidden. 3) Add an 'Add Blog' appealing blue button in the right of Header.tsx to toggle the BlogForm's visibility. 4) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it. 5) Place the BlogForm component in App.tsx. Use observer in mobx-react-lite to auto update.
mobx
task-5
2025-05-12T00:00:00
easy
1) An API is prepared, here is the docs of API: GET /api/blogs <response_definition> interface Response { blogs: { title: string; detail:string; }[]; } </response_definition> <response_example> { blogs: [ { title: 'XXX', detail: 'XXX' }, ], } </response_example> 2) In stores/blog.ts, add an async action to fetch data from API and update the blog list data in the store. 3) When App.tsx mounted, call the fetch action to start fetching blogs. 4) When API is fetching, show 'Blog is loading' in App.tsx. Use observer in mobx-react-lite to auto update. 5) Notice: When Initial Blog is fetching, Header is always visible but 'Add Blog' button should be disabled.
mobx
task-6
2025-05-12T00:00:00
moderate
1) Add appealing Form with label (label[htmlFor="title"], label[htmlFor="detail"]) in BlogForm to input title and detail; BlogForm can be submitted by button (.submit-btn); 2) When submitted, append this Blog to BlogList, and set this Blog as selected. 3) Use MobX actions to append form data to blogs. 4) Check title duplication when submit clicked. When title is duplicated, stop submitting and show a red border around the input field. 5) Add a span(.blog-list-len) near 'Hello Blog' in Header.tsx to show the length of blogs
mobx
task-7
2025-05-12T00:00:00
moderate
1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.tsx to delete the selected blog. 2) When blog deleted, set the first blog in blogs as selected. 3) If blogs is empty, shows 'No Blog' instead.
mobx
task-8
2025-05-12T00:00:00
moderate
1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.tsx. 2) When Edit clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Blog' in this case. When submitted, update selected Blog. 3) Use MobX to manage edit logic.
mobx
task-9
2025-05-12T00:00:00
moderate
1) Here is Search API: GET /api/search_blogs?keywords=XXX <response_definition> interface Response { // blogs is the search result blogs: { title: string; detail:string; }[]; } </response_definition> <response_example> { blogs: [ { title: 'XXX', detail: 'XXX' }, ], } </response_example> 2) Add a Search.tsx(width: 200px, border-box) component above BlogList.tsx in Main.tsx. 3) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to FILTER blogs by using new Search API. 4) Use MobX to request Search API and manage filtered blogs. Notice: Do not change the blogs in store. 5) Hint: When input field is typed fast, make sure the latest search result is displayed. Constraint: DO NOT USE any third-party packages, ONLY React/MobX APIs can be used to optimize performance.
mobx
task-10
2025-05-12T00:00:00
moderate
1) Add stores/route.ts to control the Route Logic The definition of state is: ``` class RouteStore { currentRoute: string; } ``` The initial state of route will be the pathname of the current page. 2) In stores/route.ts, listens to browser history change, and updates the currentRoute in the store. 3) When path is '/', shows Main.tsx, when path is '/login', shows pages/Login.tsx. Header is visible for every page. 4) Render <h1>User Login</h1> in components/Login.tsx. Add Button with text '🔑' in the right of Header.tsx, when clicked, go to '/login'. Constraint: DO NOT USE any third-party packages, ONLY React/MobX APIs can be used to optimize performance.
mobx
task-11
2025-05-12T00:00:00
challenging
1) Add a button with the text '🔀' in Header to append 100,000 blogs to BlogList at one time. Each blog should have a title formatted in regex 'RandomBlog-[\\d]{12}', digits in title is random. 2) Ensure the page will not be stuck when 100000 blogs are appended. Constraint: DO NOT USE any third-party packages, ONLY React/MobX APIs can be used to optimize performance.
mobx
task-12
2025-05-12T00:00:00
challenging
1) Enable Markdown text input for blog details. Preview the Markdown in Blog.tsx. 2) Develop a utility to reuse Markdown-related logic. 3) Prevent XSS attacks. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted.
mobx
task-13
2025-05-12T00:00:00
challenging
Implement user login, logout, and display blog poster's username. 1) Login API: POST /api/login Request: { username: string, password: string } Response: { success: boolean } 2) On the /login page, add a LoginForm with labels(label[htmlFor="username"], label[htmlFor="password"]), and a .login-submit-btn to submit the form via the Login API. 3) Display the user's username in Header.tsx with the class '.username'. 4) Show the blog author's username with the class '.blog-author'. If blog has no author, display 'Anonymous'. 5) Add a '👋' Logout button (class '.logout-btn') next to the username in Header.tsx. Clicking it logs the user out. 6) Use MobX to manage user states. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted.
mobx
task-14
2025-05-12T00:00:00
challenging
Implement blog comment feature: 1) Display commenter's username with class '.comment-author' and text with '.comment-text'. 2) Add a CommentForm with a '.comment-input' textarea and a '.comment-submit-btn' below each blog. 3) Use MobX to manage comments. 4) Add undo functionality via Ctrl+Z (Windows/Linux) or Command+Z (Mac) to remove the last comment. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted.
mobx
task-15
2025-05-12T00:00:00
challenging
Write a Gomoku chess game in route: '/game' 1) Add a button with the text '🎮' in Header, when clicked, jump to new page '/game' 2) chess board is 15*15, there is black chess and white chess, black chess first 3) Add the className for important element: white chess(.chess-white), black chess(.chess-black), position chess can be clicked to drop follow regex: .chess-pos-\\d{1,2}-d\\{1,2}. 4) show 'White's Turn' and 'Black'Turn' to shw current player 5) show 'White Wins!' and 'Black Wins!'. 6) Use MobX to manage the game logic. Beautify this game Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted.
mobx
task-16
2025-05-12T00:00:00
challenging
Enhance the Gomoku game with multi-step undo functionality. 1) Implement keyboard shortcut (Ctrl+Z on Windows/Linux or Command+Z on Mac) to trigger the undo action. 2) Allow multiple consecutive undos to revert the game state to any previous point. 3) Add a move history display with className '.move-history' showing all moves in the format "White: (x,y)" or "Black: (x,y)". 4) Each history item should have className '.history-item'. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted; Use MobX to manage the logic;
mobx
task-17
2025-05-12T00:00:00
challenging
Implement a recording and replay system for Gomoku games. 1) Every games will be auto recorded, and can be replayed by play button (.replay-play-btn) after the game is finished. 2) Add play/pause button (className '.replay-play-btn', '.replay-pause-btn') and a slider (className '.replay-slider') to navigate through game moves. 3) When replaying, show the current move number with className '.current-move'. 4) There is an interval of 1000 ms between each move. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted; Use MobX to manage the logic;
mobx
task-18
2025-05-12T00:00:00
challenging
Create functionality to share Gomoku games as blog posts. 1) Shows the "Share to Blog" button with className '.share-to-blog-btn' in the Gomoku game after the game is finished. 2) When clicked, open a modal form (className '.share-modal') with title input (className '.title-input'), description input (className '.description-input'), submit button (className '.share-submit'). Go to home page ('/') after submitted. 3) In Blog Detail, detect if a blog contains a Gomoku game recording and display a "Replay Game" button (className '.blog-replay-btn'). 4) When the replay button is clicked, show a modal (className '.blog-replay-modal') with the full game replay interface. 5) The replay interface should include the start play button (className '.blog-replay-start-play'), showing the current move number with className '.current-move'. There is an interval of 1000 ms between each move. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted; Use MobX to manage the logic.
mobx
task-19
2025-05-12T00:00:00
challenging
Add new page '/rooms': 1) Add a button with the text '🚪' in Header, when clicked, jump to new page '/rooms' 2) Add a "Create Room" button with className '.create-room-btn' that opens a room creation form. 3) The room creation form should include a labeled input field for room name ("Room Name") and a "Create" button to submit the form and create a new game room with a unique ID. Don't enter the room instantly. 4) Each room should be displayed as a card with className '.room-card' showing room name, creator's username, and current status. 5) Sync room status between all open tabs/windows. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted; Use MobX to manage the state and sync logic.
mobx
task-20
2025-05-12T00:00:00
challenging
Implement a multi-user chat system based on rooms 1) When a user clicks on a chat room card (with className '.room-card'), navigate to '/chat/:roomId' route. 2) The chat room page ('/chat/:roomId') contains a message list (className '.message-list'), status display (in '.room-status'), and participant information (display all participants' usernames in '.participant-list'). 3) Implement message sending and receiving functionality, including a message input box (className '.message-input') and a send button (className '.send-button'). 4) Each message (className .message) should contains the sender's information (className '.message-sender'). 5) If the user enters the chat room, add this user to .participant-list. 6) User will send heartbeat to check if user is in chat room, if the user is not active for 2000ms, the user will be removed from .participant-list. 7) Sync chat room status, messages, and user connection status between all open tabs/windows. Constraint: DO NOT use any third-party packages; ONLY React/MobX APIs are permitted; Use MobX to manage the logic.
mobx
task-1
2025-05-12T00:00:00
easy
1) create home page (app/page.tsx) with route '/' showing '🛍️🛍️🛍️ Welcome to Shopping Mart !' in h1 tag 2) create login page (app/login/page.tsx) at route '/login' showing '💡 Please Login First' in h1 tag
nextjs
task-2
2025-05-12T00:00:00
easy
1) Every page in this app will have a appealing header showing '🛍️ WebBench Shopping Mart', and a beautiful footer showing 'Copyright: Web Bench'. 2) Add className 'site-header' to header and 'site-footer' to footer. 3) Create app/layout.tsx to implement this feature. 4) header is fixed at the page top; footer is fixed at the page bottom; main(children) occupies the remaining space. 5) create app/layout.css and import it in app/layout.tsx to beautify CSS.
nextjs
task-3
2025-05-12T00:00:00
easy
1) If Page Not Found, shows 'Oops! Looks like you have wandered off the beaten path.' in h1 tag. add button(.not-found-go-to-home) to navigate to '/' 2) When click '🛍️ WebBench Shopping Mart' in header, navigate to '/' 3) create app/not-found.css to beautify CSS.
nextjs
task-4
2025-05-12T00:00:00
easy
1) Create libs/db.ts to export a new sqlite3.Database(process.env.DB_HOST!) by node-sqlite3. 2) add libs/setup.sql to create tables for products (id, name, price, image, description, quantity). 3) POST /api/products to insert product data (Request Body follow {'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}). Return { success: true, data: {'id': 'xxxx' } } when inserted successfully 4) GET /api/products to fetch all products. Return { success: true, products: [{'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}] } when fetched successfully.
nextjs
task-5
2025-05-12T00:00:00
easy
1) Add page with path '/products' to display all products (image, name, price). 2) UI Structure For Product Cards: <div className='product-card' id='product_card_{{id}}'><img className='product-image' src={{image}}/><div className='product-name'>{{name}}</div><div className='product-price'>{{price}}</div></div>. 3) add a button (.home-go-products-link) in home page to navigate to '/products' 4) .product-card is wrapped in .product-list. 5) create css file to beautify CSS.
nextjs
task-6
2025-05-12T00:00:00
moderate
1) Add product detail page with path '/products/:product_id' . 2) Add classNames for UI: .product-card, .product-image, .product-name, .product-price, .product_quantity, .product-description. 3) In /product page, When .product-card clicked, goto related product detail page 4) create css file to beautify CSS. 5) If Not Found, show 'Product Not Found'.
nextjs
task-7
2025-05-12T00:00:00
moderate
1) Create User Table, setup User Table with two initial users: 1. username: admin, password: 123456, role: admin, coin: 0 2. username: user, password: 123456, role: user, coin: 1000; 2) POST /api/auth to login into system with example payload {username: 'xxx', password: 'xxx'} and example response { success: true } 3) GET /api/auth to get the full information of current user, example response {'username': 'xxx', 'role': 'xxx', 'coin': xxx}, if not login, return 401 status 4) use 'jose' to generate JWT in cookie by key: 'TOKEN', the payload of JWT follow example{'username': 'xxx', 'role': 'xxx'}, secret is 'WEBBENCH-SECRET', use default HS256 algorithm and expired in 1 hour.
nextjs
task-8
2025-05-12T00:00:00
moderate
1) Create login form (.login-form) with username input (.username), password input (.password), and submit button (.login-btn) 2) on successful login redirect to home page showing 'Hello {username}!'(h1), on failed login show 'Login Failed' message 3) The username in home page should be rendered in Server Side, create a new Server Action (actions/auth.ts) to get current auth 4) create css file to beautify CSS.
nextjs
task-9
2025-05-12T00:00:00
moderate
1) Create register page with route '/register' with form (.register-form) containing: username (input.username), password (input.password), confirm password input (input.confirm-password), and submit button (.register-button) 2) Show error messages in .error-message div for validation failures, error text is: 'Passwords must match', 'Username already exists' 3) Redirect to home page and auto login when register successful 4) Add .login-link, clicked to /login 5) Add a .register-link in /login page, clicked to /register 6) Add Server Action to handle register form submission, the initial coin for new user is 1000 7) create CSS file to beautify CSS.
nextjs
task-10
2025-05-12T00:00:00
moderate
1) Render STATIC page /profile/:username to display the user profile with UI: h1.profile-username, .profile-coin. 2) Users can only visit their own profile, and Admins can visit the profiles of all people. If the privilege is violated, redirect to the /login page. 3) If User not found, shows User not found 4) Create CSS file to beautify CSS. DO NOT use a third-party UI library.
nextjs
task-11
2025-05-12T00:00:00
challenging
1) Add a component in components/HeaderUserMenu.tsx: if not logged in, display a button (.header-go-login) that navigates to /login; if logged in, display the username (.header-username) on the right side of the site header. 2) If user is logged in, when the .header-username is hovered, show a dropdown menu with: a button (.header-logout-btn) for logging out, and a button (.header-go-user-profile) for navigating to the current user's profile page. 3) Create CSS file to beautify CSS. DO NOT use a third-party UI library.
nextjs
task-12
2025-05-12T00:00:00
challenging
1) Add Recharge Button (.recharge-button) in Profile page, button is only visible when the user of the profile is current user. 2) When Recharge Button clicked, recharge 1000 coin 3) Create CSS file to beautify CSS. Constraint: DO NOT use a third-party UI library. Keep profile page STATIC.
nextjs
task-13
2025-05-12T00:00:00
challenging
1) Create Admin Portal for admin role with routes '/admin/products' and '/admin/users'. 2) Every products and users are wrapped in table row with IDs #admin_product_{product_id} and #admin_user_{username} respectively. Display the full information of products and users in table rows 2) In Home page, add .home-go-product-portal-link and .home-go-user-portal-link to navigate to respective portals. 3) For any route inside /admin, Redirect to /login if no privilege. 4) Create CSS file to beautify CSS.
nextjs
task-14
2025-05-12T00:00:00
challenging
1) Implement Wishlist feature where users can add products to their wishlist using button (.add-to-wishlist) in the product detail page. 2) Create a separate Wishlist page at route '/wishlist' displaying all products the user has added, structured as <div className='wishlist-item' id='wishlist_item_{product_id}'><img className='wishlist-image' src='/'/><div className='wishlist-name'></div><div className='wishlist-price'></div></div>. 3) Add functionality to remove items from wishlist with button (.remove-from-wishlist). 4) Store wishlist items in the database 5) Add button (.home-go-wish-list) in home page to navigate to '/wishlist' 6) Create CSS file to beautify the Wishlist UI. Constraint: DO NOT use a third-party UI library.
nextjs
task-15
2025-05-12T00:00:00
challenging
1) In components/Cart.tsx, create an appealing cart button .cart-button that shows the number of items in the cart. When clicked, it shows a popover of all items in the cart. Wrap Product Title, image, quantity (.cart-item-quantity), remove button (.cart-item-remove) in #cart_item_{product_id} 2) In the Detail Page, add an .add-to-cart-button. When clicked, add this product to the cart. 3) Store Cart Info in the DB for the current User. 4) Place Shopping Cart which can be seen in every page in the right-bottom of page 5) Create CSS file to beautify CSS. Constraint: DO NOT use a third-party UI library.
nextjs
task-16
2025-05-12T00:00:00
challenging
1) Add a button .place-order-in-cart in the Popover of Shopping Cart; when clicked, create an order with 'Pending payment' status without paying or decreasing product quantity, and redirect to /order/:order-id; 2) When Order created, clear Cart 3) Add .header-go-to-my-orders to the dropdown in HeaderUserMenu.tsx; when clicked, go to the Orders Page of the current user; Each order in my orders page should be displayed with id, status total price inside #my_order_${order_id}; and clicking on an order should jump to the order detail page at /order/:order-id; 4) In /order/:order-id, display the product title, images, price in tr#product_in_order_${product_id}; display the order price and order status. 5) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nextjs
task-17
2025-05-12T00:00:00
challenging
1) Add the .pay-my-order button to /order/:order-id; Button is visible when the status is 'Pending payment' 2) When .pay-my-order is clicked, the status of the order becomes 'Finished', and the Coin is paid by current user; 3) Decrease product quantity; 4) If payment fails, update the order status to 'Failed'. 5) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nextjs
task-18
2025-05-12T00:00:00
challenging
1) Add a .refund-button in Order Detail Page when order is paid; 2) When .refund-button is clicked, change the order status to 'Refund Reviewing'; 3) Create /admin/orders for admin to manage all orders, with a unique identifier #admin_order_{order_id}; 4) Add a .pass-refund-review-button in #admin_order_{order_id} if the order is under 'Refund Reviewing'; 5) When .pass-refund-review-button is clicked, update the order status to 'Refund Passed' and ensure that the Coin is refunded to the user's account. 6) In Home page, add .home-go-order-portal-link to navigate to /admin/orders. 7) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nextjs
task-19
2025-05-12T00:00:00
challenging
1) Implement a Comment and Rating System where users can leave feedback on products only after completing a payment transaction. Store comments in DB. 2) On the product detail page, display the average rating of the product at the top, using classNames: .product-average-rating (with number inside). 3) When a user has purchased the product, display a form on the product page with classNames: .comment-form, .rate-input with five stars inside: (.rate-1-star, .rate-2-star, ... , .rate-5-star), , .comment-textarea, .comment-submit-button allowing users to submit their ratings and comments. 4) Display all comments in a list on the product page, with each comment showing the username, the rating, and the comment text, styled using classNames: .comment-item, .comment-username, .comment-rating(with number inside), .comment-text. 5) Every User can ONLY comment a product for one time 6) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nextjs
task-20
2025-05-12T00:00:00
challenging
1) Implement an invitation system where current users can view their unique .referral-code (with pure referral-code as innerText) on their profile page, explaining the invitation rule under .referral-code: 'When a new user registers through your referral code, you will earn $888, and an additional $1888 when they pay for their first order.' And the system should automatically credit the referring user with reward by this rule. 2) On the register page, add a .referral-code-input field allowing new users to input the referral code during registration. 3) Create CSS files to beautify the invitation system, ensuring a cohesive look. Constraint: DO NOT use a third-party UI library.
nextjs
task-1
2025-05-12T00:00:00
easy
1) create home page (app/page.tsx) with route '/' showing '🛍️🛍️🛍️ Welcome to Shopping Mart !' in h1 tag 2) create login page (app/login/page.tsx) at route '/login' showing '💡 Please Login First' in h1 tag
nosql
task-2
2025-05-12T00:00:00
easy
1) create a new api (GET /api/usernames) by creating api route file (app/api/usernames/route.ts) 2) in this api, return a string list in body to get all usernames in User Model (model/user.ts), example: ['user1', 'user2'] 3) Hint: import User from '@/model/user' to get Model of User and get usernames by mongoose API
nosql
task-3
2025-05-12T00:00:00
easy
1) add model/product.ts to create mongoose Model for products (id, name, price, image, description, quantity). 2) POST /api/products to insert product data (Request Body follow {'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}). Return { success: true, data: {'id': 'xxxx' } } when inserted successfully 3) GET /api/products to fetch all products. Return { success: true, products: [{'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}] } when fetched successfully.
nosql
task-4
2025-05-12T00:00:00
easy
1) create api route file (app/api/products/[id]/route.ts) for /api/products/:product_id 2) GET /api/products/:product_id to get single products information, Return { success: true, data: {'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}}, when product not found, return { success: true, data: null } 3) PUT /api/products/:product_id to update products information (Request Body follow {'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}). Return { success: true, data: {'id': 'xxxx' } } when updated successfully 4) DELETE /api/products/:product_id to delete product data (Return { success: true, data: {'id': 'xxxx' } } when deleted successfully)
nosql
task-5
2025-05-12T00:00:00
easy
1) Add page with path '/products' to display all products (image, name, price). 2) UI Structure For Product Cards: <div className='product-card' id='product_card_{{id}}'><img className='product-image' src={{image}}/><div className='product-name'>{{name}}</div><div className='product-price'>{{price}}</div></div>. 3) add a button (.home-go-products-link) in home page to navigate to '/products' 4) .product-card is wrapped in .product-list. 5) create css file to beautify CSS.
nosql
task-6
2025-05-12T00:00:00
moderate
1) Add product detail page with path '/products/:product_id' . 2) Add classNames for UI: .product-card, .product-image, .product-name, .product-price, .product_quantity, .product-description. 3) In /product page, When .product-card clicked, goto related product detail page 4) create css file to beautify CSS. 5) If Not Found, show 'Product Not Found'.
nosql
task-7
2025-05-12T00:00:00
moderate
1) POST /api/auth to login into system with example payload {username: 'xxx', password: 'xxx'} and example response { success: true } 2) GET /api/auth to get the full information of current user, example response {'username': 'xxx', 'role': 'xxx', 'coin': xxx}, if not login, return 401 status 3) use 'jose' to generate JWT in cookie by key: 'TOKEN', the payload of JWT follow example{'username': 'xxx', 'role': 'xxx'}, secret is 'WEBBENCH-SECRET', use default HS256 algorithm and expired in 1 hour.
nosql
task-8
2025-05-12T00:00:00
moderate
1) Create login form (.login-form) with username input (.username), password input (.password), and submit button (.login-btn) 2) on successful login redirect to home page showing 'Hello {username}!'(h1), on failed login show 'Login Failed' message 3) The username in home page should be rendered in Server Side, create a new Server Action (actions/auth.ts) to get current auth 4) create css file to beautify CSS.
nosql
task-9
2025-05-12T00:00:00
moderate
1) Create register page with route '/register' with form (.register-form) containing: username (input.username), password (input.password), confirm password input (input.confirm-password), and submit button (.register-button) 2) Show error messages in .error-message div for validation failures, error text is: 'Passwords must match', 'Username already exists' 3) Redirect to home page and auto login when register successful 4) Add .login-link, clicked to /login 5) Add a .register-link in /login page, clicked to /register 6) Add Server Action to handle register form submission, the initial coin for new user is 1000 7) create CSS file to beautify CSS.
nosql
task-10
2025-05-12T00:00:00
moderate
1) Render STATIC page /profile/:username to display the user profile with UI: h1.profile-username, .profile-coin. 2) Users can only visit their own profile, and Admins can visit the profiles of all people. If the privilege is violated, redirect to the /login page. 3) If User not found, shows User not found 4) Create CSS file to beautify CSS. DO NOT use a third-party UI library.
nosql
task-11
2025-05-12T00:00:00
challenging
1) Add a component in components/HeaderUserMenu.tsx: if not logged in, display a button (.header-go-login) that navigates to /login; if logged in, display the username (.header-username) on the right side of the site header. 2) If user is logged in, when the .header-username is hovered, show a dropdown menu with: a button (.header-logout-btn) for logging out, and a button (.header-go-user-profile) for navigating to the current user's profile page. 3) Create CSS file to beautify CSS. DO NOT use a third-party UI library.
nosql
task-12
2025-05-12T00:00:00
challenging
1) Add Recharge Button (.recharge-button) in Profile page, button is only visible when the user of the profile is current user. 2) When Recharge Button clicked, recharge 1000 coin 3) Create CSS file to beautify CSS. Constraint: DO NOT use a third-party UI library. Keep profile page STATIC.
nosql
task-13
2025-05-12T00:00:00
challenging
1) Create Admin Portal for admin role with routes '/admin/products' and '/admin/users'. 2) Every products and users are wrapped in table row with IDs #admin_product_{product_id} and #admin_user_{username} respectively. Display the full information of products and users in table rows 2) In Home page, add .home-go-product-portal-link and .home-go-user-portal-link to navigate to respective portals. 3) For any route inside /admin, Redirect to /login if no privilege. 4) Create CSS file to beautify CSS.
nosql
task-14
2025-05-12T00:00:00
challenging
1) Implement Wishlist feature where users can add products to their wishlist using button (.add-to-wishlist) in the product detail page. 2) Create a separate Wishlist page at route '/wishlist' displaying all products the user has added, structured as <div className='wishlist-item' id='wishlist_item_{product_id}'><img className='wishlist-image' src='/'/><div className='wishlist-name'></div><div className='wishlist-price'></div></div>. 3) Add functionality to remove items from wishlist with button (.remove-from-wishlist). 4) Store wishlist items in the database 5) Add button (.home-go-wish-list) in home page to navigate to '/wishlist' 6) Create CSS file to beautify the Wishlist UI. Constraint: DO NOT use a third-party UI library.
nosql
task-15
2025-05-12T00:00:00
challenging
1) In components/Cart.tsx, create an appealing cart button .cart-button that shows the number of items in the cart. When clicked, it shows a popover of all items in the cart. Wrap Product Title, image, quantity (.cart-item-quantity), remove button (.cart-item-remove) in #cart_item_{product_id} 2) In the Detail Page, add an .add-to-cart-button. When clicked, add this product to the cart. 3) Store Cart Info in the DB for the current User. 4) Place Shopping Cart which can be seen in every page in the right-bottom of page 5) Create CSS file to beautify CSS. Constraint: DO NOT use a third-party UI library.
nosql
task-16
2025-05-12T00:00:00
challenging
1) Add a button .place-order-in-cart in the Popover of Shopping Cart; when clicked, create an order with 'Pending payment' status without paying or decreasing product quantity, and redirect to /order/:order-id; 2) When Order created, clear Cart 3) Add .header-go-to-my-orders to the dropdown in HeaderUserMenu.tsx; when clicked, go to the Orders Page of the current user; Each order in my orders page should be displayed with id, status total price inside #my_order_${order_id}; and clicking on an order should jump to the order detail page at /order/:order-id; 4) In /order/:order-id, display the product title, images, price in tr#product_in_order_${product_id}; display the order price and order status. 5) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nosql
task-17
2025-05-12T00:00:00
challenging
1) Add the .pay-my-order button to /order/:order-id; Button is visible when the status is 'Pending payment' 2) When .pay-my-order is clicked, the status of the order becomes 'Finished', and the Coin is paid by current user; 3) Decrease product quantity; 4) If payment fails, update the order status to 'Failed'. 5) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nosql
task-18
2025-05-12T00:00:00
challenging
1) Add a .refund-button in Order Detail Page when order is paid; 2) When .refund-button is clicked, change the order status to 'Refund Reviewing'; 3) Create /admin/orders for admin to manage all orders, with a unique identifier #admin_order_{order_id}; 4) Add a .pass-refund-review-button in #admin_order_{order_id} if the order is under 'Refund Reviewing'; 5) When .pass-refund-review-button is clicked, update the order status to 'Refund Passed' and ensure that the Coin is refunded to the user's account. 6) In Home page, add .home-go-order-portal-link to navigate to /admin/orders. 7) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nosql
task-19
2025-05-12T00:00:00
challenging
1) Implement a Comment and Rating System where users can leave feedback on products only after completing a payment transaction. Store comments in DB. 2) On the product detail page, display the average rating of the product at the top, using classNames: .product-average-rating (with number inside). 3) When a user has purchased the product, display a form on the product page with classNames: .comment-form, .rate-input with five stars inside: (.rate-1-star, .rate-2-star, ... , .rate-5-star), , .comment-textarea, .comment-submit-button allowing users to submit their ratings and comments. 4) Display all comments in a list on the product page, with each comment showing the username, the rating, and the comment text, styled using classNames: .comment-item, .comment-username, .comment-rating(with number inside), .comment-text. 5) Every User can ONLY comment a product for one time 6) Create CSS files to beautify CSS. Constraint: DO NOT use a third-party UI library.
nosql
task-20
2025-05-12T00:00:00
challenging
1) Implement an invitation system where current users can view their unique .referral-code (with pure referral-code as innerText) on their profile page, explaining the invitation rule under .referral-code: 'When a new user registers through your referral code, you will earn $888, and an additional $1888 when they pay for their first order.' And the system should automatically credit the referring user with reward by this rule. 2) On the register page, add a .referral-code-input field allowing new users to input the referral code during registration. 3) Create CSS files to beautify the invitation system, ensuring a cohesive look. Constraint: DO NOT use a third-party UI library.
nosql