Build a Turnip Price Tracker with Alibaba Cloud Serverless Mini‑Program
Learn how to create a mini‑program that records and shares Animal Crossing turnip prices by leveraging Alibaba Cloud Serverless, including cloud functions, MongoDB‑based storage, and front‑end development with JavaScript, while walking through registration, tool setup, and architecture overview.
As a month‑and‑a‑half practice on Animal Crossing, many islanders struggle to sell turnips; this tutorial shows how to use Alibaba Cloud Serverless to build a cute, healing mini‑program that tracks turnip prices, comparable to a futures market.
About Alibaba Cloud Serverless
It provides cloud function services that support Node.js development, replacing traditional backend servers so each service’s code can be deployed individually to the cloud. It also offers data storage based on a MongoDB‑hosted database where data is stored in JSON format, and file storage that lets the mini‑program upload text, images, etc., automatically generating resource links for use in the app.
Free during public testing
Unlike in‑game purchases, Alibaba Cloud Serverless is completely free during its public test period, so learners won’t incur any charges.
Preparation Work
Platform registration: Create an Alibaba Cloud account, complete real‑name verification, then search for “Mini‑Program Cloud” in the console, open Serverless, and create a new service space for the mini‑program.
Alipay mini‑program registration: Sign up on the Alipay developer platform, enable phone QR login, create a personal mini‑program, apply for public test, and start the experience.
Tool installation: Install the Mini‑Program Developer Tool and the Alipay Open Platform Development Assistant (used later to generate public and private keys; keep them confidential).
Understanding the Final Architecture
Each player fills in their island information and real‑world turnip price; after submission, the data appears in a friend list. The interface is simple, all data is managed by the user, and only authorized friends can view it.
Technical Principle
The front‑end is written in JavaScript using the framework specially designed for Alipay mini‑programs (not React or Vue). A static mini‑program alone cannot retain data after a page refresh, so dynamic functionality requires cloud functions and cloud database services.
Two main buttons are provided: “Submit” triggers the cloud function updateUserData, which writes or updates the submitted data in the Serverless cloud database; “Refresh” triggers getAllUserData, which retrieves all records and displays them.
The architecture is straightforward, and developers can extend it with features such as sorting turnip prices from high to low.
For those interested in exploring mini‑program development further, you can scan the QR code or click “Read the original article” to get free access to the Mini‑Program Cloud tools and an e‑book.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
