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 home page (pages/index.vue) with route '/' showing '🛍️🛍️🛍️ Welcome to Shopping Mart !' in h1 tag 2) Create login page (pages/login.vue) at route '/login' showing '💡 Please Login First' in h1 tag
nuxt
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 class 'site-header' to header and 'site-footer' to footer 3) Create layouts/default.vue 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) Add style section in layouts/default.vue to implement the layout CSS
nuxt
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 2) Add button(.not-found-go-to-home) to navigate to '/' 3) When click '🛍️ WebBench Shopping Mart' in header, navigate to '/' 4) Add Style to beautify UI 5) 404 Page share the same layout with other pages 6) Hint: error.vue in the root dir can handle 404, NuxtLayout can be used to implement layout in error page
nuxt
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}) 4) Return { success: true, data: {'id': 'xxxx' } } when inserted successfully 5) GET /api/products to fetch all products 6) Return { success: true, products: [{'id':'xxx', 'name': 'SKU', 'price': 1234, image: 'xxx', description: 'xxx', quantity: 100}] } when fetched successfully
nuxt
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) Add Style to beautify UI
nuxt
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 /products page, When .product-card clicked, goto related product detail page 4) Add Style to beautify UI 5) If Not Found, show 'Product Not Found'
nuxt
task-7
2025-05-12T00:00:00
moderate
1) Create User Table, setup User Table with two initial users: - username: admin, password: 123456, role: admin, coin: 0 - 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
nuxt
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 Route (server/api/auth.ts) to get current auth 4) Add Style to beautify UI
nuxt
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 Route to handle register form submission, the initial coin for new user is 1000 7) Add Style to beautify UI
nuxt
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) Add Style to beautify UI 6) DO NOT use a third-party UI library
nuxt
task-11
2025-05-12T00:00:00
challenging
1) Add a component in components/HeaderUserMenu.vue: - 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) Add Style to beautify UI 4) DO NOT use a third-party UI library
nuxt
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) Add Style to beautify UI 5) DO NOT use a third-party UI library 6) Keep profile page STATIC
nuxt
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 3) Display the full information of products and users in table rows 4) In 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 no privilege 6) Add Style to beautify UI
nuxt
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) Structure wishlist items 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 assets/css/wishlist.css to beautify the Wishlist UI 8) DO NOT use a third-party UI library
nuxt
task-15
2025-05-12T00:00:00
challenging
1) In components/Cart.vue, 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) In the Detail Page, add an .add-to-cart-button 5) When clicked, add this product to the cart 6) Store Cart Info in the DB for the current User 7) Place Shopping Cart which can be seen in every page in the right-bottom of page 8) Add Style to beautify UI 9) DO NOT use a third-party UI library
nuxt
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.vue, 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) Add Style to beautify UI 10) DO NOT use a third-party UI library
nuxt
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 from current user - Decrease product quantity 4) If payment fails, update the order status to 'Failed' 5) Add Style to beautify UI 6) DO NOT use a third-party UI library
nuxt
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) Add Style to beautify UI 8) DO NOT use a third-party UI library
nuxt
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) Style 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) Add Style to beautify UI 9) DO NOT use a third-party UI library
nuxt
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) Explain 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) Add Style to beautify UI 6) DO NOT use a third-party library
nuxt
task-1
2025-05-12T00:00:00
easy
Setup project with parcel. Here are the requirements: - Add dev and build to npm scripts. - Set dev server port to environment variable `process.env.PROJECT_PORT`. - Generate sourceMap after bundling(If parcel generates sourceMap by default, then you don't need to do anything here). - Set output directory to `dist` for build command. - Set output directory to `dist-serve` for dev command.
parcel
task-2
2025-05-12T00:00:00
easy
Add path alias `@` for `src`. Besides this: Add `import alias from '@/alias'` in `src/index.js`. Display `alias` value in `src/index.js`.
parcel
task-3
2025-05-12T00:00:00
easy
Setup global constants replacement for process.env.__VERSION__ via bundler capability. process.env.__VERSION__ should be replaced with "v1.0.0" during bundling. Besides this: - Add `import './version'` in `src/index.js`.
parcel
task-4
2025-05-12T00:00:00
easy
I want to write a Single Page Application. When visiting non-existent page, dev server should fallback to `index.html`. If it's already the default behavior in parcel, do nothing.
parcel
task-5
2025-05-12T00:00:00
easy
My targeting browsers support `?.` (Optional Chaining Operator), so I want to keep this syntax as is after bundling. Try to address it.
parcel
task-6
2025-05-12T00:00:00
easy
I want to proxy every request prefixed with `/postman/` to `https://postman-echo.com` in dev server. For example, request to `/postman/get` will be forwarded to `https://postman-echo.com/get`. Try to address it using .proxyrc.js.
parcel
task-7
2025-05-12T00:00:00
easy
Add `import bird from './images/bird.png'` in `src/index.js`. Update `src/index.js` to display the png image in <img /> element with id `bird`. Add `import svg from './images/TablerAntennaBars5.svg'` in `src/index.js`. Update `src/index.js` to display the svg image in <img /> element with id `svg`. Update bundler configuration if necessary.
parcel
task-8
2025-05-12T00:00:00
moderate
Add `import './index.css'` in `src/index.js`. Display text `hello css` in div with CSS class `.css` in `src/index.js`. Add `import './index.less'` in `src/index.js`. Display text `hello less` in div with CSS class `.less` in `src/index.js`. Add `import lessStyles from './index.module.less'` in `src/index.js`. Display text `hello less modules` in div with CSS class referencing to variable`lessStyles.lessModules` in `src/index.js`. Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
parcel
task-9
2025-05-12T00:00:00
moderate
Add `import ts from './index.ts'` in `src/index.js`. Display `ts()` return value in `src/index.js`. Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
parcel
task-10
2025-05-12T00:00:00
moderate
Add `import VueComponent from './component.vue';` in `src/index.js`. Mount VueComponent in `src/index.js`. Add `import ReactComponent from './component.jsx'` in `src/index.js`. Mount ReactComponent in `src/index.js`. DO NOT use jsx syntax. Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
parcel
task-11
2025-05-12T00:00:00
challenging
I want to do something with sourcemap files in output directory. Implement this as a local parcel reporter plugin. ## Requirements - Move all sourcemap files into `<project_root>/sourcemaps` after build. - Add `//# sourceMappingURL=https://internal.com/sourcemaps/<sourcemap_path>` at the end of original js file. ## Examples Assume we have following files in dist directory before moving: - dist/assets/index.js - dist/assets/index.js.map - dist/assets/index.css - dist/assets/index.css.map After moving, the files should be: - dist/assets/index.js - dist/assets/index.css - sourcemaps/assets/index.js.map - sourcemaps/assets/index.css.map And the `dist/assets/index.js` should contain the following content at its end(Using JS comment): //# sourceMappingURL=https://internal.com/sourcemaps/assets/index.js.map And the `dist/assets/index.css` should contain the following content at its end(Using CSS comment): /*# sourceMappingURL=https://internal.com/sourcemaps/assets/index.css.map */
parcel
task-12
2025-05-12T00:00:00
challenging
Update the bundler configuration to remove all `console.log` call expression after running build command. DONOT use terser or other compressor tool, implement it on your own locally.
parcel
task-13
2025-05-12T00:00:00
challenging
During bundling, extract all license information into `dist/vendor-licenses.txt` from all npm packages imported directly or transitively in source file.
parcel
task-14
2025-05-12T00:00:00
challenging
Implement dynamical generation of in-memory virtual modules as a parcel plugin. For example: src/files/a.ts ```js export default 'a' ``` src/files/b.ts ```js export default 'b' ``` src/index.js ```js import files from '~files' files.a.default // should be 'a' files.b.default // should be 'b' ``` You can hardcode `src/files` and `~files` as a builtin rule when implementing this. Besides this - Add `import files from '~files'` in `src/index.js` - Display JSON stringified files(without any whitespaces) in div element in `src/index.js`
parcel
task-15
2025-05-12T00:00:00
moderate
I have some mock data in `<project_root>/mock.json`, setup dev server to return them as mock data.
parcel
task-16
2025-05-12T00:00:00
challenging
Implement an image compression plugin for bundler, only for build command
parcel
task-17
2025-05-12T00:00:00
moderate
I want to import markdown files directly, and get rendered html by importing them. For example: ```js import md from './hello.md' ``` The `md` variable is expected to be a html string rendered by its markdown content. Implement this in a local parcel plugin. Besides this: - Add `import md from './hello.md'` in `src/index.js`. - Display `md` inside a div in `src/index.js`.
parcel
task-18
2025-05-12T00:00:00
moderate
Supporting importing frontmatter from markdown files. For example: hello.md ```md --- author: hello tags: - foo - bar --- ## Markdown Heading ``` index.js ```js import md, { frontmatter } from './hello.md' frontmatter.author // should be "hello" frontmatter.tags // should be ["foo", "bar"] ``` Besides this - Update `import md from './hello.md'` to `import md, { frontmatter } from './hello.md'` in `src/index.js`. - Display `frontmatter.author` in div element in `src/index.js`
parcel
task-19
2025-05-12T00:00:00
challenging
Add new feature for markdown parcel plugin. When markdown content includes images, the images should be recognized as dependency of markdown file. Image url in rendered html string should reference to the image in output directory.
parcel
task-20
2025-05-12T00:00:00
challenging
Add `language` option for markdown parcel plugin For example: ```js import md from './hello.md' ``` If langauge is 'en', `./hello.md` will resolved to `./hello.en.md` if it exists. If langauge is 'zh', `./hello.md` will resolved to `./hello.zh.md` if it exists. If both `./hello.en.md` and `./hello.zh.md` are not found, fallback to its original path `./hello.md` Besides this, set language="zh" as default value.
parcel
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
prisma
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 (prisma.user), example: ['user1', 'user2'] 3) Hint: import { prisma } from '@/libs/db', use prisma.user and get user model by prisma API
prisma
task-3
2025-05-12T00:00:00
easy
1) add product model schema in prisma/schema.prisma 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 3) Hint: import { prisma } from '@/libs/db', use prisma.product and get product model by prisma API
prisma
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)
prisma
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
prisma
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'
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
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
prisma
task-1
2025-05-12T00:00:00
easy
1) Create components/Header.jsx that displays 'Hello Blog' at the top of the page with appealing background color. 2) Create components/Main.jsx where content is aligned at the top left and fills the remaining space. 3) Develop components/Blog.jsx that accepts 'title' and 'detail' as props. Display mock blog data in Main.jsx using this Blog component with the mock data: { title: 'Morning', detail: 'Morning My Friends' }. 4) Render Header.jsx And Main.jsx in App.jsx 4) The classname of title in Blog.jsx is 'blog-title', the width of blog-title is 'fit-content', fontSize is 24px
react-no-ts
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) In Main.jsx, mock the blog data and display it using BlogList with this data: [{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}]. 3) Position BlogList on the left side of Main.jsx with a width of 300px; each blog item should have a height of 40px and a border-box layout. 4) Only One Blog.jsx occupies the remaining space of Main.jsx. The content of Blog.jsx should be from first item of the mock data.
react-no-ts
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
react-no-ts
task-4
2025-05-12T00:00:00
easy
1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'. 2) Add an 'Add Blog' appealing blue button in the right of Header.jsx to toggle the BlogForm's visibility. 3) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it. 4) Place the BlogForm component in App.jsx.
react-no-ts
task-5
2025-05-12T00:00:00
easy
1) Add .visible-count in the top-left of BlogForm showing '0' initially. 2) Increment .visible-count by 1 each time BlogForm becomes visible.
react-no-ts
task-6
2025-05-12T00:00:00
moderate
1) Add appealing Form with label 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. Keep Previous MockData.
react-no-ts
task-7
2025-05-12T00:00:00
moderate
1) Create context/BlogContext.jsx with React Context API to manage related context (blog list and selected blog) in App.jsx 2) When submit a new BlogForm, check title duplication. Constraint: The duplication check code should be written in BlogForm; 3) Add a span(.blog-list-len) near 'Hello Blog' in Header.jsx to show the length of blogs
react-no-ts
task-8
2025-05-12T00:00:00
moderate
1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.jsx. When clicked, delete selected Blog and select the first blog. 2) The logic of Delete is encapsulated in a custom hook hooks/useDelete.jsx.
react-no-ts
task-9
2025-05-12T00:00:00
moderate
1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.jsx. When clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Form' in this case. When submitted, update selected Blog. 2) The logic of Edit is encapsulated in a custom hook hooks/useEdit.jsx;
react-no-ts
task-10
2025-05-12T00:00:00
moderate
1) Add a Search.jsx(width: 200px, border-box) component above BlogList.jsx in Main.jsx. 2) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to filter blogs.
react-no-ts
task-11
2025-05-12T00:00:00
chanllenging
1) Add a button with the text 'Random Blogs' 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. 3) Constraint: DO NOT USE any third-party packages, ONLY React APIs can be used to optimize performance.
react-no-ts
task-12
2025-05-12T00:00:00
challenging
1) Add appealing Comments.jsx with the title 'Comments' at the bottom of Blog.jsx. 2) Include a TextArea with the placeholder 'Enter Your Comment' and a submit button (.comment-btn) to submit the comment. 3) Only display comments related to the selected blog, showing them in cards with the className '.comment-item', placed above the TextArea. 4) Create store/Comment.jsx to implement CommentStore without ReactContext API、Redux、mobx etc., and connect CommentStore to UI. 5) Preserve comments when a blog is edited, and clear them when a blog is deleted. 6) Constraint: DO NOT USE any third-party packages; ONLY utilize React APIs.
react-no-ts
task-13
2025-05-12T00:00:00
challenging
1) Create components/Tooltip.jsx that displays a tooltip (.tooltip) at the bottom of the child component when hovered over. 2) Implement this tooltip on the 'Add Blog' button to show 'Write a New Blog For everyone' when hovered. 3) The Tooltip should be appended to document.body. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are allowed.
react-no-ts
task-14
2025-05-12T00:00:00
challenging
1) Enable Markdown text input for blog details. Preview the Markdown in Blog.jsx. 2) Develop a hook or utility to reuse Markdown-related logic. 3) Prevent XSS attacks. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react-no-ts
task-15
2025-05-12T00:00:00
challenging
1) Create utils/toast.jsx to display a one-line message (fontSize: 12px) in a appealing green box at the top of the page for 2000ms. 2) Display a toast with 'New Comment Created Successfully!' when a new comment is submitted, and '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 APIs are permitted.
react-no-ts
task-16
2025-05-12T00:00:00
challenging
1) When the title of Blog is longer than 300px, show '...' to hide longer text. 2) Title can be hovered to show full content in Tooltip when Title is longer than 300px. DO NOT show tooltip when Title is less than 300px 3) Make sure EVERY title displayed in the page follow the rules, create reusable component. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react-no-ts
task-17
2025-05-12T00:00:00
challenging
1) Add appealing button in Header with text 'Fast Comment'. 2) When clicked, focus Textarea in Comments.jsx and type 'Charming Blog!' DO NOT submit this comment. 3) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted. DO NOT use BOM API. DO NOT use DOM query API.
react-no-ts
task-18
2025-05-12T00:00:00
challenging
1) Add pages/Game.jsx with text 'Hello Game'. 2) Add router.jsx in to control the Route Logic: When browser location is '/', routed to App. When browser location is '/game', routed to Game. 3) Add a appealing button with text '🎮' in App's Header.jsx to jump to Game page, and user can go back to App when browser page go Back. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react-no-ts
task-19
2025-05-12T00:00:00
challenging
1) Write a Gomoku chess 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!' when player wins, reuse utils/toast.jsx to toast BIG 'Congratulations!' with style: 50px fontSize 6) keep 'Hello Game' 7) Beautify this game 8) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react-no-ts
task-20
2025-05-12T00:00:00
challenging
1) When gamer wins, add a button with Text 'Post Game Records', when clicked, post a new blog to record the history of this game. Return to blog page and show this blog 2) The Blog Content Example: '# White is Winner! ```game White(1,5); Black(14,11); White(11,4); ```' 3) Title of Blog follow Game-[Date]-[Time] 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react-no-ts
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' }. 4) 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
react
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) In Main.tsx, mock the blog data and display it using BlogList with this data: [{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}]. 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 from first item of the mock data.
react
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
react
task-4
2025-05-12T00:00:00
easy
1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'. 2) Add an 'Add Blog' appealing blue button in the right of Header.tsx to toggle the BlogForm's visibility. 3) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it. 4) Place the BlogForm component in App.tsx.
react
task-5
2025-05-12T00:00:00
easy
1) Add .visible-count in the top-left of BlogForm showing '0' initially. 2) Increment .visible-count by 1 each time BlogForm becomes visible.
react
task-6
2025-05-12T00:00:00
moderate
1) Add appealing Form with label 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. Keep Previous MockData.
react
task-7
2025-05-12T00:00:00
moderate
1) Create context/BlogContext.tsx with React Context API to manage related context (blog list and selected blog) in App.tsx 2) When submit a new BlogForm, check title duplication. Constraint: The duplication check code should be written in BlogForm; 3) Add a span(.blog-list-len) near 'Hello Blog' in Header.tsx to show the length of blogs
react
task-8
2025-05-12T00:00:00
moderate
1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.tsx. When clicked, delete selected Blog and select the first blog. 2) The logic of Delete is encapsulated in a custom hook hooks/useDelete.tsx.
react
task-9
2025-05-12T00:00:00
moderate
1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.tsx. When clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Form' in this case. When submitted, update selected Blog. 2) The logic of Edit is encapsulated in a custom hook hooks/useEdit.tsx;
react
task-10
2025-05-12T00:00:00
moderate
1) Add a Search.tsx(width: 200px, border-box) component above BlogList.tsx in Main.tsx. 2) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to filter blogs.
react
task-11
2025-05-12T00:00:00
chanllenging
1) Add a button with the text 'Random Blogs' 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. 3) Constraint: DO NOT USE any third-party packages, ONLY React APIs can be used to optimize performance.
react
task-12
2025-05-12T00:00:00
challenging
1) Add appealing Comments.tsx with the title 'Comments' at the bottom of Blog.tsx. 2) Include a TextArea with the placeholder 'Enter Your Comment' and a submit button (.comment-btn) to submit the comment. 3) Only display comments related to the selected blog, showing them in cards with the className '.comment-item', placed above the TextArea. 4) Create store/Comment.tsx to implement CommentStore without ReactContext API、Redux、mobx etc., and connect CommentStore to UI. 5) Preserve comments when a blog is edited, and clear them when a blog is deleted. 6) Constraint: DO NOT USE any third-party packages; ONLY utilize React APIs.
react
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) Implement this tooltip on the 'Add Blog' button to show 'Write a New Blog For everyone' when hovered. 3) The Tooltip should be appended to document.body. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are allowed.
react
task-14
2025-05-12T00:00:00
challenging
1) Enable Markdown text input for blog details. Preview the Markdown in Blog.tsx. 2) Develop a hook or utility to reuse Markdown-related logic. 3) Prevent XSS attacks. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react
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 at the top of the page for 2000ms. 2) Display a toast with 'New Comment Created Successfully!' when a new comment is submitted, and '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 APIs are permitted.
react
task-16
2025-05-12T00:00:00
challenging
1) When the title of Blog is longer than 300px, show '...' to hide longer text. 2) Title can be hovered to show full content in Tooltip when Title is longer than 300px. DO NOT show tooltip when Title is less than 300px 3) Make sure EVERY title displayed in the page follow the rules, create reusable component. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react
task-17
2025-05-12T00:00:00
challenging
1) Add appealing button in Header with text 'Fast Comment'. 2) When clicked, focus Textarea in Comments.tsx and type 'Charming Blog!' DO NOT submit this comment. 3) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted. DO NOT use BOM API. DO NOT use DOM query API.
react
task-18
2025-05-12T00:00:00
challenging
1) Add pages/Game.tsx with text 'Hello Game'. 2) Add router.tsx in to control the Route Logic: When browser location is '/', routed to App. When browser location is '/game', routed to Game. 3) Add a appealing button with text '🎮' in App's Header.tsx to jump to Game page, and user can go back to App when browser page go Back. 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react
task-19
2025-05-12T00:00:00
challenging
1) Write a Gomoku chess 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!' when player wins, reuse utils/toast.tsx to toast BIG 'Congratulations!' with style: 50px fontSize 6) keep 'Hello Game' 7) Beautify this game 8) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react
task-20
2025-05-12T00:00:00
challenging
1) When gamer wins, add a button with Text 'Post Game Records', when clicked, post a new blog to record the history of this game. Return to blog page and show this blog 2) The Blog Content Example: '# White is Winner! ```game White(1,5); Black(14,11); White(11,4); ```' 3) Title of Blog follow Game-[Date]-[Time] 4) Constraint: DO NOT use any third-party packages; ONLY React APIs are permitted.
react