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
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
redux
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 models/blog.ts, use @reduxjs/toolkit to create a slice with name 'blog', include this slice in store.tsx, 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 useSelector to pick the data from the store) 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.
redux
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 redux to manage the selected blog
redux
task-4
2025-05-12T00:00:00
easy
1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'. 2) Use redux 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.
redux
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 models/blog.ts, use createAsyncThunk from @reduxjs/toolkit to fetch data from API and update the Blog List data in store. 3) When App.tsx mounted, dispatch action to start fetching blogs. 4) When API is fetching, show 'Blog is loading' in App.tsx 5) Notice: When Initial Blog is fetching, Header is always visible but 'Add Blog' button should be disabled.
redux
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 Redux 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
redux
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.
redux
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 Redux to manage edit logic.
redux
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 Redux 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/Redux APIs can be used to optimize performance.
redux
task-10
2025-05-12T00:00:00
moderate
1) Add models/route.ts to control the Route Logic The definition of state is: ``` interface RouteState { currentRoute: string; } ``` The initial state of route will be the pathname of the current page. 2) Write middleware/route.ts, listen to browser history change, and update the currentRoute in 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/Redux APIs can be used to optimize performance.
redux
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/Redux APIs can be used to optimize performance.
redux
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/Redux APIs are permitted.
redux
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 Redux to manage user states. Constraint: DO NOT use any third-party packages; ONLY React/Redux APIs are permitted.
redux
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 Redux 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/Redux APIs are permitted.
redux
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 redux to manage the game logic. Beautify this game Constraint: DO NOT use any third-party packages; ONLY React/Redux APIs are permitted.
redux
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/Redux APIs are permitted; Use redux to manage the logic;
redux
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/Redux APIs are permitted; Use redux to manage the logic;
redux
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/Redux APIs are permitted; Use redux to manage the logic.
redux
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/Redux APIs are permitted; Use redux to manage the state and sync logic.
redux
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/Redux APIs are permitted; Use redux to manage the logic.
redux
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.scss' imported by 'common.scss'.
sass
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 SASS map variable '$color', all padding/margin value to SASS variables (using computed value) and all border properties to mixins. Use SASS functions to handle similar colors, e.g. lighter or darker colors. Save these variables and mixins to 'common/config.scss' which should be imported by 'common.scss'.
sass
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.scss' imported by 'common.scss'.
sass
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'.
sass
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.scss' imported by 'common.scss'.
sass
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.scss' imported by 'common.scss'.
sass
task-7
2025-05-12T00:00:00
moderate
Class MultiSelectionQuestion (file 'common/MultiSelectionQuestion.js', 'common/MultiSelectionQuestion.scss') 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.
sass
task-8
2025-05-12T00:00:00
moderate
Class OpenQuestion (file 'common/OpenQuestion.js', 'common/OpenQuestion.scss') 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.
sass
task-9
2025-05-12T00:00:00
moderate
Class RatingQuestion (file 'common/RatingQuestion.js', 'common/RatingQuestion.scss') 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.
sass
task-10
2025-05-12T00:00:00
moderate
Class RankingQuestion (file 'common/RankingQuestion.js', 'common/RankingQuestion.scss') 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.
sass
task-11
2025-05-12T00:00:00
moderate
Class NpsQuestion (file 'common/NpsQuestion.js', 'common/NpsQuestion.scss') 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.
sass
task-12
2025-05-12T00:00:00
challenging
Class LikertQuestion (file 'common/LikertQuestion.js', 'common/LikertQuestion.scss') 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.
sass
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.
sass
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.scss' imported by 'common.scss'.
sass
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.
sass
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.
sass
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.
sass
task-18
2025-05-12T00:00:00
challenging
Class DataQuestion (file 'common/DataQuestion.js', 'common/DataQuestion.scss') 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'.
sass
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.
sass
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.
sass
task-1
2025-05-12T00:00:00
easy
- append an element <p> with arbitrary text, class `class1` and id `id1` to `.root` - write css to the page with: - type selector to set its `padding` to `5px` - class selector to set its `text-decoration` to `underline` - id selector to set its `font-family` to `monospace` - no js, modify html file directly
selector
task-2
2025-05-12T00:00:00
easy
- write css to the page with: - compound selector (type & class & id) to set `#id1`'s `font-size` to `15px`
selector
task-3
2025-05-12T00:00:00
easy
- append <q> with arbitrary text and id `id3` to `.root` - write css to the page with: - selector list (near to `.class1` property) to set its `text-decoration` to `underline` - universal selector to set all elements' `color` to `red`
selector
task-4
2025-05-12T00:00:00
easy
- append <div> with id `id4` to `.root` - append 5 <div> to `#id4` with arbitrary text and id `id4-{index}` (index is 0-based) - write css with: - child combinator selector to set its children `color` to `green`
selector
task-5
2025-05-12T00:00:00
easy
- write css with: - subsequent-sibling combinator selector to set the `color` of all siblings next to `#id4-1` to `blue` - next-sibling combinator selector to set the `color` of `#id4-3`'s next-sibling to `yellow`
selector
task-6
2025-05-12T00:00:00
moderate
- write css for elements in `#form`: - descendant combinator selector to set `#form` children `color` to `green` - set the `color` of all children next to the third child to `blue` - set the `color` of the last forth child's next-sibling to `yellow`
selector
task-7
2025-05-12T00:00:00
challenging
write css for elements in `#form`: - set `background-color` to `yellow` for those without attribute `name` - set `background-color` to `red` for those whose attribute `name` starts with `form` - set `background-color` to `green` for those whose attribute `name` ends with `end` - set `background-color` to `blue` for those whose attribute `class` contains `c2` - set `background-color` to `white` for those whose attribute `name` equals to `form-1` - set `background-color` to `white` for those whose attribute `name` contains `unique` - set `background-color` to `white` for those whose attribute `lang` starts with `en` immediately followed by a hyphen
selector
task-8
2025-05-12T00:00:00
moderate
use nesting selector to modify css for elements in `#form`: - set input's `outline` to `2px solid red` when hovering it - set input's `background-color` to `black` when focusing it
selector
task-9
2025-05-12T00:00:00
challenging
modify css for elements in `#form`: - set `font-size` of all inputs to `20px` when focusing any input
selector
task-10
2025-05-12T00:00:00
moderate
- append <div> with id `id10`(no content) to `.root` - modify css to add separate line (height 1px) before and after the `#form` - modify css to prepend `><` for any element with no children other than white-space characters - do not modify html or js
selector
task-11
2025-05-12T00:00:00
challenging
modify css for elements in `#table`: - set `background-color` of the third cell in the forth row to `yellow` - set `background-color` of all cells in even rows to `lightgray` - do not use `!important` anytime
selector
task-12
2025-05-12T00:00:00
challenging
modify html and css for `#table`: - `cell(x,y)` means the yth cell in the xth row - append `<p>` in 4 cell(1,2), cell(2,3), cell(3,4), cell(4,2) - set `background-color` of cells with `<p>` to `yellow` - do not use `!important` anytime
selector
task-13
2025-05-12T00:00:00
challenging
modify css for elements in `#form`: - set `background-color` to `pink` for all direct children - keep setting input's `background-color` to `black` when focusing it - do not use `!important` anytime
selector
task-14
2025-05-12T00:00:00
challenging
modify css for elements in `#table`: - append in cell(1,3) with: `<form> <input type="text" disabled /> <input type="text" /> <input type="text" required /> <button type="submit">Submit</button> </form>` - set enabled control `background-color` to `green` - set disabled control `background-color` to `yellow` - suffix the required control with a red `*` - set invalid control `background-color` to `red` - do not use `!important` anytime
selector
task-15
2025-05-12T00:00:00
challenging
modify css for elements in `#table`: - append in cell(1,4) with: `<a href="#table">table</a> <a href="#form">form</a> <a href="index.html">test</a>` - set default links `text-decoration` to `underline` - set visited links `text-decoration` to `none` - set active links `outline` to `1px solid blue` - set page's targeted element `background-color` to `lightgreen` - do not use `!important` anytime
selector
task-16
2025-05-12T00:00:00
moderate
- append to `.root` with: `<div id="id16"> <h1>H1</h1> <section> <h1>H1</h1> <article> <h1>H1</h1> <aside> <h1>H1</h1> <nav> <h1>H1</h1> </nav> </aside> </article> </section> </div>` - modify css for <h1> in `#id16`: - the first level (direct child) <h1> `font-size` is `30px` - the second level <h1> `font-size` is `25px` - the third level <h1> `font-size` is `20px` - the forth and deeper level <h1> `font-size` is `15px`
selector
task-17
2025-05-12T00:00:00
moderate
- append to `.root` with: `<div id="id17"> <h1>H1</h1> <x> <h1>H1</h1> <x> <h1>H1</h1> <x> <h1>H1</h1> </x> </x> </x> </div>` - `x` is one of section, article, aside, nav - modify css for <h1> in `#id17`: - the first level (direct child) <h1> `font-size` is `30px` - the second level <h1> `font-size` is `25px` - the third and more level <h1> `font-size` is `20px`
selector
task-18
2025-05-12T00:00:00
moderate
- append to `.root` with: `<div id="id18"> <h1>H1</h1> <x> <h1>H1</h1> <x> <h1>H1</h1> <x> <h1>H1</h1> <x> <h1>H1</h1> </x> </x> </x> </x> </div>` - `x` is one of section, article, aside, nav - modify css for <h1> in `#id18`: - the first level (direct child) <h1> `font-size` is `30px` - the second level <h1> `font-size` is `25px` - the third level <h1> `font-size` is `20px` - the forth and deeper level <h1> `font-size` is `15px`
selector
task-19
2025-05-12T00:00:00
moderate
- modify css for <h1> in `#id18`: - the first level (direct child) <h1> `text-indent` is `0` - the second level <h1> `text-indent` is `10px` - the third level <h1> `text-indent` is `20px` - the forth and deeper level <h1> `text-indent` is `30px`
selector
task-20
2025-05-12T00:00:00
moderate
- add new css for <h1> in `#id18`: - do not modify existed css rules - the second level <h1> `font-style` is `italic` - the forth and deeper level <h1> `font-weight` is `normal`
selector
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
sequelize
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' to get Model of User and get usernames by sequelize API
sequelize
task-3
2025-05-12T00:00:00
easy
1) add model/product.ts and export it in model/index.ts to create sequelize 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.
sequelize
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)
sequelize
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.
sequelize
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'.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
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.
sequelize
task-1
2025-05-12T00:00:00
easy
1) create 'global.style.tsx' file, export GlobalStyle (created by styled-components) to set the global style for this App; 2) the global style should set the body's padding and margin to 0; 3) import GlobalStyle into App.tsx
styled-components
task-2
2025-05-12T00:00:00
easy
1) Create components/Header.tsx fixed on the top of the page, with 'Hello Blog' as its text. 2) Create components/Footer.tsx fixed on the bottom of the page 3) Create components/Main.tsx which occupies the remaining space, with 'Welcome to Blog System' as its text 4) Add className 'site-header' to Header, 'site-footer' to Footer, 'site-main' to Main. 5) Import and render Header, Main, Footer in App.tsx 6) Constraint: use styled-components to set appealing style for Header、Footer
styled-components
task-3
2025-05-12T00:00:00
easy
1) Create components/Button.tsx, export default ONLY a styled.button component with props '$type' 2) when $type of Button is 'primary', background becomes #0064fa, 'secondary' becomes #0095ee, 'danger' becomes #d52515 3) Render Three Buttons in the RIGHT of Header: 'primary' Button with text 'Add Blog', 'secondary' Button with text 'Read Blogs', 'danger' Button with text 'Theme' 4) Constraint: use styled-components to set the appealing style
styled-components
task-4
2025-05-12T00:00:00
easy
1) When Button Hovered, opacity of Button switched to 0.7; 2) When Button Focused, the size enlarged by 120% 3) Constraint: use styled-components to set the appealing style
styled-components
task-5
2025-05-12T00:00:00
easy
1) Render A secondary Button with text 'My Friends' in Footer 2) Only if when Button displayed in Footer, the backgroundColor of text becomes transparent, and the color the text in Button is #0095ee 4) Constraint: use styled-components to set the appealing style
styled-components
task-6
2025-05-12T00:00:00
moderate
1) Create three pages: components/AddBlog.tsx (with h1 'Add Blog'), components/ReadBlogs.tsx (with h1 'Read Blogs'), components/ThemePage.tsx (with h1 'Theme') 2) Render pages in Main.tsx, only one page is visible to User at one time 3) When click 'Add Blog', switch to show AddBlog.tsx, when click 'Read Blogs', switch to show ReadBlogs.tsx, when click 'Theme', switch to show ThemePage.tsx 4) When No Button in Header Clicked, shows 'Welcome to Blog System' by default 5) Constraint: use styled-components to set the appealing style
styled-components
task-7
2025-05-12T00:00:00
moderate
1) When page in Main.tsx switched, switch pages by animations in 1s: new page moved from the right side of viewport to show it 2) Create keyframes (import from 'styled-components') and PageContainer (styled.div with classname .page-container) in Main.tsx to implement this feature 3) Constraint: use styled-components to set the appealing style&animation
styled-components
task-8
2025-05-12T00:00:00
moderate
3) create context/BlogContext.tsx to manage blog list data 2) The initial Blog List Data is [{title: 'Morning', content: 'Morning My Friends'}, {title: 'Travel', content: 'I love traveling!'}] 3) In ReadBlogs.tsx, render titles of blogs in div elements (.list-item) 4) Constraint: use styled-components to set the appealing style
styled-components
task-9
2025-05-12T00:00:00
moderate
1) Make .list-item clickable, when clicked, switch to show the content of the blog in a div element (.blog-content) 2) .blog-content is placed in the right of Blog List. 3) When Blog Content Changed, shows animation for .blog-content: switch content opacity from 0 to 1 in 1s 4) Constraint: use styled-components to set the appealing style&animation
styled-components
task-10
2025-05-12T00:00:00
moderate
1) create components/BlogForm.tsx, which consists of input(with placeholder 'Title'), textarea(with placeholder 'Content') a submit button (.submit-btn) 2) Add a BlogForm.tsx to AddBlog.tsx 3) when Form in AddBlog submitted, submit the Blog and switch to ReadBlogs Page, select the Blog just submitted 4) Constraint: use styled-components to set the appealing style&animation
styled-components
task-11
2025-05-12T00:00:00
challenging
1) When Submit Blog clicked, add new animation to .blog-content in ReadBlogs.tsx: fade in from the bottom side of viewport 2) The animation of .blog-content will not change when .list-item in ReadBlogs.tsx clicked 3) Constraint: use styled-components to set the appealing style&animation
styled-components
task-12
2025-05-12T00:00:00
challenging
1) Create components/Markdown.tsx, support Markdown Parse and render for blog content in ReadBlogs.tsx 2) Use styled-components to set the text color of elements in Markdown: h1 #000000, h2 #333333, h3 #666666, h4 #999999 3) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed.
styled-components
task-13
2025-05-12T00:00:00
challenging
1) Create components/Tooltip.tsx that displays a tooltip (.tooltip) at the bottom of the child component when hovered over. 2) The Tooltip should be appended to document.body. 3) Shows Tooltip with text '🪄' when hovered on 'Add Blog' Button; Shows Tooltip with text '🍉' when hovered on 'Read Blogs' Button; Shows Tooltip with text '🎨' when hovered on 'Theme' Button; 4) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation.
styled-components
task-14
2025-05-12T00:00:00
challenging
1) Create components/Modal.tsx that display a modal (.modal) appended to document.body. 2) Modal accepts title(JSX.Element) and content(JSX.Element) as its props 3) The overlay of Modal (.modal-overlay) has opacity 0.3 and backgroundColor #999999 4) The Modal should have a close button (.close-btn) 5) Add a Preview Button(.preview-btn) in BlogForm.tsx, when clicked, toggle a Modal with title ('Preview Blog Markdown') to shows the Markdown-Parsed Blog Content, Markdown style are same as the style of Blog Content in ReadBlogs.tsx 6) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-15
2025-05-12T00:00:00
challenging
1) Create utils/toast.tsx to display a one-line message (fontSize: 12px) in a appealing green box (.toast) at the top of the page for 2000ms. 2) Display 'New Blog Created Successfully!' when a new blog is submitted. 3) If a toast is already visible when another is triggered, remove the old toast before showing the new one. 4) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-16
2025-05-12T00:00:00
challenging
1) When hovered in 'My Friends' Button in Footer, shows Tooltip with text '🐶🐱🐭🐹🐰🦊🐻🐼' in the TOP of 'My Friends' 2) Custom style of Tooltip by using 'styled(Tooltip)' in Footer.tsx, the fontSize of text in this Tooltip is 50px 3) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-17
2025-05-12T00:00:00
challenging
1) When clicked in 'My Friends' Button in Footer, shows Modal with title ('My Friends') 2) Shows Animals 🐶🐱🐭🐹🐰🦊🐻🐼 in the content of Modal, every animal is wrapped in .animal, and every animal has a infinite animation: rotate from -45deg to 45deg in 1s, and rotate back from 45deg to -45deg in 1s 3) Custom style of this Modal by using 'styled(Modal)' in Footer.tsx, the overlay Background Color of Modal is customized to #FF69B4 4) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-18
2025-05-12T00:00:00
challenging
1) create context/ThemeContent.tsx by using styled's ThemeProvider to manage the theme configuration. 2) In Theme Page, add input(.header-background) with label 'Header Background' which will represent the background color of Header, and add input(.footer-background) with label 'Footer Background' which will represent the background color of Footer 4) When the input value in Theme Page changed, the theme configuration updated instantly 5) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-19
2025-05-12T00:00:00
challenging
1) In Theme Page, add input(.markdown-h1) with label 'Markdown H1' which will represent the text color of Markdown H1, add input(.markdown-h2) with label 'Markdown H2' which will represent the text color of Markdown H2, add input(.markdown-h3) with label 'Markdown H3' which will represent the text color of Markdown H3, add input(.markdown-h4) with label 'Markdown H4' which will represent the text color of Markdown H4 2) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components
task-20
2025-05-12T00:00:00
challenging
1) In Theme Page, add input(.button-primary) with label 'Button Primary' which will represent the background color of Button Primary, add input(.button-secondary) with label 'Button Secondary' which will represent the background color of Button Secondary, add input(.button-danger) with label 'Button Danger' which will represent the background color of Button Danger 2) In Theme Page, add input(.toast-background) with label 'Toast Background' which will represent the background color of Toast 3) Constraint: DO NOT use any third-party packages; ONLY React and styled-components are allowed. use styled-components to set the appealing style&animation
styled-components